From e53f077a720f58fef17f18171aa7e8b3b2f2511f Mon Sep 17 00:00:00 2001 From: Angelo Giacco Date: Mon, 4 Aug 2025 13:00:21 +0200 Subject: [PATCH 01/34] add client initiation data to python sdk (#598) * add client initiation data to python sdk * fix --- .../conversational_ai/conversation.py | 7 +++ tests/test_convai.py | 46 +++++++++++-------- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index 50ff1f25..1e0c0156 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -223,10 +223,12 @@ def __init__( extra_body: Optional[dict] = None, conversation_config_override: Optional[dict] = None, dynamic_variables: Optional[dict] = None, + user_id: Optional[str] = None, ): self.extra_body = extra_body or {} self.conversation_config_override = conversation_config_override or {} self.dynamic_variables = dynamic_variables or {} + self.user_id = user_id class Conversation: @@ -404,6 +406,11 @@ def _run(self, ws_url: str): "custom_llm_extra_body": self.config.extra_body, "conversation_config_override": self.config.conversation_config_override, "dynamic_variables": self.config.dynamic_variables, + "source_info": { + "source": "python_sdk", + "version": __version__, + }, + **({"user_id": self.config.user_id} if self.config.user_id else {}), } ) ) diff --git a/tests/test_convai.py b/tests/test_convai.py index fc36b09b..310969df 100644 --- a/tests/test_convai.py +++ b/tests/test_convai.py @@ -55,10 +55,11 @@ def test_conversation_basic_flow(): test_user_id = "test_user_123" # Setup the conversation + config = ConversationInitiationData(user_id=test_user_id) conversation = Conversation( client=mock_client, agent_id=TEST_AGENT_ID, - user_id=test_user_id, + config=config, requires_auth=False, audio_interface=MockAudioInterface(), callback_agent_response=agent_response_callback, @@ -78,17 +79,22 @@ def test_conversation_basic_flow(): conversation.end_session() conversation.wait_for_session_end() - # Assertions - expected_init_message = { - "type": "conversation_initiation_client_data", - "custom_llm_extra_body": {}, - "conversation_config_override": {}, - "dynamic_variables": {}, - } - mock_ws.send.assert_any_call(json.dumps(expected_init_message)) + # Assertions - check the call was made with the right structure + send_calls = [call[0][0] for call in mock_ws.send.call_args_list] + init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + assert len(init_messages) == 1 + init_message = init_messages[0] + + assert init_message["type"] == "conversation_initiation_client_data" + assert init_message["custom_llm_extra_body"] == {} + assert init_message["conversation_config_override"] == {} + assert init_message["dynamic_variables"] == {} + assert init_message["source_info"]["source"] == "python_sdk" + assert "version" in init_message["source_info"] + assert init_message["user_id"] == test_user_id agent_response_callback.assert_called_once_with("Hello there!") assert conversation._conversation_id == TEST_CONVERSATION_ID - assert conversation.user_id == test_user_id + assert conversation.config.user_id == test_user_id def test_conversation_with_auth(): @@ -155,14 +161,18 @@ def test_conversation_with_dynamic_variables(): conversation.end_session() conversation.wait_for_session_end() - # Assertions - expected_init_message = { - "type": "conversation_initiation_client_data", - "custom_llm_extra_body": {}, - "conversation_config_override": {}, - "dynamic_variables": {"name": "angelo"}, - } - mock_ws.send.assert_any_call(json.dumps(expected_init_message)) + # Assertions - check the call was made with the right structure + send_calls = [call[0][0] for call in mock_ws.send.call_args_list] + init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + assert len(init_messages) == 1 + init_message = init_messages[0] + + assert init_message["type"] == "conversation_initiation_client_data" + assert init_message["custom_llm_extra_body"] == {} + assert init_message["conversation_config_override"] == {} + assert init_message["dynamic_variables"] == {"name": "angelo"} + assert init_message["source_info"]["source"] == "python_sdk" + assert "version" in init_message["source_info"] agent_response_callback.assert_called_once_with("Hello there!") assert conversation._conversation_id == TEST_CONVERSATION_ID From 84492bceb1d83a2fbe6650aeaf83f50e84d20337 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 01:40:40 +0200 Subject: [PATCH 02/34] SDK regeneration (#599) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- poetry.lock | 6 +- pyproject.toml | 2 +- reference.md | 780 +++++++++++++++--- src/elevenlabs/__init__.py | 179 ++-- src/elevenlabs/base_client.py | 87 ++ src/elevenlabs/conversational_ai/__init__.py | 2 + .../conversational_ai/agents/client.py | 20 + .../conversational_ai/agents/raw_client.py | 20 + .../conversations/__init__.py | 3 +- .../conversational_ai/conversations/client.py | 139 ++++ .../conversations/raw_client.py | 165 ++++ .../conversations/types/__init__.py | 7 + ...conversations_list_request_summary_mode.py | 5 + src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/dubbing/client.py | 14 +- src/elevenlabs/dubbing/raw_client.py | 14 +- src/elevenlabs/raw_base_client.py | 73 ++ src/elevenlabs/service_accounts/__init__.py | 19 + .../service_accounts/api_keys/__init__.py | 17 + .../service_accounts/api_keys/client.py | 456 ++++++++++ .../service_accounts/api_keys/raw_client.py | 565 +++++++++++++ .../api_keys/types/__init__.py | 23 + ...count_user_id_api_keys_post_permissions.py | 12 + ..._user_id_api_keys_post_permissions_item.py | 34 + ...d_api_keys_api_key_id_patch_permissions.py | 12 + ..._keys_api_key_id_patch_permissions_item.py | 34 + src/elevenlabs/service_accounts/client.py | 107 +++ src/elevenlabs/service_accounts/raw_client.py | 117 +++ src/elevenlabs/speech_to_text/__init__.py | 12 +- src/elevenlabs/speech_to_text/client.py | 24 +- src/elevenlabs/speech_to_text/raw_client.py | 32 +- .../speech_to_text/types/__init__.py | 7 +- .../types/speech_to_text_convert_response.py | 8 + src/elevenlabs/studio/projects/client.py | 30 +- src/elevenlabs/studio/projects/raw_client.py | 24 +- src/elevenlabs/text_to_speech/client.py | 16 +- src/elevenlabs/text_to_speech/raw_client.py | 16 +- src/elevenlabs/text_to_voice/client.py | 150 +--- src/elevenlabs/text_to_voice/raw_client.py | 180 +--- src/elevenlabs/types/__init__.py | 208 +++-- src/elevenlabs/types/add_project_request.py | 226 +---- .../types/agent_summary_response_model.py | 5 + src/elevenlabs/types/asr_provider.py | 2 +- .../types/batch_call_recipient_status.py | 2 +- ...1_projects_project_id_chapters_add_post.py | 28 - ...jects_add_post_apply_text_normalization.py | 7 - ...d_project_v_1_projects_add_post_fiction.py | 5 - ...oject_v_1_projects_add_post_source_type.py | 7 - ...t_v_1_projects_add_post_target_audience.py | 7 - ...nts_agent_id_add_to_knowledge_base_post.py | 33 - ...odcast_v_1_projects_podcast_create_post.py | 148 ---- ...ects_podcast_create_post_duration_scale.py | 7 - ...t_v_1_projects_podcast_create_post_mode.py | 57 -- ...ects_podcast_create_post_quality_preset.py | 7 - ...v_1_projects_podcast_create_post_source.py | 13 - ...rojects_podcast_create_post_source_item.py | 47 -- ...oject_info_v_1_projects_project_id_post.py | 53 -- ...nt_v_1_projects_project_id_content_post.py | 43 - src/elevenlabs/types/built_in_tools_input.py | 5 + src/elevenlabs/types/built_in_tools_output.py | 5 + ...caption_style_character_animation_model.py | 23 + ...le_character_animation_model_enter_type.py | 5 + ...yle_character_animation_model_exit_type.py | 5 + ...ption_style_horizontal_placement_model.py} | 11 +- ..._style_horizontal_placement_model_align.py | 5 + src/elevenlabs/types/caption_style_model.py | 51 ++ .../types/caption_style_model_text_align.py | 5 + .../types/caption_style_model_text_style.py | 5 + .../types/caption_style_model_text_weight.py | 5 + .../caption_style_section_animation_model.py | 23 + ...tyle_section_animation_model_enter_type.py | 5 + ...style_section_animation_model_exit_type.py | 5 + .../types/caption_style_template_model.py | 21 + .../caption_style_vertical_placement_model.py | 22 + ...on_style_vertical_placement_model_align.py | 5 + .../caption_style_word_animation_model.py | 23 + ...n_style_word_animation_model_enter_type.py | 5 + ...on_style_word_animation_model_exit_type.py | 5 + .../types/client_tool_config_input.py | 16 + .../types/client_tool_config_output.py | 16 + ...versation_history_analysis_common_model.py | 1 + ...n_history_transcript_common_model_input.py | 6 +- ...pt_common_model_input_tool_results_item.py | 14 + ..._history_transcript_common_model_output.py | 6 +- ...t_common_model_output_tool_results_item.py | 14 + ...nscript_other_tools_result_common_model.py | 31 + ...pt_other_tools_result_common_model_type.py | 7 + ...nscript_system_tool_result_common_model.py | 32 + ..._system_tool_result_common_model_result.py | 195 +++++ ...story_transcript_tool_call_common_model.py | 3 +- ...rsation_initiation_client_data_internal.py | 2 + ...on_initiation_client_data_request_input.py | 2 + ...n_initiation_client_data_request_output.py | 2 + .../types/conversation_initiation_source.py | 1 + ...=> conversation_initiation_source_info.py} | 14 +- .../conversation_summary_response_model.py | 2 + src/elevenlabs/types/dubbed_segment.py | 2 + .../types/dynamic_variable_assignment.py | 37 + ...> dynamic_variable_update_common_model.py} | 17 +- .../types/end_call_tool_result_model.py | 22 + .../types/features_usage_common_model.py | 4 + .../language_detection_tool_result_model.py | 22 + src/elevenlabs/types/llm.py | 6 + src/elevenlabs/types/mcp_tool_config_input.py | 16 + .../types/mcp_tool_config_output.py | 16 + ...ichannel_speech_to_text_response_model.py} | 11 +- .../types/play_dtmf_result_error_model.py | 22 + .../types/play_dtmf_result_success_model.py | 22 + .../types/project_extended_response.py | 11 + src/elevenlabs/types/project_response.py | 11 + ...prompt_agent_api_model_input_tools_item.py | 13 + ...rompt_agent_api_model_output_tools_item.py | 13 + .../types/prompt_agent_api_model_override.py | 5 + .../prompt_agent_api_model_override_config.py | 5 + .../types/save_voice_preview_request.py | 5 + .../types/segment_subtitle_frame.py | 22 + .../types/skip_turn_tool_response_model.py | 21 + src/elevenlabs/types/speaker_segment.py | 2 + .../speech_to_text_chunk_response_model.py | 5 + .../types/system_tool_config_input.py | 16 + .../types/system_tool_config_input_params.py | 15 + .../types/system_tool_config_output.py | 16 + .../types/system_tool_config_output_params.py | 15 + src/elevenlabs/types/token_response_model.py | 20 + src/elevenlabs/types/tool.py | 7 + .../types/tool_request_model_tool_config.py | 13 + src/elevenlabs/types/tool_response_model.py | 2 + .../types/tool_response_model_tool_config.py | 13 + src/elevenlabs/types/tool_type.py | 5 + ....py => tool_usage_stats_response_model.py} | 8 +- ...ansfer_to_agent_tool_result_error_model.py | 22 + ...sfer_to_agent_tool_result_success_model.py | 26 + .../transfer_to_number_result_error_model.py | 22 + ...sfer_to_number_result_sip_success_model.py | 23 + ...r_to_number_result_twilio_success_model.py | 26 + ...date_pronunciation_dictionaries_request.py | 26 +- .../voice_response_model_safety_control.py | 3 +- .../types/voicemail_detection_tool_config.py | 31 + .../types/webhook_tool_config_input.py | 16 + .../types/webhook_tool_config_output.py | 16 + src/elevenlabs/types/widget_config.py | 10 + .../types/widget_config_response.py | 10 + .../workspace_api_key_list_response_model.py | 23 + .../types/workspace_api_key_response_model.py | 29 + ...api_key_response_model_permissions_item.py | 34 + ...workspace_create_api_key_response_model.py | 22 + .../types/workspace_resource_type.py | 1 + ...ace_service_account_list_response_model.py | 25 + ...orkspace_service_account_response_model.py | 26 + src/elevenlabs/voices/client.py | 10 + src/elevenlabs/voices/raw_client.py | 10 + 151 files changed, 4416 insertions(+), 1358 deletions(-) create mode 100644 src/elevenlabs/conversational_ai/conversations/types/__init__.py create mode 100644 src/elevenlabs/conversational_ai/conversations/types/conversations_list_request_summary_mode.py create mode 100644 src/elevenlabs/raw_base_client.py create mode 100644 src/elevenlabs/service_accounts/__init__.py create mode 100644 src/elevenlabs/service_accounts/api_keys/__init__.py create mode 100644 src/elevenlabs/service_accounts/api_keys/client.py create mode 100644 src/elevenlabs/service_accounts/api_keys/raw_client.py create mode 100644 src/elevenlabs/service_accounts/api_keys/types/__init__.py create mode 100644 src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions.py create mode 100644 src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py create mode 100644 src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions.py create mode 100644 src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py create mode 100644 src/elevenlabs/service_accounts/client.py create mode 100644 src/elevenlabs/service_accounts/raw_client.py create mode 100644 src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py delete mode 100644 src/elevenlabs/types/body_add_chapter_to_a_project_v_1_projects_project_id_chapters_add_post.py delete mode 100644 src/elevenlabs/types/body_add_project_v_1_projects_add_post_apply_text_normalization.py delete mode 100644 src/elevenlabs/types/body_add_project_v_1_projects_add_post_fiction.py delete mode 100644 src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py delete mode 100644 src/elevenlabs/types/body_add_project_v_1_projects_add_post_target_audience.py delete mode 100644 src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_agents_agent_id_add_to_knowledge_base_post.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_duration_scale.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_mode.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_quality_preset.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source.py delete mode 100644 src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source_item.py delete mode 100644 src/elevenlabs/types/body_edit_basic_project_info_v_1_projects_project_id_post.py delete mode 100644 src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py create mode 100644 src/elevenlabs/types/caption_style_character_animation_model.py create mode 100644 src/elevenlabs/types/caption_style_character_animation_model_enter_type.py create mode 100644 src/elevenlabs/types/caption_style_character_animation_model_exit_type.py rename src/elevenlabs/types/{body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post.py => caption_style_horizontal_placement_model.py} (65%) create mode 100644 src/elevenlabs/types/caption_style_horizontal_placement_model_align.py create mode 100644 src/elevenlabs/types/caption_style_model.py create mode 100644 src/elevenlabs/types/caption_style_model_text_align.py create mode 100644 src/elevenlabs/types/caption_style_model_text_style.py create mode 100644 src/elevenlabs/types/caption_style_model_text_weight.py create mode 100644 src/elevenlabs/types/caption_style_section_animation_model.py create mode 100644 src/elevenlabs/types/caption_style_section_animation_model_enter_type.py create mode 100644 src/elevenlabs/types/caption_style_section_animation_model_exit_type.py create mode 100644 src/elevenlabs/types/caption_style_template_model.py create mode 100644 src/elevenlabs/types/caption_style_vertical_placement_model.py create mode 100644 src/elevenlabs/types/caption_style_vertical_placement_model_align.py create mode 100644 src/elevenlabs/types/caption_style_word_animation_model.py create mode 100644 src/elevenlabs/types/caption_style_word_animation_model_enter_type.py create mode 100644 src/elevenlabs/types/caption_style_word_animation_model_exit_type.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model_type.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py rename src/elevenlabs/types/{body_add_to_knowledge_base_v_1_convai_add_to_knowledge_base_post.py => conversation_initiation_source_info.py} (52%) create mode 100644 src/elevenlabs/types/dynamic_variable_assignment.py rename src/elevenlabs/types/{conversation_history_transcript_tool_result_common_model.py => dynamic_variable_update_common_model.py} (64%) create mode 100644 src/elevenlabs/types/end_call_tool_result_model.py create mode 100644 src/elevenlabs/types/language_detection_tool_result_model.py rename src/elevenlabs/types/{body_edit_chapter_v_1_projects_project_id_chapters_chapter_id_patch.py => multichannel_speech_to_text_response_model.py} (55%) create mode 100644 src/elevenlabs/types/play_dtmf_result_error_model.py create mode 100644 src/elevenlabs/types/play_dtmf_result_success_model.py create mode 100644 src/elevenlabs/types/save_voice_preview_request.py create mode 100644 src/elevenlabs/types/segment_subtitle_frame.py create mode 100644 src/elevenlabs/types/skip_turn_tool_response_model.py create mode 100644 src/elevenlabs/types/token_response_model.py create mode 100644 src/elevenlabs/types/tool_type.py rename src/elevenlabs/types/{body_stream_project_audio_v_1_projects_project_id_snapshots_project_snapshot_id_stream_post.py => tool_usage_stats_response_model.py} (69%) create mode 100644 src/elevenlabs/types/transfer_to_agent_tool_result_error_model.py create mode 100644 src/elevenlabs/types/transfer_to_agent_tool_result_success_model.py create mode 100644 src/elevenlabs/types/transfer_to_number_result_error_model.py create mode 100644 src/elevenlabs/types/transfer_to_number_result_sip_success_model.py create mode 100644 src/elevenlabs/types/transfer_to_number_result_twilio_success_model.py create mode 100644 src/elevenlabs/types/voicemail_detection_tool_config.py create mode 100644 src/elevenlabs/types/workspace_api_key_list_response_model.py create mode 100644 src/elevenlabs/types/workspace_api_key_response_model.py create mode 100644 src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py create mode 100644 src/elevenlabs/types/workspace_create_api_key_response_model.py create mode 100644 src/elevenlabs/types/workspace_service_account_list_response_model.py create mode 100644 src/elevenlabs/types/workspace_service_account_response_model.py diff --git a/poetry.lock b/poetry.lock index 787904d0..2196abf1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.7.14" +version = "2025.8.3" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2"}, - {file = "certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995"}, + {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"}, + {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 137448d3..da8efd8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.8.1" +version = "v2.9.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 2c197a0f..48ff556a 100644 --- a/reference.md +++ b/reference.md @@ -1,4 +1,64 @@ # Reference +
client.save_a_voice_preview() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add a generated voice to the voice library. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.save_a_voice_preview() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ ## History
client.history.list(...)
@@ -599,7 +659,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -809,7 +869,7 @@ Defaults to None. **apply_text_normalization:** `typing.Optional[ BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -1021,7 +1081,7 @@ Defaults to None. **apply_text_normalization:** `typing.Optional[ BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. @@ -1235,7 +1295,7 @@ Defaults to None. **apply_text_normalization:** `typing.Optional[ BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. @@ -1936,110 +1996,6 @@ client.text_to_voice.create_previews( - - -
- -
client.text_to_voice.create_voice_from_preview(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Add a generated voice to the voice library. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.text_to_voice.create_voice_from_preview( - voice_name="Sassy squeaky mouse", - voice_description="A sassy squeaky mouse", - generated_voice_id="37HceQefKmEi3bGovXjL", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**voice_name:** `str` — Name to use for the created voice. - -
-
- -
-
- -**voice_description:** `str` — Description to use for the created voice. - -
-
- -
-
- -**generated_voice_id:** `str` — The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. - -
-
- -
-
- -**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Optional, metadata to add to the created voice. Defaults to None. - -
-
- -
-
- -**played_not_selected_voice_ids:** `typing.Optional[typing.Sequence[str]]` — List of voice ids that the user has played but not selected. Used for RLHF. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- -
@@ -2270,6 +2226,22 @@ client.text_to_voice.design(
+**remixing_session_id:** `typing.Optional[str]` — The remixing session id. + +
+
+ +
+
+ +**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + +
+
+ +
+
+ **quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety.
@@ -2566,6 +2538,14 @@ client.voices.search(
+**voice_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Voice IDs to lookup by. Maximum 100 voice IDs. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3519,7 +3499,7 @@ client.dubbing.list()
-**dubbing_status:** `typing.Optional[DubbingListRequestDubbingStatus]` — Status of the dubbing, either 'in_progress', 'completed' or 'failed'. +**dubbing_status:** `typing.Optional[DubbingListRequestDubbingStatus]` — What state the dub is currently in.
@@ -3667,6 +3647,14 @@ typing.Optional[core.File]` — See core.File for more documentation
+**target_accent:** `typing.Optional[str]` — [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + +
+
+ +
+
+ **num_speakers:** `typing.Optional[int]` — Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers
@@ -4773,6 +4761,67 @@ client.pronunciation_dictionaries.list()
+ +
+ + +## ServiceAccounts +
client.service_accounts.list() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all service accounts in the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.service_accounts.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -4861,7 +4910,7 @@ client.webhooks.list(
-Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. +Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript.
@@ -5029,6 +5078,14 @@ typing.Optional[core.File]` — See core.File for more documentation
+**use_multi_channel:** `typing.Optional[bool]` — Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -5593,7 +5650,7 @@ client.conversational_ai.conversations.get_signed_url(
-
client.conversational_ai.conversations.list(...) +
client.conversational_ai.conversations.get_webrtc_token(...)
@@ -5605,7 +5662,7 @@ client.conversational_ai.conversations.get_signed_url(
-Get all conversations of agents that user owns. With option to restrict to a specific agent. +Get a WebRTC session token for real-time communication.
@@ -5625,8 +5682,102 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.list() - +client.conversational_ai.conversations.get_webrtc_token( + agent_id="21m00Tcm4TlvDq8ikWAM", +) + +``` + +
+ +
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of the agent you're taking the action on. + +
+
+ +
+
+ +**participant_name:** `typing.Optional[str]` — Optional custom participant name. If not provided, user ID will be used + +
+
+ +
+
+ +**source:** `typing.Optional[ConversationInitiationSource]` — The source of the conversation initiation. + +
+
+ +
+
+ +**version:** `typing.Optional[str]` — The SDK version number + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + + + +
client.conversational_ai.conversations.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all conversations of agents that user owns. With option to restrict to a specific agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.conversations.list() + ```
@@ -5681,6 +5832,14 @@ client.conversational_ai.conversations.list()
+**user_id:** `typing.Optional[str]` — Filter conversations by the user ID who initiated them. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -5689,6 +5848,14 @@ client.conversational_ai.conversations.list()
+**summary_mode:** `typing.Optional[ConversationsListRequestSummaryMode]` — Whether to include transcript summaries in the response. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -6533,6 +6700,14 @@ client.conversational_ai.agents.simulate_conversation(
+**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -6625,6 +6800,14 @@ client.conversational_ai.agents.simulate_conversation_stream(
+**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11668,6 +11851,366 @@ client.pronunciation_dictionaries.rules.remove(
+
+
+
+ +## ServiceAccounts ApiKeys +
client.service_accounts.api_keys.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all API keys for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.service_accounts.api_keys.list( + service_account_user_id="service_account_user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.service_accounts.api_keys.create( + service_account_user_id="service_account_user_id", + name="name", + permissions=["text_to_speech"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**permissions:** `BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions` — The permissions of the XI API. + +
+
+ +
+
+ +**character_limit:** `typing.Optional[int]` — The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an existing API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.service_accounts.api_keys.delete( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**api_key_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.update(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an existing API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.service_accounts.api_keys.update( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", + is_enabled=True, + name="Sneaky Fox", + permissions=["text_to_speech"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**api_key_id:** `str` + +
+
+ +
+
+ +**is_enabled:** `bool` — Whether to enable or disable the API key. + +
+
+ +
+
+ +**name:** `str` — The name of the XI API key to use (used for identification purposes only). + +
+
+ +
+
+ +**permissions:** `BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions` — The permissions of the XI API. + +
+
+ +
+
+ +**character_limit:** `typing.Optional[int]` — The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -11767,9 +12310,6 @@ client = ElevenLabs( ) client.studio.projects.create( name="name", - default_title_voice_id="default_title_voice_id", - default_paragraph_voice_id="default_paragraph_voice_id", - default_model_id="default_model_id", ) ``` @@ -11794,7 +12334,7 @@ client.studio.projects.create(
-**default_title_voice_id:** `str` — The voice_id that corresponds to the default voice used for new titles. +**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles.
@@ -11802,7 +12342,7 @@ client.studio.projects.create(
-**default_paragraph_voice_id:** `str` — The voice_id that corresponds to the default voice used for new paragraphs. +**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs.
@@ -11810,7 +12350,7 @@ client.studio.projects.create(
-**default_model_id:** `str` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. +**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 658b1e5a..12099d71 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -57,33 +57,29 @@ BatchCallRecipientStatus, BatchCallResponse, BatchCallStatus, - BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost, - BodyAddProjectV1ProjectsAddPostApplyTextNormalization, - BodyAddProjectV1ProjectsAddPostFiction, - BodyAddProjectV1ProjectsAddPostSourceType, - BodyAddProjectV1ProjectsAddPostTargetAudience, - BodyAddToKnowledgeBaseV1ConvaiAddToKnowledgeBasePost, - BodyAddToKnowledgeBaseV1ConvaiAgentsAgentIdAddToKnowledgeBasePost, - BodyCreatePodcastV1ProjectsPodcastCreatePost, - BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation, - BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset, - BodyCreatePodcastV1ProjectsPodcastCreatePostSource, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url, - BodyEditBasicProjectInfoV1ProjectsProjectIdPost, - BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch, - BodyEditProjectContentV1ProjectsProjectIdContentPost, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, - BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost, - BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost, BreakdownTypes, BuiltInToolsInput, BuiltInToolsOutput, + CaptionStyleCharacterAnimationModel, + CaptionStyleCharacterAnimationModelEnterType, + CaptionStyleCharacterAnimationModelExitType, + CaptionStyleHorizontalPlacementModel, + CaptionStyleHorizontalPlacementModelAlign, + CaptionStyleModel, + CaptionStyleModelTextAlign, + CaptionStyleModelTextStyle, + CaptionStyleModelTextWeight, + CaptionStyleSectionAnimationModel, + CaptionStyleSectionAnimationModelEnterType, + CaptionStyleSectionAnimationModelExitType, + CaptionStyleTemplateModel, + CaptionStyleVerticalPlacementModel, + CaptionStyleVerticalPlacementModelAlign, + CaptionStyleWordAnimationModel, + CaptionStyleWordAnimationModelEnterType, + CaptionStyleWordAnimationModelExitType, ChapterContentBlockExtendableNodeResponseModel, ChapterContentBlockInputModel, ChapterContentBlockInputModelSubType, @@ -149,9 +145,25 @@ ConversationHistoryTranscriptCommonModelInput, ConversationHistoryTranscriptCommonModelInputRole, ConversationHistoryTranscriptCommonModelInputSourceMedium, + ConversationHistoryTranscriptCommonModelInputToolResultsItem, ConversationHistoryTranscriptCommonModelOutput, ConversationHistoryTranscriptCommonModelOutputRole, ConversationHistoryTranscriptCommonModelOutputSourceMedium, + ConversationHistoryTranscriptCommonModelOutputToolResultsItem, + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptOtherToolsResultCommonModelType, + ConversationHistoryTranscriptSystemToolResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModelResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, ConversationHistoryTranscriptToolCallClientDetails, ConversationHistoryTranscriptToolCallCommonModel, ConversationHistoryTranscriptToolCallCommonModelToolDetails, @@ -160,7 +172,6 @@ ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, ConversationHistoryTranscriptToolCallMcpDetails, ConversationHistoryTranscriptToolCallWebhookDetails, - ConversationHistoryTranscriptToolResultCommonModel, ConversationHistoryTwilioPhoneCallModel, ConversationHistoryTwilioPhoneCallModelDirection, ConversationInitiationClientDataConfigInput, @@ -174,6 +185,7 @@ ConversationInitiationClientDataWebhook, ConversationInitiationClientDataWebhookRequestHeadersValue, ConversationInitiationSource, + ConversationInitiationSourceInfo, ConversationSignedUrlResponseModel, ConversationSimulationSpecification, ConversationSimulationSpecificationDynamicVariablesValue, @@ -230,6 +242,8 @@ DubbingMetadataResponse, DubbingRenderResponseModel, DubbingResource, + DynamicVariableAssignment, + DynamicVariableUpdateCommonModel, DynamicVariablesConfig, DynamicVariablesConfigDynamicVariablePlaceholdersValue, EditChapterResponseModel, @@ -240,6 +254,7 @@ EmbedVariant, EmbeddingModelEnum, EndCallToolConfig, + EndCallToolResultModel, EvaluationSettings, EvaluationSuccessResult, ExportOptions, @@ -353,6 +368,7 @@ KnowledgeBaseLocator, LanguageAddedResponse, LanguageDetectionToolConfig, + LanguageDetectionToolResultModel, LanguagePresetInput, LanguagePresetOutput, LanguagePresetTranslation, @@ -402,6 +418,7 @@ ModerationStatusResponseModel, ModerationStatusResponseModelSafetyStatus, ModerationStatusResponseModelWarningStatus, + MultichannelSpeechToTextResponseModel, NormalizedAlignment, ObjectJsonSchemaPropertyInput, ObjectJsonSchemaPropertyInputPropertiesValue, @@ -419,6 +436,8 @@ PhoneNumberTransferTransferDestination, PhoneNumberTransferTransferDestination_Phone, PhoneNumberTransferTransferDestination_SipUri, + PlayDtmfResultErrorModel, + PlayDtmfResultSuccessModel, PlayDtmfToolConfig, PodcastBulletinMode, PodcastBulletinModeData, @@ -502,10 +521,12 @@ SafetyEvaluation, SafetyResponseModel, SafetyRule, + SaveVoicePreviewRequest, SecretDependencyType, SegmentCreateResponse, SegmentDeleteResponse, SegmentDubResponse, + SegmentSubtitleFrame, SegmentTranscriptionResponse, SegmentTranslationResponse, SegmentUpdateResponse, @@ -523,6 +544,7 @@ SipTrunkTransportEnum, SipUriTransferDestination, SkipTurnToolConfig, + SkipTurnToolResponseModel, SpeakerAudioResponseModel, SpeakerResponseModel, SpeakerSegment, @@ -558,6 +580,7 @@ SystemToolConfigInputParams_SkipTurn, SystemToolConfigInputParams_TransferToAgent, SystemToolConfigInputParams_TransferToNumber, + SystemToolConfigInputParams_VoicemailDetection, SystemToolConfigOutput, SystemToolConfigOutputParams, SystemToolConfigOutputParams_EndCall, @@ -566,10 +589,12 @@ SystemToolConfigOutputParams_SkipTurn, SystemToolConfigOutputParams_TransferToAgent, SystemToolConfigOutputParams_TransferToNumber, + SystemToolConfigOutputParams_VoicemailDetection, TelephonyProvider, TextToSpeechApplyTextNormalizationEnum, TextToSpeechOutputFormatEnum, TextToSpeechStreamRequest, + TokenResponseModel, Tool, ToolAnnotations, ToolMockConfig, @@ -585,8 +610,15 @@ ToolResponseModelToolConfig_Mcp, ToolResponseModelToolConfig_System, ToolResponseModelToolConfig_Webhook, + ToolType, + ToolUsageStatsResponseModel, ToolsResponseModel, TransferToAgentToolConfig, + TransferToAgentToolResultErrorModel, + TransferToAgentToolResultSuccessModel, + TransferToNumberResultErrorModel, + TransferToNumberResultSipSuccessModel, + TransferToNumberResultTwilioSuccessModel, TransferToNumberToolConfigInput, TransferToNumberToolConfigOutput, TransferTypeEnum, @@ -635,6 +667,7 @@ VoiceSharingResponseModelCategory, VoiceSharingState, VoiceVerificationResponse, + VoicemailDetectionToolConfig, WebhookAuthMethodType, WebhookToolApiSchemaConfigInput, WebhookToolApiSchemaConfigInputMethod, @@ -668,9 +701,15 @@ WidgetPlacement, WidgetStyles, WidgetTextContents, + WorkspaceApiKeyListResponseModel, + WorkspaceApiKeyResponseModel, + WorkspaceApiKeyResponseModelPermissionsItem, WorkspaceBatchCallsResponse, + WorkspaceCreateApiKeyResponseModel, WorkspaceGroupByNameResponseModel, WorkspaceResourceType, + WorkspaceServiceAccountListResponseModel, + WorkspaceServiceAccountResponseModel, WorkspaceWebhookListResponseModel, WorkspaceWebhookResponseModel, WorkspaceWebhookUsageResponseModel, @@ -686,6 +725,7 @@ models, pronunciation_dictionaries, samples, + service_accounts, speech_to_speech, speech_to_text, studio, @@ -721,7 +761,11 @@ SpeechToSpeechStreamRequestFileFormat, SpeechToSpeechStreamRequestOutputFormat, ) -from .speech_to_text import SpeechToTextConvertRequestFileFormat, SpeechToTextConvertRequestTimestampsGranularity +from .speech_to_text import ( + SpeechToTextConvertRequestFileFormat, + SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertResponse, +) from .studio import ( BodyCreatePodcastV1StudioPodcastsPostDurationScale, BodyCreatePodcastV1StudioPodcastsPostMode, @@ -818,23 +862,6 @@ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess", - "BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost", - "BodyAddProjectV1ProjectsAddPostApplyTextNormalization", - "BodyAddProjectV1ProjectsAddPostFiction", - "BodyAddProjectV1ProjectsAddPostSourceType", - "BodyAddProjectV1ProjectsAddPostTargetAudience", - "BodyAddToKnowledgeBaseV1ConvaiAddToKnowledgeBasePost", - "BodyAddToKnowledgeBaseV1ConvaiAgentsAgentIdAddToKnowledgeBasePost", - "BodyCreatePodcastV1ProjectsPodcastCreatePost", - "BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation", - "BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSource", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", @@ -844,13 +871,8 @@ "BodyCreatePodcastV1StudioPodcastsPostSourceItem", "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text", "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url", - "BodyEditBasicProjectInfoV1ProjectsProjectIdPost", - "BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch", - "BodyEditProjectContentV1ProjectsProjectIdContentPost", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", - "BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost", - "BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", @@ -858,6 +880,24 @@ "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", + "CaptionStyleCharacterAnimationModel", + "CaptionStyleCharacterAnimationModelEnterType", + "CaptionStyleCharacterAnimationModelExitType", + "CaptionStyleHorizontalPlacementModel", + "CaptionStyleHorizontalPlacementModelAlign", + "CaptionStyleModel", + "CaptionStyleModelTextAlign", + "CaptionStyleModelTextStyle", + "CaptionStyleModelTextWeight", + "CaptionStyleSectionAnimationModel", + "CaptionStyleSectionAnimationModelEnterType", + "CaptionStyleSectionAnimationModelExitType", + "CaptionStyleTemplateModel", + "CaptionStyleVerticalPlacementModel", + "CaptionStyleVerticalPlacementModelAlign", + "CaptionStyleWordAnimationModel", + "CaptionStyleWordAnimationModelEnterType", + "CaptionStyleWordAnimationModelExitType", "ChapterContentBlockExtendableNodeResponseModel", "ChapterContentBlockInputModel", "ChapterContentBlockInputModelSubType", @@ -923,9 +963,25 @@ "ConversationHistoryTranscriptCommonModelInput", "ConversationHistoryTranscriptCommonModelInputRole", "ConversationHistoryTranscriptCommonModelInputSourceMedium", + "ConversationHistoryTranscriptCommonModelInputToolResultsItem", "ConversationHistoryTranscriptCommonModelOutput", "ConversationHistoryTranscriptCommonModelOutputRole", "ConversationHistoryTranscriptCommonModelOutputSourceMedium", + "ConversationHistoryTranscriptCommonModelOutputToolResultsItem", + "ConversationHistoryTranscriptOtherToolsResultCommonModel", + "ConversationHistoryTranscriptOtherToolsResultCommonModelType", + "ConversationHistoryTranscriptSystemToolResultCommonModel", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess", "ConversationHistoryTranscriptToolCallClientDetails", "ConversationHistoryTranscriptToolCallCommonModel", "ConversationHistoryTranscriptToolCallCommonModelToolDetails", @@ -934,7 +990,6 @@ "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook", "ConversationHistoryTranscriptToolCallMcpDetails", "ConversationHistoryTranscriptToolCallWebhookDetails", - "ConversationHistoryTranscriptToolResultCommonModel", "ConversationHistoryTwilioPhoneCallModel", "ConversationHistoryTwilioPhoneCallModelDirection", "ConversationInitiationClientDataConfigInput", @@ -948,6 +1003,7 @@ "ConversationInitiationClientDataWebhook", "ConversationInitiationClientDataWebhookRequestHeadersValue", "ConversationInitiationSource", + "ConversationInitiationSourceInfo", "ConversationSignedUrlResponseModel", "ConversationSimulationSpecification", "ConversationSimulationSpecificationDynamicVariablesValue", @@ -1006,6 +1062,8 @@ "DubbingMetadataResponse", "DubbingRenderResponseModel", "DubbingResource", + "DynamicVariableAssignment", + "DynamicVariableUpdateCommonModel", "DynamicVariablesConfig", "DynamicVariablesConfigDynamicVariablePlaceholdersValue", "EditChapterResponseModel", @@ -1018,6 +1076,7 @@ "EmbedVariant", "EmbeddingModelEnum", "EndCallToolConfig", + "EndCallToolResultModel", "EvaluationSettings", "EvaluationSuccessResult", "ExportOptions", @@ -1133,6 +1192,7 @@ "KnowledgeBaseLocator", "LanguageAddedResponse", "LanguageDetectionToolConfig", + "LanguageDetectionToolResultModel", "LanguagePresetInput", "LanguagePresetOutput", "LanguagePresetTranslation", @@ -1182,6 +1242,7 @@ "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", + "MultichannelSpeechToTextResponseModel", "NormalizedAlignment", "NotFoundError", "ObjectJsonSchemaPropertyInput", @@ -1200,6 +1261,8 @@ "PhoneNumberTransferTransferDestination", "PhoneNumberTransferTransferDestination_Phone", "PhoneNumberTransferTransferDestination_SipUri", + "PlayDtmfResultErrorModel", + "PlayDtmfResultSuccessModel", "PlayDtmfToolConfig", "PodcastBulletinMode", "PodcastBulletinModeData", @@ -1287,10 +1350,12 @@ "SafetyEvaluation", "SafetyResponseModel", "SafetyRule", + "SaveVoicePreviewRequest", "SecretDependencyType", "SegmentCreateResponse", "SegmentDeleteResponse", "SegmentDubResponse", + "SegmentSubtitleFrame", "SegmentTranscriptionResponse", "SegmentTranslationResponse", "SegmentUpdateResponse", @@ -1310,6 +1375,7 @@ "SipTrunkTransportEnum", "SipUriTransferDestination", "SkipTurnToolConfig", + "SkipTurnToolResponseModel", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -1328,6 +1394,7 @@ "SpeechToTextChunkResponseModel", "SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertResponse", "SpeechToTextWordResponseModel", "SpeechToTextWordResponseModelType", "SrtExportOptions", @@ -1351,6 +1418,7 @@ "SystemToolConfigInputParams_SkipTurn", "SystemToolConfigInputParams_TransferToAgent", "SystemToolConfigInputParams_TransferToNumber", + "SystemToolConfigInputParams_VoicemailDetection", "SystemToolConfigOutput", "SystemToolConfigOutputParams", "SystemToolConfigOutputParams_EndCall", @@ -1359,6 +1427,7 @@ "SystemToolConfigOutputParams_SkipTurn", "SystemToolConfigOutputParams_TransferToAgent", "SystemToolConfigOutputParams_TransferToNumber", + "SystemToolConfigOutputParams_VoicemailDetection", "TelephonyProvider", "TextToDialogueConvertRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", @@ -1372,6 +1441,7 @@ "TextToSpeechStreamWithTimestampsRequestOutputFormat", "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", + "TokenResponseModel", "TooEarlyError", "Tool", "ToolAnnotations", @@ -1388,8 +1458,15 @@ "ToolResponseModelToolConfig_Mcp", "ToolResponseModelToolConfig_System", "ToolResponseModelToolConfig_Webhook", + "ToolType", + "ToolUsageStatsResponseModel", "ToolsResponseModel", "TransferToAgentToolConfig", + "TransferToAgentToolResultErrorModel", + "TransferToAgentToolResultSuccessModel", + "TransferToNumberResultErrorModel", + "TransferToNumberResultSipSuccessModel", + "TransferToNumberResultTwilioSuccessModel", "TransferToNumberToolConfigInput", "TransferToNumberToolConfigOutput", "TransferTypeEnum", @@ -1440,6 +1517,7 @@ "VoiceSharingResponseModelCategory", "VoiceSharingState", "VoiceVerificationResponse", + "VoicemailDetectionToolConfig", "VoicesGetSharedRequestCategory", "WebhookAuthMethodType", "WebhookToolApiSchemaConfigInput", @@ -1474,9 +1552,15 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkspaceApiKeyListResponseModel", + "WorkspaceApiKeyResponseModel", + "WorkspaceApiKeyResponseModelPermissionsItem", "WorkspaceBatchCallsResponse", + "WorkspaceCreateApiKeyResponseModel", "WorkspaceGroupByNameResponseModel", "WorkspaceResourceType", + "WorkspaceServiceAccountListResponseModel", + "WorkspaceServiceAccountResponseModel", "WorkspaceWebhookListResponseModel", "WorkspaceWebhookResponseModel", "WorkspaceWebhookUsageResponseModel", @@ -1492,6 +1576,7 @@ "pronunciation_dictionaries", "samples", "save", + "service_accounts", "speech_to_speech", "speech_to_text", "stream", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index 9ae595e3..51610a00 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -7,13 +7,16 @@ from .audio_native.client import AsyncAudioNativeClient, AudioNativeClient from .conversational_ai.client import AsyncConversationalAiClient, ConversationalAiClient from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .core.request_options import RequestOptions from .dubbing.client import AsyncDubbingClient, DubbingClient from .environment import ElevenLabsEnvironment from .forced_alignment.client import AsyncForcedAlignmentClient, ForcedAlignmentClient from .history.client import AsyncHistoryClient, HistoryClient from .models.client import AsyncModelsClient, ModelsClient from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient +from .raw_base_client import AsyncRawBaseElevenLabs, RawBaseElevenLabs from .samples.client import AsyncSamplesClient, SamplesClient +from .service_accounts.client import AsyncServiceAccountsClient, ServiceAccountsClient from .speech_to_speech.client import AsyncSpeechToSpeechClient, SpeechToSpeechClient from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient from .studio.client import AsyncStudioClient, StudioClient @@ -88,6 +91,7 @@ def __init__( else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) + self._raw_client = RawBaseElevenLabs(client_wrapper=self._client_wrapper) self.history = HistoryClient(client_wrapper=self._client_wrapper) self.text_to_sound_effects = TextToSoundEffectsClient(client_wrapper=self._client_wrapper) self.audio_isolation = AudioIsolationClient(client_wrapper=self._client_wrapper) @@ -104,12 +108,49 @@ def __init__( self.audio_native = AudioNativeClient(client_wrapper=self._client_wrapper) self.usage = UsageClient(client_wrapper=self._client_wrapper) self.pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) + self.service_accounts = ServiceAccountsClient(client_wrapper=self._client_wrapper) self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper) self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper) self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) + @property + def with_raw_response(self) -> RawBaseElevenLabs: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawBaseElevenLabs + """ + return self._raw_client + + def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Add a generated voice to the voice library. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.save_a_voice_preview() + """ + _response = self._raw_client.save_a_voice_preview(request_options=request_options) + return _response.data + class AsyncBaseElevenLabs: """ @@ -171,6 +212,7 @@ def __init__( else httpx.AsyncClient(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) + self._raw_client = AsyncRawBaseElevenLabs(client_wrapper=self._client_wrapper) self.history = AsyncHistoryClient(client_wrapper=self._client_wrapper) self.text_to_sound_effects = AsyncTextToSoundEffectsClient(client_wrapper=self._client_wrapper) self.audio_isolation = AsyncAudioIsolationClient(client_wrapper=self._client_wrapper) @@ -187,12 +229,57 @@ def __init__( self.audio_native = AsyncAudioNativeClient(client_wrapper=self._client_wrapper) self.usage = AsyncUsageClient(client_wrapper=self._client_wrapper) self.pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) + self.service_accounts = AsyncServiceAccountsClient(client_wrapper=self._client_wrapper) self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper) self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) + @property + def with_raw_response(self) -> AsyncRawBaseElevenLabs: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawBaseElevenLabs + """ + return self._raw_client + + async def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Add a generated voice to the voice library. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.save_a_voice_preview() + + + asyncio.run(main()) + """ + _response = await self._raw_client.save_a_voice_preview(request_options=request_options) + return _response.data + def _get_base_url(http://github.com/*,%20base_url:%20typing.Optional[str]%20=%20None,%20environment:%20ElevenLabsEnvironment) -> str: if base_url is not None: diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py index 269bd240..2db12114 100644 --- a/src/elevenlabs/conversational_ai/__init__.py +++ b/src/elevenlabs/conversational_ai/__init__.py @@ -17,6 +17,7 @@ tools, twilio, ) +from .conversations import ConversationsListRequestSummaryMode from .phone_numbers import ( PhoneNumbersCreateRequestBody, PhoneNumbersCreateRequestBody_SipTrunk, @@ -33,6 +34,7 @@ ) __all__ = [ + "ConversationsListRequestSummaryMode", "PhoneNumbersCreateRequestBody", "PhoneNumbersCreateRequestBody_SipTrunk", "PhoneNumbersCreateRequestBody_Twilio", diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index b10833a7..5da6be79 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -316,6 +316,7 @@ def simulate_conversation( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AgentSimulatedChatTestResponseModel: """ @@ -332,6 +333,9 @@ def simulate_conversation( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -361,6 +365,7 @@ def simulate_conversation( agent_id, simulation_specification=simulation_specification, extra_evaluation_criteria=extra_evaluation_criteria, + new_turns_limit=new_turns_limit, request_options=request_options, ) return _response.data @@ -371,6 +376,7 @@ def simulate_conversation_stream( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -387,6 +393,9 @@ def simulate_conversation_stream( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -415,6 +424,7 @@ def simulate_conversation_stream( agent_id, simulation_specification=simulation_specification, extra_evaluation_criteria=extra_evaluation_criteria, + new_turns_limit=new_turns_limit, request_options=request_options, ) return _response.data @@ -764,6 +774,7 @@ async def simulate_conversation( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AgentSimulatedChatTestResponseModel: """ @@ -780,6 +791,9 @@ async def simulate_conversation( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -817,6 +831,7 @@ async def main() -> None: agent_id, simulation_specification=simulation_specification, extra_evaluation_criteria=extra_evaluation_criteria, + new_turns_limit=new_turns_limit, request_options=request_options, ) return _response.data @@ -827,6 +842,7 @@ async def simulate_conversation_stream( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -843,6 +859,9 @@ async def simulate_conversation_stream( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -879,6 +898,7 @@ async def main() -> None: agent_id, simulation_specification=simulation_specification, extra_evaluation_criteria=extra_evaluation_criteria, + new_turns_limit=new_turns_limit, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index 0ca651fe..f8bdc1b9 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -425,6 +425,7 @@ def simulate_conversation( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AgentSimulatedChatTestResponseModel]: """ @@ -441,6 +442,9 @@ def simulate_conversation( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -461,6 +465,7 @@ def simulate_conversation( annotation=typing.Sequence[PromptEvaluationCriteria], direction="write", ), + "new_turns_limit": new_turns_limit, }, headers={ "content-type": "application/json", @@ -500,6 +505,7 @@ def simulate_conversation_stream( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ @@ -516,6 +522,9 @@ def simulate_conversation_stream( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -535,6 +544,7 @@ def simulate_conversation_stream( annotation=typing.Sequence[PromptEvaluationCriteria], direction="write", ), + "new_turns_limit": new_turns_limit, }, headers={ "content-type": "application/json", @@ -964,6 +974,7 @@ async def simulate_conversation( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AgentSimulatedChatTestResponseModel]: """ @@ -980,6 +991,9 @@ async def simulate_conversation( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1000,6 +1014,7 @@ async def simulate_conversation( annotation=typing.Sequence[PromptEvaluationCriteria], direction="write", ), + "new_turns_limit": new_turns_limit, }, headers={ "content-type": "application/json", @@ -1039,6 +1054,7 @@ async def simulate_conversation_stream( *, simulation_specification: ConversationSimulationSpecification, extra_evaluation_criteria: typing.Optional[typing.Sequence[PromptEvaluationCriteria]] = OMIT, + new_turns_limit: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ @@ -1055,6 +1071,9 @@ async def simulate_conversation_stream( extra_evaluation_criteria : typing.Optional[typing.Sequence[PromptEvaluationCriteria]] A list of evaluation criteria to test + new_turns_limit : typing.Optional[int] + Maximum number of new turns to generate in the conversation simulation + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1074,6 +1093,7 @@ async def simulate_conversation_stream( annotation=typing.Sequence[PromptEvaluationCriteria], direction="write", ), + "new_turns_limit": new_turns_limit, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/conversations/__init__.py b/src/elevenlabs/conversational_ai/conversations/__init__.py index 1e383816..b74bd4ce 100644 --- a/src/elevenlabs/conversational_ai/conversations/__init__.py +++ b/src/elevenlabs/conversational_ai/conversations/__init__.py @@ -2,6 +2,7 @@ # isort: skip_file +from .types import ConversationsListRequestSummaryMode from . import audio, feedback -__all__ = ["audio", "feedback"] +__all__ = ["ConversationsListRequestSummaryMode", "audio", "feedback"] diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index a661fbd0..092e646b 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -4,13 +4,16 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions +from ...types.conversation_initiation_source import ConversationInitiationSource from ...types.conversation_signed_url_response_model import ConversationSignedUrlResponseModel from ...types.evaluation_success_result import EvaluationSuccessResult from ...types.get_conversation_response_model import GetConversationResponseModel from ...types.get_conversations_page_response_model import GetConversationsPageResponseModel +from ...types.token_response_model import TokenResponseModel from .audio.client import AsyncAudioClient, AudioClient from .feedback.client import AsyncFeedbackClient, FeedbackClient from .raw_client import AsyncRawConversationsClient, RawConversationsClient +from .types.conversations_list_request_summary_mode import ConversationsListRequestSummaryMode class ConversationsClient: @@ -64,6 +67,60 @@ def get_signed_url( _response = self._raw_client.get_signed_url(http://github.com/agent_id=agent_id,%20request_options=request_options) return _response.data + def get_webrtc_token( + self, + *, + agent_id: str, + participant_name: typing.Optional[str] = None, + source: typing.Optional[ConversationInitiationSource] = None, + version: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> TokenResponseModel: + """ + Get a WebRTC session token for real-time communication. + + Parameters + ---------- + agent_id : str + The id of the agent you're taking the action on. + + participant_name : typing.Optional[str] + Optional custom participant name. If not provided, user ID will be used + + source : typing.Optional[ConversationInitiationSource] + The source of the conversation initiation. + + version : typing.Optional[str] + The SDK version number + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TokenResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.conversations.get_webrtc_token( + agent_id="21m00Tcm4TlvDq8ikWAM", + ) + """ + _response = self._raw_client.get_webrtc_token( + agent_id=agent_id, + participant_name=participant_name, + source=source, + version=version, + request_options=request_options, + ) + return _response.data + def list( self, *, @@ -72,7 +129,9 @@ def list( call_successful: typing.Optional[EvaluationSuccessResult] = None, call_start_before_unix: typing.Optional[int] = None, call_start_after_unix: typing.Optional[int] = None, + user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, + summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetConversationsPageResponseModel: """ @@ -95,9 +154,15 @@ def list( call_start_after_unix : typing.Optional[int] Unix timestamp (in seconds) to filter conversations after to this start date. + user_id : typing.Optional[str] + Filter conversations by the user ID who initiated them. + page_size : typing.Optional[int] How many conversations to return at maximum. Can not exceed 100, defaults to 30. + summary_mode : typing.Optional[ConversationsListRequestSummaryMode] + Whether to include transcript summaries in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -121,7 +186,9 @@ def list( call_successful=call_successful, call_start_before_unix=call_start_before_unix, call_start_after_unix=call_start_after_unix, + user_id=user_id, page_size=page_size, + summary_mode=summary_mode, request_options=request_options, ) return _response.data @@ -252,6 +319,68 @@ async def main() -> None: _response = await self._raw_client.get_signed_url(http://github.com/agent_id=agent_id,%20request_options=request_options) return _response.data + async def get_webrtc_token( + self, + *, + agent_id: str, + participant_name: typing.Optional[str] = None, + source: typing.Optional[ConversationInitiationSource] = None, + version: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> TokenResponseModel: + """ + Get a WebRTC session token for real-time communication. + + Parameters + ---------- + agent_id : str + The id of the agent you're taking the action on. + + participant_name : typing.Optional[str] + Optional custom participant name. If not provided, user ID will be used + + source : typing.Optional[ConversationInitiationSource] + The source of the conversation initiation. + + version : typing.Optional[str] + The SDK version number + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TokenResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.conversations.get_webrtc_token( + agent_id="21m00Tcm4TlvDq8ikWAM", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_webrtc_token( + agent_id=agent_id, + participant_name=participant_name, + source=source, + version=version, + request_options=request_options, + ) + return _response.data + async def list( self, *, @@ -260,7 +389,9 @@ async def list( call_successful: typing.Optional[EvaluationSuccessResult] = None, call_start_before_unix: typing.Optional[int] = None, call_start_after_unix: typing.Optional[int] = None, + user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, + summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetConversationsPageResponseModel: """ @@ -283,9 +414,15 @@ async def list( call_start_after_unix : typing.Optional[int] Unix timestamp (in seconds) to filter conversations after to this start date. + user_id : typing.Optional[str] + Filter conversations by the user ID who initiated them. + page_size : typing.Optional[int] How many conversations to return at maximum. Can not exceed 100, defaults to 30. + summary_mode : typing.Optional[ConversationsListRequestSummaryMode] + Whether to include transcript summaries in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -317,7 +454,9 @@ async def main() -> None: call_successful=call_successful, call_start_before_unix=call_start_before_unix, call_start_after_unix=call_start_after_unix, + user_id=user_id, page_size=page_size, + summary_mode=summary_mode, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py index 580e0a48..5e95db50 100644 --- a/src/elevenlabs/conversational_ai/conversations/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py @@ -10,11 +10,14 @@ from ...core.request_options import RequestOptions from ...core.unchecked_base_model import construct_type from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.conversation_initiation_source import ConversationInitiationSource from ...types.conversation_signed_url_response_model import ConversationSignedUrlResponseModel from ...types.evaluation_success_result import EvaluationSuccessResult from ...types.get_conversation_response_model import GetConversationResponseModel from ...types.get_conversations_page_response_model import GetConversationsPageResponseModel from ...types.http_validation_error import HttpValidationError +from ...types.token_response_model import TokenResponseModel +from .types.conversations_list_request_summary_mode import ConversationsListRequestSummaryMode class RawConversationsClient: @@ -74,6 +77,77 @@ def get_signed_url( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_webrtc_token( + self, + *, + agent_id: str, + participant_name: typing.Optional[str] = None, + source: typing.Optional[ConversationInitiationSource] = None, + version: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[TokenResponseModel]: + """ + Get a WebRTC session token for real-time communication. + + Parameters + ---------- + agent_id : str + The id of the agent you're taking the action on. + + participant_name : typing.Optional[str] + Optional custom participant name. If not provided, user ID will be used + + source : typing.Optional[ConversationInitiationSource] + The source of the conversation initiation. + + version : typing.Optional[str] + The SDK version number + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[TokenResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/conversation/token", + method="GET", + params={ + "agent_id": agent_id, + "participant_name": participant_name, + "source": source, + "version": version, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TokenResponseModel, + construct_type( + type_=TokenResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def list( self, *, @@ -82,7 +156,9 @@ def list( call_successful: typing.Optional[EvaluationSuccessResult] = None, call_start_before_unix: typing.Optional[int] = None, call_start_after_unix: typing.Optional[int] = None, + user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, + summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetConversationsPageResponseModel]: """ @@ -105,9 +181,15 @@ def list( call_start_after_unix : typing.Optional[int] Unix timestamp (in seconds) to filter conversations after to this start date. + user_id : typing.Optional[str] + Filter conversations by the user ID who initiated them. + page_size : typing.Optional[int] How many conversations to return at maximum. Can not exceed 100, defaults to 30. + summary_mode : typing.Optional[ConversationsListRequestSummaryMode] + Whether to include transcript summaries in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -125,7 +207,9 @@ def list( "call_successful": call_successful, "call_start_before_unix": call_start_before_unix, "call_start_after_unix": call_start_after_unix, + "user_id": user_id, "page_size": page_size, + "summary_mode": summary_mode, }, request_options=request_options, ) @@ -315,6 +399,77 @@ async def get_signed_url( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_webrtc_token( + self, + *, + agent_id: str, + participant_name: typing.Optional[str] = None, + source: typing.Optional[ConversationInitiationSource] = None, + version: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[TokenResponseModel]: + """ + Get a WebRTC session token for real-time communication. + + Parameters + ---------- + agent_id : str + The id of the agent you're taking the action on. + + participant_name : typing.Optional[str] + Optional custom participant name. If not provided, user ID will be used + + source : typing.Optional[ConversationInitiationSource] + The source of the conversation initiation. + + version : typing.Optional[str] + The SDK version number + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[TokenResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/conversation/token", + method="GET", + params={ + "agent_id": agent_id, + "participant_name": participant_name, + "source": source, + "version": version, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TokenResponseModel, + construct_type( + type_=TokenResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def list( self, *, @@ -323,7 +478,9 @@ async def list( call_successful: typing.Optional[EvaluationSuccessResult] = None, call_start_before_unix: typing.Optional[int] = None, call_start_after_unix: typing.Optional[int] = None, + user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, + summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetConversationsPageResponseModel]: """ @@ -346,9 +503,15 @@ async def list( call_start_after_unix : typing.Optional[int] Unix timestamp (in seconds) to filter conversations after to this start date. + user_id : typing.Optional[str] + Filter conversations by the user ID who initiated them. + page_size : typing.Optional[int] How many conversations to return at maximum. Can not exceed 100, defaults to 30. + summary_mode : typing.Optional[ConversationsListRequestSummaryMode] + Whether to include transcript summaries in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -366,7 +529,9 @@ async def list( "call_successful": call_successful, "call_start_before_unix": call_start_before_unix, "call_start_after_unix": call_start_after_unix, + "user_id": user_id, "page_size": page_size, + "summary_mode": summary_mode, }, request_options=request_options, ) diff --git a/src/elevenlabs/conversational_ai/conversations/types/__init__.py b/src/elevenlabs/conversational_ai/conversations/types/__init__.py new file mode 100644 index 00000000..ff647546 --- /dev/null +++ b/src/elevenlabs/conversational_ai/conversations/types/__init__.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .conversations_list_request_summary_mode import ConversationsListRequestSummaryMode + +__all__ = ["ConversationsListRequestSummaryMode"] diff --git a/src/elevenlabs/conversational_ai/conversations/types/conversations_list_request_summary_mode.py b/src/elevenlabs/conversational_ai/conversations/types/conversations_list_request_summary_mode.py new file mode 100644 index 00000000..f4dcc5d5 --- /dev/null +++ b/src/elevenlabs/conversational_ai/conversations/types/conversations_list_request_summary_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConversationsListRequestSummaryMode = typing.Union[typing.Literal["exclude", "include"], typing.Any] diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index a3b713fd..8d96ebef 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.8.1", + "User-Agent": "elevenlabs/v2.9.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.8.1", + "X-Fern-SDK-Version": "v2.9.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 38205f05..5d6b3e9e 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -61,7 +61,7 @@ def list( How many dubs to return at maximum. Can not exceed 200, defaults to 100. dubbing_status : typing.Optional[DubbingListRequestDubbingStatus] - Status of the dubbing, either 'in_progress', 'completed' or 'failed'. + What state the dub is currently in. filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. @@ -103,6 +103,7 @@ def create( source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, target_lang: typing.Optional[str] = OMIT, + target_accent: typing.Optional[str] = OMIT, num_speakers: typing.Optional[int] = OMIT, watermark: typing.Optional[bool] = OMIT, start_time: typing.Optional[int] = OMIT, @@ -145,6 +146,9 @@ def create( target_lang : typing.Optional[str] The Target language to dub the content into. + target_accent : typing.Optional[str] + [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + num_speakers : typing.Optional[int] Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers @@ -204,6 +208,7 @@ def create( source_url=source_url, source_lang=source_lang, target_lang=target_lang, + target_accent=target_accent, num_speakers=num_speakers, watermark=watermark, start_time=start_time, @@ -327,7 +332,7 @@ async def list( How many dubs to return at maximum. Can not exceed 200, defaults to 100. dubbing_status : typing.Optional[DubbingListRequestDubbingStatus] - Status of the dubbing, either 'in_progress', 'completed' or 'failed'. + What state the dub is currently in. filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. @@ -377,6 +382,7 @@ async def create( source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, target_lang: typing.Optional[str] = OMIT, + target_accent: typing.Optional[str] = OMIT, num_speakers: typing.Optional[int] = OMIT, watermark: typing.Optional[bool] = OMIT, start_time: typing.Optional[int] = OMIT, @@ -419,6 +425,9 @@ async def create( target_lang : typing.Optional[str] The Target language to dub the content into. + target_accent : typing.Optional[str] + [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + num_speakers : typing.Optional[int] Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers @@ -486,6 +495,7 @@ async def main() -> None: source_url=source_url, source_lang=source_lang, target_lang=target_lang, + target_accent=target_accent, num_speakers=num_speakers, watermark=watermark, start_time=start_time, diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index 0a47b22a..fcafc693 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -48,7 +48,7 @@ def list( How many dubs to return at maximum. Can not exceed 200, defaults to 100. dubbing_status : typing.Optional[DubbingListRequestDubbingStatus] - Status of the dubbing, either 'in_progress', 'completed' or 'failed'. + What state the dub is currently in. filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. @@ -109,6 +109,7 @@ def create( source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, target_lang: typing.Optional[str] = OMIT, + target_accent: typing.Optional[str] = OMIT, num_speakers: typing.Optional[int] = OMIT, watermark: typing.Optional[bool] = OMIT, start_time: typing.Optional[int] = OMIT, @@ -151,6 +152,9 @@ def create( target_lang : typing.Optional[str] The Target language to dub the content into. + target_accent : typing.Optional[str] + [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + num_speakers : typing.Optional[int] Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers @@ -200,6 +204,7 @@ def create( "source_url": source_url, "source_lang": source_lang, "target_lang": target_lang, + "target_accent": target_accent, "num_speakers": num_speakers, "watermark": watermark, "start_time": start_time, @@ -374,7 +379,7 @@ async def list( How many dubs to return at maximum. Can not exceed 200, defaults to 100. dubbing_status : typing.Optional[DubbingListRequestDubbingStatus] - Status of the dubbing, either 'in_progress', 'completed' or 'failed'. + What state the dub is currently in. filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. @@ -435,6 +440,7 @@ async def create( source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, target_lang: typing.Optional[str] = OMIT, + target_accent: typing.Optional[str] = OMIT, num_speakers: typing.Optional[int] = OMIT, watermark: typing.Optional[bool] = OMIT, start_time: typing.Optional[int] = OMIT, @@ -477,6 +483,9 @@ async def create( target_lang : typing.Optional[str] The Target language to dub the content into. + target_accent : typing.Optional[str] + [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + num_speakers : typing.Optional[int] Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers @@ -526,6 +535,7 @@ async def create( "source_url": source_url, "source_lang": source_lang, "target_lang": target_lang, + "target_accent": target_accent, "num_speakers": num_speakers, "watermark": watermark, "start_time": start_time, diff --git a/src/elevenlabs/raw_base_client.py b/src/elevenlabs/raw_base_client.py new file mode 100644 index 00000000..0cdebbe0 --- /dev/null +++ b/src/elevenlabs/raw_base_client.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .core.api_error import ApiError +from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .core.http_response import AsyncHttpResponse, HttpResponse +from .core.request_options import RequestOptions + + +class RawBaseElevenLabs: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: + """ + Add a generated voice to the voice library. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + "v1/text-to-voice/create-voice-from-preview", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawBaseElevenLabs: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def save_a_voice_preview( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Add a generated voice to the voice library. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/text-to-voice/create-voice-from-preview", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/service_accounts/__init__.py b/src/elevenlabs/service_accounts/__init__.py new file mode 100644 index 00000000..d76ea282 --- /dev/null +++ b/src/elevenlabs/service_accounts/__init__.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from . import api_keys +from .api_keys import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, +) + +__all__ = [ + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem", + "api_keys", +] diff --git a/src/elevenlabs/service_accounts/api_keys/__init__.py b/src/elevenlabs/service_accounts/api_keys/__init__.py new file mode 100644 index 00000000..7a460304 --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/__init__.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .types import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, +) + +__all__ = [ + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem", +] diff --git a/src/elevenlabs/service_accounts/api_keys/client.py b/src/elevenlabs/service_accounts/api_keys/client.py new file mode 100644 index 00000000..abf4bb4d --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/client.py @@ -0,0 +1,456 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.request_options import RequestOptions +from ...types.workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel +from ...types.workspace_create_api_key_response_model import WorkspaceCreateApiKeyResponseModel +from .raw_client import AsyncRawApiKeysClient, RawApiKeysClient +from .types.body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, +) +from .types.body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, +) + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ApiKeysClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawApiKeysClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawApiKeysClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawApiKeysClient + """ + return self._raw_client + + def list( + self, service_account_user_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> WorkspaceApiKeyListResponseModel: + """ + Get all API keys for a service account + + Parameters + ---------- + service_account_user_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceApiKeyListResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.service_accounts.api_keys.list( + service_account_user_id="service_account_user_id", + ) + """ + _response = self._raw_client.list(service_account_user_id, request_options=request_options) + return _response.data + + def create( + self, + service_account_user_id: str, + *, + name: str, + permissions: BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> WorkspaceCreateApiKeyResponseModel: + """ + Create a new API key for a service account + + Parameters + ---------- + service_account_user_id : str + + name : str + + permissions : BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceCreateApiKeyResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.service_accounts.api_keys.create( + service_account_user_id="service_account_user_id", + name="name", + permissions=["text_to_speech"], + ) + """ + _response = self._raw_client.create( + service_account_user_id, + name=name, + permissions=permissions, + character_limit=character_limit, + request_options=request_options, + ) + return _response.data + + def delete( + self, service_account_user_id: str, api_key_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Delete an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.service_accounts.api_keys.delete( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", + ) + """ + _response = self._raw_client.delete(service_account_user_id, api_key_id, request_options=request_options) + return _response.data + + def update( + self, + service_account_user_id: str, + api_key_id: str, + *, + is_enabled: bool, + name: str, + permissions: BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Update an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + is_enabled : bool + Whether to enable or disable the API key. + + name : str + The name of the XI API key to use (used for identification purposes only). + + permissions : BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.service_accounts.api_keys.update( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", + is_enabled=True, + name="Sneaky Fox", + permissions=["text_to_speech"], + ) + """ + _response = self._raw_client.update( + service_account_user_id, + api_key_id, + is_enabled=is_enabled, + name=name, + permissions=permissions, + character_limit=character_limit, + request_options=request_options, + ) + return _response.data + + +class AsyncApiKeysClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawApiKeysClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawApiKeysClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawApiKeysClient + """ + return self._raw_client + + async def list( + self, service_account_user_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> WorkspaceApiKeyListResponseModel: + """ + Get all API keys for a service account + + Parameters + ---------- + service_account_user_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceApiKeyListResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.service_accounts.api_keys.list( + service_account_user_id="service_account_user_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list(service_account_user_id, request_options=request_options) + return _response.data + + async def create( + self, + service_account_user_id: str, + *, + name: str, + permissions: BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> WorkspaceCreateApiKeyResponseModel: + """ + Create a new API key for a service account + + Parameters + ---------- + service_account_user_id : str + + name : str + + permissions : BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceCreateApiKeyResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.service_accounts.api_keys.create( + service_account_user_id="service_account_user_id", + name="name", + permissions=["text_to_speech"], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + service_account_user_id, + name=name, + permissions=permissions, + character_limit=character_limit, + request_options=request_options, + ) + return _response.data + + async def delete( + self, service_account_user_id: str, api_key_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Delete an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.service_accounts.api_keys.delete( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(service_account_user_id, api_key_id, request_options=request_options) + return _response.data + + async def update( + self, + service_account_user_id: str, + api_key_id: str, + *, + is_enabled: bool, + name: str, + permissions: BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Update an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + is_enabled : bool + Whether to enable or disable the API key. + + name : str + The name of the XI API key to use (used for identification purposes only). + + permissions : BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.service_accounts.api_keys.update( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", + is_enabled=True, + name="Sneaky Fox", + permissions=["text_to_speech"], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + service_account_user_id, + api_key_id, + is_enabled=is_enabled, + name=name, + permissions=permissions, + character_limit=character_limit, + request_options=request_options, + ) + return _response.data diff --git a/src/elevenlabs/service_accounts/api_keys/raw_client.py b/src/elevenlabs/service_accounts/api_keys/raw_client.py new file mode 100644 index 00000000..32ed3ab5 --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/raw_client.py @@ -0,0 +1,565 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.http_response import AsyncHttpResponse, HttpResponse +from ...core.jsonable_encoder import jsonable_encoder +from ...core.request_options import RequestOptions +from ...core.serialization import convert_and_respect_annotation_metadata +from ...core.unchecked_base_model import construct_type +from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.http_validation_error import HttpValidationError +from ...types.workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel +from ...types.workspace_create_api_key_response_model import WorkspaceCreateApiKeyResponseModel +from .types.body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, +) +from .types.body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, +) + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawApiKeysClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, service_account_user_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[WorkspaceApiKeyListResponseModel]: + """ + Get all API keys for a service account + + Parameters + ---------- + service_account_user_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WorkspaceApiKeyListResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceApiKeyListResponseModel, + construct_type( + type_=WorkspaceApiKeyListResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + service_account_user_id: str, + *, + name: str, + permissions: BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[WorkspaceCreateApiKeyResponseModel]: + """ + Create a new API key for a service account + + Parameters + ---------- + service_account_user_id : str + + name : str + + permissions : BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WorkspaceCreateApiKeyResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys", + method="POST", + json={ + "name": name, + "permissions": convert_and_respect_annotation_metadata( + object_=permissions, + annotation=BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + direction="write", + ), + "character_limit": character_limit, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceCreateApiKeyResponseModel, + construct_type( + type_=WorkspaceCreateApiKeyResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, service_account_user_id: str, api_key_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Delete an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys/{jsonable_encoder(api_key_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + service_account_user_id: str, + api_key_id: str, + *, + is_enabled: bool, + name: str, + permissions: BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Update an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + is_enabled : bool + Whether to enable or disable the API key. + + name : str + The name of the XI API key to use (used for identification purposes only). + + permissions : BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys/{jsonable_encoder(api_key_id)}", + method="PATCH", + json={ + "is_enabled": is_enabled, + "name": name, + "permissions": convert_and_respect_annotation_metadata( + object_=permissions, + annotation=BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + direction="write", + ), + "character_limit": character_limit, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawApiKeysClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, service_account_user_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[WorkspaceApiKeyListResponseModel]: + """ + Get all API keys for a service account + + Parameters + ---------- + service_account_user_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WorkspaceApiKeyListResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceApiKeyListResponseModel, + construct_type( + type_=WorkspaceApiKeyListResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + service_account_user_id: str, + *, + name: str, + permissions: BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[WorkspaceCreateApiKeyResponseModel]: + """ + Create a new API key for a service account + + Parameters + ---------- + service_account_user_id : str + + name : str + + permissions : BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WorkspaceCreateApiKeyResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys", + method="POST", + json={ + "name": name, + "permissions": convert_and_respect_annotation_metadata( + object_=permissions, + annotation=BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + direction="write", + ), + "character_limit": character_limit, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceCreateApiKeyResponseModel, + construct_type( + type_=WorkspaceCreateApiKeyResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, service_account_user_id: str, api_key_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Delete an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys/{jsonable_encoder(api_key_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + service_account_user_id: str, + api_key_id: str, + *, + is_enabled: bool, + name: str, + permissions: BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + character_limit: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Update an existing API key for a service account + + Parameters + ---------- + service_account_user_id : str + + api_key_id : str + + is_enabled : bool + Whether to enable or disable the API key. + + name : str + The name of the XI API key to use (used for identification purposes only). + + permissions : BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions + The permissions of the XI API. + + character_limit : typing.Optional[int] + The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/service-accounts/{jsonable_encoder(service_account_user_id)}/api-keys/{jsonable_encoder(api_key_id)}", + method="PATCH", + json={ + "is_enabled": is_enabled, + "name": name, + "permissions": convert_and_respect_annotation_metadata( + object_=permissions, + annotation=BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + direction="write", + ), + "character_limit": character_limit, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/service_accounts/api_keys/types/__init__.py b/src/elevenlabs/service_accounts/api_keys/types/__init__.py new file mode 100644 index 00000000..32b1c1cb --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/types/__init__.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, +) +from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, +) +from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, +) +from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, +) + +__all__ = [ + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem", +] diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions.py b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions.py new file mode 100644 index 00000000..81c637a7 --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions.py @@ -0,0 +1,12 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, +) + +BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions = typing.Union[ + typing.List[BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem], + typing.Literal["all"], +] diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py new file mode 100644 index 00000000..031a3011 --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem = typing.Union[ + typing.Literal[ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "models_read", + "models_write", + "voices_read", + "voices_write", + "speech_history_read", + "speech_history_write", + "sound_generation", + "audio_isolation", + "voice_generation", + "dubbing_read", + "dubbing_write", + "pronunciation_dictionaries_read", + "pronunciation_dictionaries_write", + "user_read", + "user_write", + "projects_read", + "projects_write", + "audio_native_read", + "audio_native_write", + "workspace_read", + "workspace_write", + "forced_alignment", + ], + typing.Any, +] diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions.py b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions.py new file mode 100644 index 00000000..04067dfa --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions.py @@ -0,0 +1,12 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, +) + +BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions = typing.Union[ + typing.List[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem], + typing.Literal["all"], +] diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py new file mode 100644 index 00000000..6e06ebef --- /dev/null +++ b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem = typing.Union[ + typing.Literal[ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "models_read", + "models_write", + "voices_read", + "voices_write", + "speech_history_read", + "speech_history_write", + "sound_generation", + "audio_isolation", + "voice_generation", + "dubbing_read", + "dubbing_write", + "pronunciation_dictionaries_read", + "pronunciation_dictionaries_write", + "user_read", + "user_write", + "projects_read", + "projects_write", + "audio_native_read", + "audio_native_write", + "workspace_read", + "workspace_write", + "forced_alignment", + ], + typing.Any, +] diff --git a/src/elevenlabs/service_accounts/client.py b/src/elevenlabs/service_accounts/client.py new file mode 100644 index 00000000..8611c612 --- /dev/null +++ b/src/elevenlabs/service_accounts/client.py @@ -0,0 +1,107 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel +from .api_keys.client import ApiKeysClient, AsyncApiKeysClient +from .raw_client import AsyncRawServiceAccountsClient, RawServiceAccountsClient + + +class ServiceAccountsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawServiceAccountsClient(client_wrapper=client_wrapper) + self.api_keys = ApiKeysClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawServiceAccountsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawServiceAccountsClient + """ + return self._raw_client + + def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> WorkspaceServiceAccountListResponseModel: + """ + List all service accounts in the workspace + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceServiceAccountListResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.service_accounts.list() + """ + _response = self._raw_client.list(request_options=request_options) + return _response.data + + +class AsyncServiceAccountsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawServiceAccountsClient(client_wrapper=client_wrapper) + self.api_keys = AsyncApiKeysClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawServiceAccountsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawServiceAccountsClient + """ + return self._raw_client + + async def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> WorkspaceServiceAccountListResponseModel: + """ + List all service accounts in the workspace + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WorkspaceServiceAccountListResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.service_accounts.list() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list(request_options=request_options) + return _response.data diff --git a/src/elevenlabs/service_accounts/raw_client.py b/src/elevenlabs/service_accounts/raw_client.py new file mode 100644 index 00000000..15df0f45 --- /dev/null +++ b/src/elevenlabs/service_accounts/raw_client.py @@ -0,0 +1,117 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.request_options import RequestOptions +from ..core.unchecked_base_model import construct_type +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..types.workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel + + +class RawServiceAccountsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[WorkspaceServiceAccountListResponseModel]: + """ + List all service accounts in the workspace + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WorkspaceServiceAccountListResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/service-accounts", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceServiceAccountListResponseModel, + construct_type( + type_=WorkspaceServiceAccountListResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawServiceAccountsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[WorkspaceServiceAccountListResponseModel]: + """ + List all service accounts in the workspace + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WorkspaceServiceAccountListResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/service-accounts", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkspaceServiceAccountListResponseModel, + construct_type( + type_=WorkspaceServiceAccountListResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/speech_to_text/__init__.py b/src/elevenlabs/speech_to_text/__init__.py index c1dda829..818c2134 100644 --- a/src/elevenlabs/speech_to_text/__init__.py +++ b/src/elevenlabs/speech_to_text/__init__.py @@ -2,6 +2,14 @@ # isort: skip_file -from .types import SpeechToTextConvertRequestFileFormat, SpeechToTextConvertRequestTimestampsGranularity +from .types import ( + SpeechToTextConvertRequestFileFormat, + SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertResponse, +) -__all__ = ["SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity"] +__all__ = [ + "SpeechToTextConvertRequestFileFormat", + "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertResponse", +] diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index 9c5de2b2..d6414828 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -6,10 +6,10 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.additional_formats import AdditionalFormats -from ..types.speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel from .raw_client import AsyncRawSpeechToTextClient, RawSpeechToTextClient from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .types.speech_to_text_convert_response import SpeechToTextConvertResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -49,10 +49,11 @@ def convert( webhook_id: typing.Optional[str] = OMIT, temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, + use_multi_channel: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> SpeechToTextChunkResponseModel: + ) -> SpeechToTextConvertResponse: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. Parameters ---------- @@ -104,12 +105,15 @@ def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + use_multi_channel : typing.Optional[bool] + Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - SpeechToTextChunkResponseModel + SpeechToTextConvertResponse Synchronous transcription result Examples @@ -140,6 +144,7 @@ def convert( webhook_id=webhook_id, temperature=temperature, seed=seed, + use_multi_channel=use_multi_channel, request_options=request_options, ) return _response.data @@ -179,10 +184,11 @@ async def convert( webhook_id: typing.Optional[str] = OMIT, temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, + use_multi_channel: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> SpeechToTextChunkResponseModel: + ) -> SpeechToTextConvertResponse: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. Parameters ---------- @@ -234,12 +240,15 @@ async def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + use_multi_channel : typing.Optional[bool] + Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - SpeechToTextChunkResponseModel + SpeechToTextConvertResponse Synchronous transcription result Examples @@ -278,6 +287,7 @@ async def main() -> None: webhook_id=webhook_id, temperature=temperature, seed=seed, + use_multi_channel=use_multi_channel, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index c0238df7..4b62a1c6 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -14,9 +14,9 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.additional_formats import AdditionalFormats from ..types.http_validation_error import HttpValidationError -from ..types.speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .types.speech_to_text_convert_response import SpeechToTextConvertResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -45,10 +45,11 @@ def convert( webhook_id: typing.Optional[str] = OMIT, temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, + use_multi_channel: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[SpeechToTextChunkResponseModel]: + ) -> HttpResponse[SpeechToTextConvertResponse]: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. Parameters ---------- @@ -100,12 +101,15 @@ def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + use_multi_channel : typing.Optional[bool] + Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[SpeechToTextChunkResponseModel] + HttpResponse[SpeechToTextConvertResponse] Synchronous transcription result """ _response = self._client_wrapper.httpx_client.request( @@ -128,6 +132,7 @@ def convert( "webhook_id": webhook_id, "temperature": temperature, "seed": seed, + "use_multi_channel": use_multi_channel, }, files={ **({"file": file} if file is not None else {}), @@ -144,9 +149,9 @@ def convert( try: if 200 <= _response.status_code < 300: _data = typing.cast( - SpeechToTextChunkResponseModel, + SpeechToTextConvertResponse, construct_type( - type_=SpeechToTextChunkResponseModel, # type: ignore + type_=SpeechToTextConvertResponse, # type: ignore object_=_response.json(), ), ) @@ -191,10 +196,11 @@ async def convert( webhook_id: typing.Optional[str] = OMIT, temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, + use_multi_channel: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[SpeechToTextChunkResponseModel]: + ) -> AsyncHttpResponse[SpeechToTextConvertResponse]: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. Parameters ---------- @@ -246,12 +252,15 @@ async def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + use_multi_channel : typing.Optional[bool] + Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[SpeechToTextChunkResponseModel] + AsyncHttpResponse[SpeechToTextConvertResponse] Synchronous transcription result """ _response = await self._client_wrapper.httpx_client.request( @@ -274,6 +283,7 @@ async def convert( "webhook_id": webhook_id, "temperature": temperature, "seed": seed, + "use_multi_channel": use_multi_channel, }, files={ **({"file": file} if file is not None else {}), @@ -290,9 +300,9 @@ async def convert( try: if 200 <= _response.status_code < 300: _data = typing.cast( - SpeechToTextChunkResponseModel, + SpeechToTextConvertResponse, construct_type( - type_=SpeechToTextChunkResponseModel, # type: ignore + type_=SpeechToTextConvertResponse, # type: ignore object_=_response.json(), ), ) diff --git a/src/elevenlabs/speech_to_text/types/__init__.py b/src/elevenlabs/speech_to_text/types/__init__.py index 6601472c..2c7956eb 100644 --- a/src/elevenlabs/speech_to_text/types/__init__.py +++ b/src/elevenlabs/speech_to_text/types/__init__.py @@ -4,5 +4,10 @@ from .speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .speech_to_text_convert_response import SpeechToTextConvertResponse -__all__ = ["SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity"] +__all__ = [ + "SpeechToTextConvertRequestFileFormat", + "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertResponse", +] diff --git a/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py new file mode 100644 index 00000000..0c6220bb --- /dev/null +++ b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel +from ...types.speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel + +SpeechToTextConvertResponse = typing.Union[SpeechToTextChunkResponseModel, MultichannelSpeechToTextResponseModel] diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index ebc8decb..03c377cc 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -77,9 +77,9 @@ def create( self, *, name: str, - default_title_voice_id: str, - default_paragraph_voice_id: str, - default_model_id: str, + default_title_voice_id: typing.Optional[str] = OMIT, + default_paragraph_voice_id: typing.Optional[str] = OMIT, + default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, @@ -113,13 +113,13 @@ def create( name : str The name of the Studio project, used for identification only. - default_title_voice_id : str + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. - default_paragraph_voice_id : str + default_paragraph_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new paragraphs. - default_model_id : str + default_model_id : typing.Optional[str] The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. from_url : typing.Optional[str] @@ -276,9 +276,6 @@ def create( ) client.studio.projects.create( name="name", - default_title_voice_id="default_title_voice_id", - default_paragraph_voice_id="default_paragraph_voice_id", - default_model_id="default_model_id", ) """ _response = self._raw_client.create( @@ -550,9 +547,9 @@ async def create( self, *, name: str, - default_title_voice_id: str, - default_paragraph_voice_id: str, - default_model_id: str, + default_title_voice_id: typing.Optional[str] = OMIT, + default_paragraph_voice_id: typing.Optional[str] = OMIT, + default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, @@ -586,13 +583,13 @@ async def create( name : str The name of the Studio project, used for identification only. - default_title_voice_id : str + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. - default_paragraph_voice_id : str + default_paragraph_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new paragraphs. - default_model_id : str + default_model_id : typing.Optional[str] The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. from_url : typing.Optional[str] @@ -754,9 +751,6 @@ async def create( async def main() -> None: await client.studio.projects.create( name="name", - default_title_voice_id="default_title_voice_id", - default_paragraph_voice_id="default_paragraph_voice_id", - default_model_id="default_model_id", ) diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py index 9f9e4b0c..058fa17d 100644 --- a/src/elevenlabs/studio/projects/raw_client.py +++ b/src/elevenlabs/studio/projects/raw_client.py @@ -80,9 +80,9 @@ def create( self, *, name: str, - default_title_voice_id: str, - default_paragraph_voice_id: str, - default_model_id: str, + default_title_voice_id: typing.Optional[str] = OMIT, + default_paragraph_voice_id: typing.Optional[str] = OMIT, + default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, @@ -116,13 +116,13 @@ def create( name : str The name of the Studio project, used for identification only. - default_title_voice_id : str + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. - default_paragraph_voice_id : str + default_paragraph_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new paragraphs. - default_model_id : str + default_model_id : typing.Optional[str] The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. from_url : typing.Optional[str] @@ -634,9 +634,9 @@ async def create( self, *, name: str, - default_title_voice_id: str, - default_paragraph_voice_id: str, - default_model_id: str, + default_title_voice_id: typing.Optional[str] = OMIT, + default_paragraph_voice_id: typing.Optional[str] = OMIT, + default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, @@ -670,13 +670,13 @@ async def create( name : str The name of the Studio project, used for identification only. - default_title_voice_id : str + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. - default_paragraph_voice_id : str + default_paragraph_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new paragraphs. - default_model_id : str + default_model_id : typing.Optional[str] The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. from_url : typing.Optional[str] diff --git a/src/elevenlabs/text_to_speech/client.py b/src/elevenlabs/text_to_speech/client.py index 0659c5b2..f8dd1e90 100644 --- a/src/elevenlabs/text_to_speech/client.py +++ b/src/elevenlabs/text_to_speech/client.py @@ -133,7 +133,7 @@ def convert( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -266,7 +266,7 @@ def convert_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -397,7 +397,7 @@ def stream( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -530,7 +530,7 @@ def stream_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -681,7 +681,7 @@ async def convert( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -823,7 +823,7 @@ async def convert_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -962,7 +962,7 @@ async def stream( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -1104,7 +1104,7 @@ async def stream_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. diff --git a/src/elevenlabs/text_to_speech/raw_client.py b/src/elevenlabs/text_to_speech/raw_client.py index db7bc925..6febd529 100644 --- a/src/elevenlabs/text_to_speech/raw_client.py +++ b/src/elevenlabs/text_to_speech/raw_client.py @@ -132,7 +132,7 @@ def convert( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -293,7 +293,7 @@ def convert_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -452,7 +452,7 @@ def stream( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -614,7 +614,7 @@ def stream_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -795,7 +795,7 @@ async def convert( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -957,7 +957,7 @@ async def convert_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -1116,7 +1116,7 @@ async def stream( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. @@ -1279,7 +1279,7 @@ async def stream_with_timestamps( If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] - This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for 'eleven_turbo_v2_5' or 'eleven_flash_v2_5' models. + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. diff --git a/src/elevenlabs/text_to_voice/client.py b/src/elevenlabs/text_to_voice/client.py index 697f6758..6bec7b5b 100644 --- a/src/elevenlabs/text_to_voice/client.py +++ b/src/elevenlabs/text_to_voice/client.py @@ -106,67 +106,6 @@ def create_previews( ) return _response.data - def create_voice_from_preview( - self, - *, - voice_name: str, - voice_description: str, - generated_voice_id: str, - labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - played_not_selected_voice_ids: typing.Optional[typing.Sequence[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> Voice: - """ - Add a generated voice to the voice library. - - Parameters - ---------- - voice_name : str - Name to use for the created voice. - - voice_description : str - Description to use for the created voice. - - generated_voice_id : str - The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. - - labels : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Optional, metadata to add to the created voice. Defaults to None. - - played_not_selected_voice_ids : typing.Optional[typing.Sequence[str]] - List of voice ids that the user has played but not selected. Used for RLHF. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Voice - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.text_to_voice.create_voice_from_preview( - voice_name="Sassy squeaky mouse", - voice_description="A sassy squeaky mouse", - generated_voice_id="37HceQefKmEi3bGovXjL", - ) - """ - _response = self._raw_client.create_voice_from_preview( - voice_name=voice_name, - voice_description=voice_description, - generated_voice_id=generated_voice_id, - labels=labels, - played_not_selected_voice_ids=played_not_selected_voice_ids, - request_options=request_options, - ) - return _response.data - def create( self, *, @@ -240,6 +179,8 @@ def design( seed: typing.Optional[int] = OMIT, guidance_scale: typing.Optional[float] = OMIT, stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, quality: typing.Optional[float] = OMIT, reference_audio_base_64: typing.Optional[str] = OMIT, prompt_strength: typing.Optional[float] = OMIT, @@ -277,6 +218,12 @@ def design( stream_previews : typing.Optional[bool] Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + quality : typing.Optional[float] Higher quality results in better voice output but less variety. @@ -315,6 +262,8 @@ def design( seed=seed, guidance_scale=guidance_scale, stream_previews=stream_previews, + remixing_session_id=remixing_session_id, + remixing_session_iteration_id=remixing_session_iteration_id, quality=quality, reference_audio_base_64=reference_audio_base_64, prompt_strength=prompt_strength, @@ -421,75 +370,6 @@ async def main() -> None: ) return _response.data - async def create_voice_from_preview( - self, - *, - voice_name: str, - voice_description: str, - generated_voice_id: str, - labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - played_not_selected_voice_ids: typing.Optional[typing.Sequence[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> Voice: - """ - Add a generated voice to the voice library. - - Parameters - ---------- - voice_name : str - Name to use for the created voice. - - voice_description : str - Description to use for the created voice. - - generated_voice_id : str - The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. - - labels : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Optional, metadata to add to the created voice. Defaults to None. - - played_not_selected_voice_ids : typing.Optional[typing.Sequence[str]] - List of voice ids that the user has played but not selected. Used for RLHF. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Voice - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.text_to_voice.create_voice_from_preview( - voice_name="Sassy squeaky mouse", - voice_description="A sassy squeaky mouse", - generated_voice_id="37HceQefKmEi3bGovXjL", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_voice_from_preview( - voice_name=voice_name, - voice_description=voice_description, - generated_voice_id=generated_voice_id, - labels=labels, - played_not_selected_voice_ids=played_not_selected_voice_ids, - request_options=request_options, - ) - return _response.data - async def create( self, *, @@ -571,6 +451,8 @@ async def design( seed: typing.Optional[int] = OMIT, guidance_scale: typing.Optional[float] = OMIT, stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, quality: typing.Optional[float] = OMIT, reference_audio_base_64: typing.Optional[str] = OMIT, prompt_strength: typing.Optional[float] = OMIT, @@ -608,6 +490,12 @@ async def design( stream_previews : typing.Optional[bool] Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + quality : typing.Optional[float] Higher quality results in better voice output but less variety. @@ -654,6 +542,8 @@ async def main() -> None: seed=seed, guidance_scale=guidance_scale, stream_previews=stream_previews, + remixing_session_id=remixing_session_id, + remixing_session_iteration_id=remixing_session_iteration_id, quality=quality, reference_audio_base_64=reference_audio_base_64, prompt_strength=prompt_strength, diff --git a/src/elevenlabs/text_to_voice/raw_client.py b/src/elevenlabs/text_to_voice/raw_client.py index 1ad74deb..87542ffa 100644 --- a/src/elevenlabs/text_to_voice/raw_client.py +++ b/src/elevenlabs/text_to_voice/raw_client.py @@ -121,86 +121,6 @@ def create_previews( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def create_voice_from_preview( - self, - *, - voice_name: str, - voice_description: str, - generated_voice_id: str, - labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - played_not_selected_voice_ids: typing.Optional[typing.Sequence[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[Voice]: - """ - Add a generated voice to the voice library. - - Parameters - ---------- - voice_name : str - Name to use for the created voice. - - voice_description : str - Description to use for the created voice. - - generated_voice_id : str - The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. - - labels : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Optional, metadata to add to the created voice. Defaults to None. - - played_not_selected_voice_ids : typing.Optional[typing.Sequence[str]] - List of voice ids that the user has played but not selected. Used for RLHF. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[Voice] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/text-to-voice/create-voice-from-preview", - method="POST", - json={ - "voice_name": voice_name, - "voice_description": voice_description, - "generated_voice_id": generated_voice_id, - "labels": labels, - "played_not_selected_voice_ids": played_not_selected_voice_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Voice, - construct_type( - type_=Voice, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def create( self, *, @@ -293,6 +213,8 @@ def design( seed: typing.Optional[int] = OMIT, guidance_scale: typing.Optional[float] = OMIT, stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, quality: typing.Optional[float] = OMIT, reference_audio_base_64: typing.Optional[str] = OMIT, prompt_strength: typing.Optional[float] = OMIT, @@ -330,6 +252,12 @@ def design( stream_previews : typing.Optional[bool] Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + quality : typing.Optional[float] Higher quality results in better voice output but less variety. @@ -362,6 +290,8 @@ def design( "seed": seed, "guidance_scale": guidance_scale, "stream_previews": stream_previews, + "remixing_session_id": remixing_session_id, + "remixing_session_iteration_id": remixing_session_iteration_id, "quality": quality, "reference_audio_base64": reference_audio_base_64, "prompt_strength": prompt_strength, @@ -500,86 +430,6 @@ async def create_previews( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def create_voice_from_preview( - self, - *, - voice_name: str, - voice_description: str, - generated_voice_id: str, - labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - played_not_selected_voice_ids: typing.Optional[typing.Sequence[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[Voice]: - """ - Add a generated voice to the voice library. - - Parameters - ---------- - voice_name : str - Name to use for the created voice. - - voice_description : str - Description to use for the created voice. - - generated_voice_id : str - The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. - - labels : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Optional, metadata to add to the created voice. Defaults to None. - - played_not_selected_voice_ids : typing.Optional[typing.Sequence[str]] - List of voice ids that the user has played but not selected. Used for RLHF. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[Voice] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/text-to-voice/create-voice-from-preview", - method="POST", - json={ - "voice_name": voice_name, - "voice_description": voice_description, - "generated_voice_id": generated_voice_id, - "labels": labels, - "played_not_selected_voice_ids": played_not_selected_voice_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Voice, - construct_type( - type_=Voice, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def create( self, *, @@ -672,6 +522,8 @@ async def design( seed: typing.Optional[int] = OMIT, guidance_scale: typing.Optional[float] = OMIT, stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, quality: typing.Optional[float] = OMIT, reference_audio_base_64: typing.Optional[str] = OMIT, prompt_strength: typing.Optional[float] = OMIT, @@ -709,6 +561,12 @@ async def design( stream_previews : typing.Optional[bool] Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + quality : typing.Optional[float] Higher quality results in better voice output but less variety. @@ -741,6 +599,8 @@ async def design( "seed": seed, "guidance_scale": guidance_scale, "stream_previews": stream_previews, + "remixing_session_id": remixing_session_id, + "remixing_session_iteration_id": remixing_session_iteration_id, "quality": quality, "reference_audio_base64": reference_audio_base_64, "prompt_strength": prompt_strength, diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index c903fc6a..36270c35 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -58,63 +58,33 @@ from .batch_call_recipient_status import BatchCallRecipientStatus from .batch_call_response import BatchCallResponse from .batch_call_status import BatchCallStatus -from .body_add_chapter_to_a_project_v_1_projects_project_id_chapters_add_post import ( - BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost, -) -from .body_add_project_v_1_projects_add_post_apply_text_normalization import ( - BodyAddProjectV1ProjectsAddPostApplyTextNormalization, -) -from .body_add_project_v_1_projects_add_post_fiction import BodyAddProjectV1ProjectsAddPostFiction -from .body_add_project_v_1_projects_add_post_source_type import BodyAddProjectV1ProjectsAddPostSourceType -from .body_add_project_v_1_projects_add_post_target_audience import BodyAddProjectV1ProjectsAddPostTargetAudience -from .body_add_to_knowledge_base_v_1_convai_add_to_knowledge_base_post import ( - BodyAddToKnowledgeBaseV1ConvaiAddToKnowledgeBasePost, -) -from .body_add_to_knowledge_base_v_1_convai_agents_agent_id_add_to_knowledge_base_post import ( - BodyAddToKnowledgeBaseV1ConvaiAgentsAgentIdAddToKnowledgeBasePost, -) -from .body_create_podcast_v_1_projects_podcast_create_post import BodyCreatePodcastV1ProjectsPodcastCreatePost -from .body_create_podcast_v_1_projects_podcast_create_post_duration_scale import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale, -) -from .body_create_podcast_v_1_projects_podcast_create_post_mode import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostMode, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation, -) -from .body_create_podcast_v_1_projects_podcast_create_post_quality_preset import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset, -) -from .body_create_podcast_v_1_projects_podcast_create_post_source import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostSource, -) -from .body_create_podcast_v_1_projects_podcast_create_post_source_item import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url, -) -from .body_edit_basic_project_info_v_1_projects_project_id_post import BodyEditBasicProjectInfoV1ProjectsProjectIdPost -from .body_edit_chapter_v_1_projects_project_id_chapters_chapter_id_patch import ( - BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch, -) -from .body_edit_project_content_v_1_projects_project_id_content_post import ( - BodyEditProjectContentV1ProjectsProjectIdContentPost, -) from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age import ( BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, ) from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_gender import ( BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, ) -from .body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post import ( - BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost, -) -from .body_stream_project_audio_v_1_projects_project_id_snapshots_project_snapshot_id_stream_post import ( - BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost, -) from .breakdown_types import BreakdownTypes from .built_in_tools_input import BuiltInToolsInput from .built_in_tools_output import BuiltInToolsOutput +from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel +from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType +from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType +from .caption_style_horizontal_placement_model import CaptionStyleHorizontalPlacementModel +from .caption_style_horizontal_placement_model_align import CaptionStyleHorizontalPlacementModelAlign +from .caption_style_model import CaptionStyleModel +from .caption_style_model_text_align import CaptionStyleModelTextAlign +from .caption_style_model_text_style import CaptionStyleModelTextStyle +from .caption_style_model_text_weight import CaptionStyleModelTextWeight +from .caption_style_section_animation_model import CaptionStyleSectionAnimationModel +from .caption_style_section_animation_model_enter_type import CaptionStyleSectionAnimationModelEnterType +from .caption_style_section_animation_model_exit_type import CaptionStyleSectionAnimationModelExitType +from .caption_style_template_model import CaptionStyleTemplateModel +from .caption_style_vertical_placement_model import CaptionStyleVerticalPlacementModel +from .caption_style_vertical_placement_model_align import CaptionStyleVerticalPlacementModelAlign +from .caption_style_word_animation_model import CaptionStyleWordAnimationModel +from .caption_style_word_animation_model_enter_type import CaptionStyleWordAnimationModelEnterType +from .caption_style_word_animation_model_exit_type import CaptionStyleWordAnimationModelExitType from .chapter_content_block_extendable_node_response_model import ChapterContentBlockExtendableNodeResponseModel from .chapter_content_block_input_model import ChapterContentBlockInputModel from .chapter_content_block_input_model_sub_type import ChapterContentBlockInputModelSubType @@ -194,11 +164,39 @@ from .conversation_history_transcript_common_model_input_source_medium import ( ConversationHistoryTranscriptCommonModelInputSourceMedium, ) +from .conversation_history_transcript_common_model_input_tool_results_item import ( + ConversationHistoryTranscriptCommonModelInputToolResultsItem, +) from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput from .conversation_history_transcript_common_model_output_role import ConversationHistoryTranscriptCommonModelOutputRole from .conversation_history_transcript_common_model_output_source_medium import ( ConversationHistoryTranscriptCommonModelOutputSourceMedium, ) +from .conversation_history_transcript_common_model_output_tool_results_item import ( + ConversationHistoryTranscriptCommonModelOutputToolResultsItem, +) +from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, +) +from .conversation_history_transcript_other_tools_result_common_model_type import ( + ConversationHistoryTranscriptOtherToolsResultCommonModelType, +) +from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, +) +from .conversation_history_transcript_system_tool_result_common_model_result import ( + ConversationHistoryTranscriptSystemToolResultCommonModelResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, +) from .conversation_history_transcript_tool_call_client_details import ConversationHistoryTranscriptToolCallClientDetails from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel from .conversation_history_transcript_tool_call_common_model_tool_details import ( @@ -211,7 +209,6 @@ from .conversation_history_transcript_tool_call_webhook_details import ( ConversationHistoryTranscriptToolCallWebhookDetails, ) -from .conversation_history_transcript_tool_result_common_model import ConversationHistoryTranscriptToolResultCommonModel from .conversation_history_twilio_phone_call_model import ConversationHistoryTwilioPhoneCallModel from .conversation_history_twilio_phone_call_model_direction import ConversationHistoryTwilioPhoneCallModelDirection from .conversation_initiation_client_data_config_input import ConversationInitiationClientDataConfigInput @@ -233,6 +230,7 @@ ConversationInitiationClientDataWebhookRequestHeadersValue, ) from .conversation_initiation_source import ConversationInitiationSource +from .conversation_initiation_source_info import ConversationInitiationSourceInfo from .conversation_signed_url_response_model import ConversationSignedUrlResponseModel from .conversation_simulation_specification import ConversationSimulationSpecification from .conversation_simulation_specification_dynamic_variables_value import ( @@ -291,6 +289,8 @@ from .dubbing_metadata_response import DubbingMetadataResponse from .dubbing_render_response_model import DubbingRenderResponseModel from .dubbing_resource import DubbingResource +from .dynamic_variable_assignment import DynamicVariableAssignment +from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel from .dynamic_variables_config import DynamicVariablesConfig from .dynamic_variables_config_dynamic_variable_placeholders_value import ( DynamicVariablesConfigDynamicVariablePlaceholdersValue, @@ -303,6 +303,7 @@ from .embed_variant import EmbedVariant from .embedding_model_enum import EmbeddingModelEnum from .end_call_tool_config import EndCallToolConfig +from .end_call_tool_result_model import EndCallToolResultModel from .evaluation_settings import EvaluationSettings from .evaluation_success_result import EvaluationSuccessResult from .export_options import ( @@ -438,6 +439,7 @@ from .knowledge_base_locator import KnowledgeBaseLocator from .language_added_response import LanguageAddedResponse from .language_detection_tool_config import LanguageDetectionToolConfig +from .language_detection_tool_result_model import LanguageDetectionToolResultModel from .language_preset_input import LanguagePresetInput from .language_preset_output import LanguagePresetOutput from .language_preset_translation import LanguagePresetTranslation @@ -489,6 +491,7 @@ from .moderation_status_response_model import ModerationStatusResponseModel from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus +from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel from .normalized_alignment import NormalizedAlignment from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue @@ -508,6 +511,8 @@ PhoneNumberTransferTransferDestination_Phone, PhoneNumberTransferTransferDestination_SipUri, ) +from .play_dtmf_result_error_model import PlayDtmfResultErrorModel +from .play_dtmf_result_success_model import PlayDtmfResultSuccessModel from .play_dtmf_tool_config import PlayDtmfToolConfig from .podcast_bulletin_mode import PodcastBulletinMode from .podcast_bulletin_mode_data import PodcastBulletinModeData @@ -597,10 +602,12 @@ from .safety_evaluation import SafetyEvaluation from .safety_response_model import SafetyResponseModel from .safety_rule import SafetyRule +from .save_voice_preview_request import SaveVoicePreviewRequest from .secret_dependency_type import SecretDependencyType from .segment_create_response import SegmentCreateResponse from .segment_delete_response import SegmentDeleteResponse from .segment_dub_response import SegmentDubResponse +from .segment_subtitle_frame import SegmentSubtitleFrame from .segment_transcription_response import SegmentTranscriptionResponse from .segment_translation_response import SegmentTranslationResponse from .segment_update_response import SegmentUpdateResponse @@ -618,6 +625,7 @@ from .sip_trunk_transport_enum import SipTrunkTransportEnum from .sip_uri_transfer_destination import SipUriTransferDestination from .skip_turn_tool_config import SkipTurnToolConfig +from .skip_turn_tool_response_model import SkipTurnToolResponseModel from .speaker_audio_response_model import SpeakerAudioResponseModel from .speaker_response_model import SpeakerResponseModel from .speaker_segment import SpeakerSegment @@ -654,6 +662,7 @@ SystemToolConfigInputParams_SkipTurn, SystemToolConfigInputParams_TransferToAgent, SystemToolConfigInputParams_TransferToNumber, + SystemToolConfigInputParams_VoicemailDetection, ) from .system_tool_config_output import SystemToolConfigOutput from .system_tool_config_output_params import ( @@ -664,11 +673,13 @@ SystemToolConfigOutputParams_SkipTurn, SystemToolConfigOutputParams_TransferToAgent, SystemToolConfigOutputParams_TransferToNumber, + SystemToolConfigOutputParams_VoicemailDetection, ) from .telephony_provider import TelephonyProvider from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum from .text_to_speech_stream_request import TextToSpeechStreamRequest +from .token_response_model import TokenResponseModel from .tool import Tool from .tool_annotations import ToolAnnotations from .tool_mock_config import ToolMockConfig @@ -688,8 +699,15 @@ ToolResponseModelToolConfig_System, ToolResponseModelToolConfig_Webhook, ) +from .tool_type import ToolType +from .tool_usage_stats_response_model import ToolUsageStatsResponseModel from .tools_response_model import ToolsResponseModel from .transfer_to_agent_tool_config import TransferToAgentToolConfig +from .transfer_to_agent_tool_result_error_model import TransferToAgentToolResultErrorModel +from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel +from .transfer_to_number_result_error_model import TransferToNumberResultErrorModel +from .transfer_to_number_result_sip_success_model import TransferToNumberResultSipSuccessModel +from .transfer_to_number_result_twilio_success_model import TransferToNumberResultTwilioSuccessModel from .transfer_to_number_tool_config_input import TransferToNumberToolConfigInput from .transfer_to_number_tool_config_output import TransferToNumberToolConfigOutput from .transfer_type_enum import TransferTypeEnum @@ -738,6 +756,7 @@ from .voice_sharing_response_model_category import VoiceSharingResponseModelCategory from .voice_sharing_state import VoiceSharingState from .voice_verification_response import VoiceVerificationResponse +from .voicemail_detection_tool_config import VoicemailDetectionToolConfig from .webhook_auth_method_type import WebhookAuthMethodType from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput from .webhook_tool_api_schema_config_input_method import WebhookToolApiSchemaConfigInputMethod @@ -781,9 +800,15 @@ from .widget_placement import WidgetPlacement from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents +from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel +from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel +from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem from .workspace_batch_calls_response import WorkspaceBatchCallsResponse +from .workspace_create_api_key_response_model import WorkspaceCreateApiKeyResponseModel from .workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel from .workspace_resource_type import WorkspaceResourceType +from .workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel +from .workspace_service_account_response_model import WorkspaceServiceAccountResponseModel from .workspace_webhook_list_response_model import WorkspaceWebhookListResponseModel from .workspace_webhook_response_model import WorkspaceWebhookResponseModel from .workspace_webhook_usage_response_model import WorkspaceWebhookUsageResponseModel @@ -843,33 +868,29 @@ "BatchCallRecipientStatus", "BatchCallResponse", "BatchCallStatus", - "BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost", - "BodyAddProjectV1ProjectsAddPostApplyTextNormalization", - "BodyAddProjectV1ProjectsAddPostFiction", - "BodyAddProjectV1ProjectsAddPostSourceType", - "BodyAddProjectV1ProjectsAddPostTargetAudience", - "BodyAddToKnowledgeBaseV1ConvaiAddToKnowledgeBasePost", - "BodyAddToKnowledgeBaseV1ConvaiAgentsAgentIdAddToKnowledgeBasePost", - "BodyCreatePodcastV1ProjectsPodcastCreatePost", - "BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin", - "BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation", - "BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSource", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text", - "BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url", - "BodyEditBasicProjectInfoV1ProjectsProjectIdPost", - "BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch", - "BodyEditProjectContentV1ProjectsProjectIdContentPost", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", - "BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost", - "BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost", "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", + "CaptionStyleCharacterAnimationModel", + "CaptionStyleCharacterAnimationModelEnterType", + "CaptionStyleCharacterAnimationModelExitType", + "CaptionStyleHorizontalPlacementModel", + "CaptionStyleHorizontalPlacementModelAlign", + "CaptionStyleModel", + "CaptionStyleModelTextAlign", + "CaptionStyleModelTextStyle", + "CaptionStyleModelTextWeight", + "CaptionStyleSectionAnimationModel", + "CaptionStyleSectionAnimationModelEnterType", + "CaptionStyleSectionAnimationModelExitType", + "CaptionStyleTemplateModel", + "CaptionStyleVerticalPlacementModel", + "CaptionStyleVerticalPlacementModelAlign", + "CaptionStyleWordAnimationModel", + "CaptionStyleWordAnimationModelEnterType", + "CaptionStyleWordAnimationModelExitType", "ChapterContentBlockExtendableNodeResponseModel", "ChapterContentBlockInputModel", "ChapterContentBlockInputModelSubType", @@ -935,9 +956,25 @@ "ConversationHistoryTranscriptCommonModelInput", "ConversationHistoryTranscriptCommonModelInputRole", "ConversationHistoryTranscriptCommonModelInputSourceMedium", + "ConversationHistoryTranscriptCommonModelInputToolResultsItem", "ConversationHistoryTranscriptCommonModelOutput", "ConversationHistoryTranscriptCommonModelOutputRole", "ConversationHistoryTranscriptCommonModelOutputSourceMedium", + "ConversationHistoryTranscriptCommonModelOutputToolResultsItem", + "ConversationHistoryTranscriptOtherToolsResultCommonModel", + "ConversationHistoryTranscriptOtherToolsResultCommonModelType", + "ConversationHistoryTranscriptSystemToolResultCommonModel", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess", "ConversationHistoryTranscriptToolCallClientDetails", "ConversationHistoryTranscriptToolCallCommonModel", "ConversationHistoryTranscriptToolCallCommonModelToolDetails", @@ -946,7 +983,6 @@ "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook", "ConversationHistoryTranscriptToolCallMcpDetails", "ConversationHistoryTranscriptToolCallWebhookDetails", - "ConversationHistoryTranscriptToolResultCommonModel", "ConversationHistoryTwilioPhoneCallModel", "ConversationHistoryTwilioPhoneCallModelDirection", "ConversationInitiationClientDataConfigInput", @@ -960,6 +996,7 @@ "ConversationInitiationClientDataWebhook", "ConversationInitiationClientDataWebhookRequestHeadersValue", "ConversationInitiationSource", + "ConversationInitiationSourceInfo", "ConversationSignedUrlResponseModel", "ConversationSimulationSpecification", "ConversationSimulationSpecificationDynamicVariablesValue", @@ -1016,6 +1053,8 @@ "DubbingMetadataResponse", "DubbingRenderResponseModel", "DubbingResource", + "DynamicVariableAssignment", + "DynamicVariableUpdateCommonModel", "DynamicVariablesConfig", "DynamicVariablesConfigDynamicVariablePlaceholdersValue", "EditChapterResponseModel", @@ -1026,6 +1065,7 @@ "EmbedVariant", "EmbeddingModelEnum", "EndCallToolConfig", + "EndCallToolResultModel", "EvaluationSettings", "EvaluationSuccessResult", "ExportOptions", @@ -1139,6 +1179,7 @@ "KnowledgeBaseLocator", "LanguageAddedResponse", "LanguageDetectionToolConfig", + "LanguageDetectionToolResultModel", "LanguagePresetInput", "LanguagePresetOutput", "LanguagePresetTranslation", @@ -1188,6 +1229,7 @@ "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", + "MultichannelSpeechToTextResponseModel", "NormalizedAlignment", "ObjectJsonSchemaPropertyInput", "ObjectJsonSchemaPropertyInputPropertiesValue", @@ -1205,6 +1247,8 @@ "PhoneNumberTransferTransferDestination", "PhoneNumberTransferTransferDestination_Phone", "PhoneNumberTransferTransferDestination_SipUri", + "PlayDtmfResultErrorModel", + "PlayDtmfResultSuccessModel", "PlayDtmfToolConfig", "PodcastBulletinMode", "PodcastBulletinModeData", @@ -1288,10 +1332,12 @@ "SafetyEvaluation", "SafetyResponseModel", "SafetyRule", + "SaveVoicePreviewRequest", "SecretDependencyType", "SegmentCreateResponse", "SegmentDeleteResponse", "SegmentDubResponse", + "SegmentSubtitleFrame", "SegmentTranscriptionResponse", "SegmentTranslationResponse", "SegmentUpdateResponse", @@ -1309,6 +1355,7 @@ "SipTrunkTransportEnum", "SipUriTransferDestination", "SkipTurnToolConfig", + "SkipTurnToolResponseModel", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -1344,6 +1391,7 @@ "SystemToolConfigInputParams_SkipTurn", "SystemToolConfigInputParams_TransferToAgent", "SystemToolConfigInputParams_TransferToNumber", + "SystemToolConfigInputParams_VoicemailDetection", "SystemToolConfigOutput", "SystemToolConfigOutputParams", "SystemToolConfigOutputParams_EndCall", @@ -1352,10 +1400,12 @@ "SystemToolConfigOutputParams_SkipTurn", "SystemToolConfigOutputParams_TransferToAgent", "SystemToolConfigOutputParams_TransferToNumber", + "SystemToolConfigOutputParams_VoicemailDetection", "TelephonyProvider", "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechOutputFormatEnum", "TextToSpeechStreamRequest", + "TokenResponseModel", "Tool", "ToolAnnotations", "ToolMockConfig", @@ -1371,8 +1421,15 @@ "ToolResponseModelToolConfig_Mcp", "ToolResponseModelToolConfig_System", "ToolResponseModelToolConfig_Webhook", + "ToolType", + "ToolUsageStatsResponseModel", "ToolsResponseModel", "TransferToAgentToolConfig", + "TransferToAgentToolResultErrorModel", + "TransferToAgentToolResultSuccessModel", + "TransferToNumberResultErrorModel", + "TransferToNumberResultSipSuccessModel", + "TransferToNumberResultTwilioSuccessModel", "TransferToNumberToolConfigInput", "TransferToNumberToolConfigOutput", "TransferTypeEnum", @@ -1421,6 +1478,7 @@ "VoiceSharingResponseModelCategory", "VoiceSharingState", "VoiceVerificationResponse", + "VoicemailDetectionToolConfig", "WebhookAuthMethodType", "WebhookToolApiSchemaConfigInput", "WebhookToolApiSchemaConfigInputMethod", @@ -1454,9 +1512,15 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkspaceApiKeyListResponseModel", + "WorkspaceApiKeyResponseModel", + "WorkspaceApiKeyResponseModelPermissionsItem", "WorkspaceBatchCallsResponse", + "WorkspaceCreateApiKeyResponseModel", "WorkspaceGroupByNameResponseModel", "WorkspaceResourceType", + "WorkspaceServiceAccountListResponseModel", + "WorkspaceServiceAccountResponseModel", "WorkspaceWebhookListResponseModel", "WorkspaceWebhookResponseModel", "WorkspaceWebhookUsageResponseModel", diff --git a/src/elevenlabs/types/add_project_request.py b/src/elevenlabs/types/add_project_request.py index c44f47f8..7cbbb349 100644 --- a/src/elevenlabs/types/add_project_request.py +++ b/src/elevenlabs/types/add_project_request.py @@ -2,228 +2,4 @@ import typing -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .body_add_project_v_1_projects_add_post_apply_text_normalization import ( - BodyAddProjectV1ProjectsAddPostApplyTextNormalization, -) -from .body_add_project_v_1_projects_add_post_fiction import BodyAddProjectV1ProjectsAddPostFiction -from .body_add_project_v_1_projects_add_post_source_type import BodyAddProjectV1ProjectsAddPostSourceType -from .body_add_project_v_1_projects_add_post_target_audience import BodyAddProjectV1ProjectsAddPostTargetAudience - - -class AddProjectRequest(UncheckedBaseModel): - name: str = pydantic.Field() - """ - The name of the Studio project, used for identification only. - """ - - default_title_voice_id: str = pydantic.Field() - """ - The voice_id that corresponds to the default voice used for new titles. - """ - - default_paragraph_voice_id: str = pydantic.Field() - """ - The voice_id that corresponds to the default voice used for new paragraphs. - """ - - default_model_id: str = pydantic.Field() - """ - The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. - """ - - from_url: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - """ - - from_document: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - """ - - from_content_json: typing.Optional[str] = pydantic.Field(default=None) - """ - - An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - - Example: - [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}] - - """ - - quality_preset: typing.Optional[str] = pydantic.Field(default=None) - """ - Output quality of the generated audio. Must be one of: - standard - standard output format, 128kbps with 44.1kHz sample rate. - high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%. - ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%. - ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%. - """ - - title: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - author: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - description: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional description of the Studio project. - """ - - genres: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - An optional list of genres associated with the Studio project. - """ - - target_audience: typing.Optional[BodyAddProjectV1ProjectsAddPostTargetAudience] = pydantic.Field(default=None) - """ - An optional target audience of the Studio project. - """ - - language: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional language of the Studio project. Two-letter language code (ISO 639-1). - """ - - content_type: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional content type of the Studio project. - """ - - original_publication_date: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional original publication date of the Studio project, in the format YYYY-MM-DD or YYYY. - """ - - mature_content: typing.Optional[bool] = pydantic.Field(default=None) - """ - An optional specification of whether this Studio project contains mature content. - """ - - isbn_number: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - acx_volume_normalization: typing.Optional[bool] = pydantic.Field(default=None) - """ - [Deprecated] When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements - """ - - volume_normalization: typing.Optional[bool] = pydantic.Field(default=None) - """ - When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements - """ - - pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. - """ - - callback_url: typing.Optional[str] = pydantic.Field(default=None) - """ - - A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion - Messages: - 1. When project was converted successfully: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "success", - project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", - error_details: None, - } - } - 2. When project conversion failed: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "error", - project_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - - 3. When chapter was converted successfully: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "success", - chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", - error_details: None, - } - } - 4. When chapter conversion failed: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "error", - chapter_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - - """ - - fiction: typing.Optional[BodyAddProjectV1ProjectsAddPostFiction] = pydantic.Field(default=None) - """ - An optional specification of whether the content of this Studio project is fiction. - """ - - apply_text_normalization: typing.Optional[BodyAddProjectV1ProjectsAddPostApplyTextNormalization] = pydantic.Field( - default=None - ) - """ - - This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. - When set to 'auto', the system will automatically decide whether to apply text normalization - (e.g., spelling out numbers). With 'on', text normalization will always be applied, while - with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. - - """ - - auto_convert: typing.Optional[bool] = pydantic.Field(default=None) - """ - Whether to auto convert the Studio project to audio or not. - """ - - auto_assign_voices: typing.Optional[bool] = pydantic.Field(default=None) - """ - [Alpha Feature] Whether automatically assign voices to phrases in the create Project. - """ - - source_type: typing.Optional[BodyAddProjectV1ProjectsAddPostSourceType] = pydantic.Field(default=None) - """ - The type of Studio project to create. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +AddProjectRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/agent_summary_response_model.py b/src/elevenlabs/types/agent_summary_response_model.py index 622ad10d..e16af45d 100644 --- a/src/elevenlabs/types/agent_summary_response_model.py +++ b/src/elevenlabs/types/agent_summary_response_model.py @@ -34,6 +34,11 @@ class AgentSummaryResponseModel(UncheckedBaseModel): The access information of the agent """ + last_call_time_unix_secs: typing.Optional[int] = pydantic.Field(default=None) + """ + The time of the most recent call in unix seconds, null if no calls have been made + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/asr_provider.py b/src/elevenlabs/types/asr_provider.py index 96137fe0..af99d4a7 100644 --- a/src/elevenlabs/types/asr_provider.py +++ b/src/elevenlabs/types/asr_provider.py @@ -2,4 +2,4 @@ import typing -AsrProvider = typing.Union[typing.Literal["elevenlabs", "realtime_scribe_v1"], typing.Any] +AsrProvider = typing.Literal["elevenlabs"] diff --git a/src/elevenlabs/types/batch_call_recipient_status.py b/src/elevenlabs/types/batch_call_recipient_status.py index d4676b7a..c3603624 100644 --- a/src/elevenlabs/types/batch_call_recipient_status.py +++ b/src/elevenlabs/types/batch_call_recipient_status.py @@ -3,5 +3,5 @@ import typing BatchCallRecipientStatus = typing.Union[ - typing.Literal["pending", "initiated", "in_progress", "completed", "failed", "cancelled"], typing.Any + typing.Literal["pending", "initiated", "in_progress", "completed", "failed", "cancelled", "voicemail"], typing.Any ] diff --git a/src/elevenlabs/types/body_add_chapter_to_a_project_v_1_projects_project_id_chapters_add_post.py b/src/elevenlabs/types/body_add_chapter_to_a_project_v_1_projects_project_id_chapters_add_post.py deleted file mode 100644 index 636d9b8f..00000000 --- a/src/elevenlabs/types/body_add_chapter_to_a_project_v_1_projects_project_id_chapters_add_post.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost(UncheckedBaseModel): - name: str = pydantic.Field() - """ - The name of the chapter, used for identification only. - """ - - from_url: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_apply_text_normalization.py b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_apply_text_normalization.py deleted file mode 100644 index bce6ce84..00000000 --- a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_apply_text_normalization.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyAddProjectV1ProjectsAddPostApplyTextNormalization = typing.Union[ - typing.Literal["auto", "on", "off", "apply_english"], typing.Any -] diff --git a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_fiction.py b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_fiction.py deleted file mode 100644 index e7196713..00000000 --- a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_fiction.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyAddProjectV1ProjectsAddPostFiction = typing.Union[typing.Literal["fiction", "non-fiction"], typing.Any] diff --git a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py deleted file mode 100644 index 9879b4f0..00000000 --- a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyAddProjectV1ProjectsAddPostSourceType = typing.Union[ - typing.Literal["blank", "book", "article", "genfm", "video"], typing.Any -] diff --git a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_target_audience.py b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_target_audience.py deleted file mode 100644 index 82ab63f5..00000000 --- a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_target_audience.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyAddProjectV1ProjectsAddPostTargetAudience = typing.Union[ - typing.Literal["children", "young adult", "adult", "all ages"], typing.Any -] diff --git a/src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_agents_agent_id_add_to_knowledge_base_post.py b/src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_agents_agent_id_add_to_knowledge_base_post.py deleted file mode 100644 index 7f81e9ee..00000000 --- a/src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_agents_agent_id_add_to_knowledge_base_post.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class BodyAddToKnowledgeBaseV1ConvaiAgentsAgentIdAddToKnowledgeBasePost(UncheckedBaseModel): - name: typing.Optional[str] = pydantic.Field(default=None) - """ - A custom, human-readable name for the document. - """ - - url: typing.Optional[str] = pydantic.Field(default=None) - """ - URL to a page of documentation that the agent will have access to in order to interact with users. - """ - - file: typing.Optional[str] = pydantic.Field(default=None) - """ - Documentation that the agent will have access to in order to interact with users. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post.py deleted file mode 100644 index 1038ec22..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post.py +++ /dev/null @@ -1,148 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .body_create_podcast_v_1_projects_podcast_create_post_duration_scale import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale, -) -from .body_create_podcast_v_1_projects_podcast_create_post_mode import BodyCreatePodcastV1ProjectsPodcastCreatePostMode -from .body_create_podcast_v_1_projects_podcast_create_post_quality_preset import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset, -) -from .body_create_podcast_v_1_projects_podcast_create_post_source import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostSource, -) - - -class BodyCreatePodcastV1ProjectsPodcastCreatePost(UncheckedBaseModel): - model_id: str = pydantic.Field() - """ - The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. - """ - - mode: BodyCreatePodcastV1ProjectsPodcastCreatePostMode = pydantic.Field() - """ - The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. - """ - - source: BodyCreatePodcastV1ProjectsPodcastCreatePostSource = pydantic.Field() - """ - The source content for the Podcast. - """ - - quality_preset: typing.Optional[BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset] = pydantic.Field( - default=None - ) - """ - Output quality of the generated audio. Must be one of: - standard - standard output format, 128kbps with 44.1kHz sample rate. - high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%. - ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%. - ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%. - """ - - duration_scale: typing.Optional[BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale] = pydantic.Field( - default=None - ) - """ - Duration of the generated podcast. Must be one of: - short - produces podcasts shorter than 3 minutes. - default - produces podcasts roughly between 3-7 minutes. - long - produces podcasts longer than 7 minutes. - """ - - language: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional language of the Studio project. Two-letter language code (ISO 639-1). - """ - - intro: typing.Optional[str] = pydantic.Field(default=None) - """ - The intro text that will always be added to the beginning of the podcast. - """ - - outro: typing.Optional[str] = pydantic.Field(default=None) - """ - The outro text that will always be added to the end of the podcast. - """ - - instructions_prompt: typing.Optional[str] = pydantic.Field(default=None) - """ - Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone. - """ - - highlights: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - A brief summary or highlights of the Studio project's content, providing key points or themes. This should be between 10 and 70 characters. - """ - - callback_url: typing.Optional[str] = pydantic.Field(default=None) - """ - - A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion - Messages: - 1. When project was converted successfully: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "success", - project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", - error_details: None, - } - } - 2. When project conversion failed: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "error", - project_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - - 3. When chapter was converted successfully: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "success", - chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", - error_details: None, - } - } - 4. When chapter conversion failed: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "error", - chapter_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_duration_scale.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_duration_scale.py deleted file mode 100644 index 671a7365..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_duration_scale.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyCreatePodcastV1ProjectsPodcastCreatePostDurationScale = typing.Union[ - typing.Literal["short", "default", "long"], typing.Any -] diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_mode.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_mode.py deleted file mode 100644 index 07b6edcb..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_mode.py +++ /dev/null @@ -1,57 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .podcast_bulletin_mode_data import PodcastBulletinModeData -from .podcast_conversation_mode_data import PodcastConversationModeData - - -class BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation(UncheckedBaseModel): - """ - The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. - """ - - type: typing.Literal["conversation"] = "conversation" - conversation: PodcastConversationModeData - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin(UncheckedBaseModel): - """ - The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. - """ - - type: typing.Literal["bulletin"] = "bulletin" - bulletin: PodcastBulletinModeData - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -BodyCreatePodcastV1ProjectsPodcastCreatePostMode = typing_extensions.Annotated[ - typing.Union[ - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation, - BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin, - ], - UnionMetadata(discriminant="type"), -] diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_quality_preset.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_quality_preset.py deleted file mode 100644 index 35327ccf..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_quality_preset.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyCreatePodcastV1ProjectsPodcastCreatePostQualityPreset = typing.Union[ - typing.Literal["standard", "high", "highest", "ultra", "ultra_lossless"], typing.Any -] diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source.py deleted file mode 100644 index d9bb466a..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source.py +++ /dev/null @@ -1,13 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .body_create_podcast_v_1_projects_podcast_create_post_source_item import ( - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem, -) -from .podcast_text_source import PodcastTextSource -from .podcast_url_source import PodcastUrlSource - -BodyCreatePodcastV1ProjectsPodcastCreatePostSource = typing.Union[ - PodcastTextSource, PodcastUrlSource, typing.List[BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem] -] diff --git a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source_item.py b/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source_item.py deleted file mode 100644 index 355f1fe8..00000000 --- a/src/elevenlabs/types/body_create_podcast_v_1_projects_podcast_create_post_source_item.py +++ /dev/null @@ -1,47 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text(UncheckedBaseModel): - type: typing.Literal["text"] = "text" - text: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url(UncheckedBaseModel): - type: typing.Literal["url"] = "url" - url: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem = typing_extensions.Annotated[ - typing.Union[ - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Text, - BodyCreatePodcastV1ProjectsPodcastCreatePostSourceItem_Url, - ], - UnionMetadata(discriminant="type"), -] diff --git a/src/elevenlabs/types/body_edit_basic_project_info_v_1_projects_project_id_post.py b/src/elevenlabs/types/body_edit_basic_project_info_v_1_projects_project_id_post.py deleted file mode 100644 index f66db011..00000000 --- a/src/elevenlabs/types/body_edit_basic_project_info_v_1_projects_project_id_post.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class BodyEditBasicProjectInfoV1ProjectsProjectIdPost(UncheckedBaseModel): - name: str = pydantic.Field() - """ - The name of the Studio project, used for identification only. - """ - - default_title_voice_id: str = pydantic.Field() - """ - The voice_id that corresponds to the default voice used for new titles. - """ - - default_paragraph_voice_id: str = pydantic.Field() - """ - The voice_id that corresponds to the default voice used for new paragraphs. - """ - - title: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - author: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - isbn_number: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download. - """ - - volume_normalization: typing.Optional[bool] = pydantic.Field(default=None) - """ - When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py b/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py deleted file mode 100644 index 8e2f94e4..00000000 --- a/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class BodyEditProjectContentV1ProjectsProjectIdContentPost(UncheckedBaseModel): - from_url: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - """ - - from_document: typing.Optional[str] = pydantic.Field(default=None) - """ - An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - """ - - from_content_json: typing.Optional[str] = pydantic.Field(default=None) - """ - - An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - - Example: - [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}] - - """ - - auto_convert: typing.Optional[bool] = pydantic.Field(default=None) - """ - Whether to auto convert the Studio project to audio or not. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/built_in_tools_input.py b/src/elevenlabs/types/built_in_tools_input.py index 44e64d13..4a1b5ddd 100644 --- a/src/elevenlabs/types/built_in_tools_input.py +++ b/src/elevenlabs/types/built_in_tools_input.py @@ -39,6 +39,11 @@ class BuiltInToolsInput(UncheckedBaseModel): The play DTMF tool """ + voicemail_detection: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The voicemail detection tool + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/built_in_tools_output.py b/src/elevenlabs/types/built_in_tools_output.py index 830946c3..4957e84d 100644 --- a/src/elevenlabs/types/built_in_tools_output.py +++ b/src/elevenlabs/types/built_in_tools_output.py @@ -39,6 +39,11 @@ class BuiltInToolsOutput(UncheckedBaseModel): The play DTMF tool """ + voicemail_detection: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The voicemail detection tool + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/caption_style_character_animation_model.py b/src/elevenlabs/types/caption_style_character_animation_model.py new file mode 100644 index 00000000..314a6614 --- /dev/null +++ b/src/elevenlabs/types/caption_style_character_animation_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType +from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType + + +class CaptionStyleCharacterAnimationModel(UncheckedBaseModel): + enter_type: CaptionStyleCharacterAnimationModelEnterType + exit_type: CaptionStyleCharacterAnimationModelExitType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_character_animation_model_enter_type.py b/src/elevenlabs/types/caption_style_character_animation_model_enter_type.py new file mode 100644 index 00000000..0c3530ca --- /dev/null +++ b/src/elevenlabs/types/caption_style_character_animation_model_enter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleCharacterAnimationModelEnterType = typing.Union[typing.Literal["none", "fade"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_character_animation_model_exit_type.py b/src/elevenlabs/types/caption_style_character_animation_model_exit_type.py new file mode 100644 index 00000000..1bcbaa73 --- /dev/null +++ b/src/elevenlabs/types/caption_style_character_animation_model_exit_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleCharacterAnimationModelExitType = typing.Union[typing.Literal["none", "fade"], typing.Any] diff --git a/src/elevenlabs/types/body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post.py b/src/elevenlabs/types/caption_style_horizontal_placement_model.py similarity index 65% rename from src/elevenlabs/types/body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post.py rename to src/elevenlabs/types/caption_style_horizontal_placement_model.py index e594033e..59df0e62 100644 --- a/src/elevenlabs/types/body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post.py +++ b/src/elevenlabs/types/caption_style_horizontal_placement_model.py @@ -5,15 +5,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_horizontal_placement_model_align import CaptionStyleHorizontalPlacementModelAlign -class BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost( - UncheckedBaseModel -): - convert_to_mpeg: typing.Optional[bool] = pydantic.Field(default=None) - """ - Whether to convert the audio to mpeg format. - """ +class CaptionStyleHorizontalPlacementModel(UncheckedBaseModel): + align: CaptionStyleHorizontalPlacementModelAlign + translate_pct: float if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/caption_style_horizontal_placement_model_align.py b/src/elevenlabs/types/caption_style_horizontal_placement_model_align.py new file mode 100644 index 00000000..070da028 --- /dev/null +++ b/src/elevenlabs/types/caption_style_horizontal_placement_model_align.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleHorizontalPlacementModelAlign = typing.Union[typing.Literal["left", "center", "right"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_model.py b/src/elevenlabs/types/caption_style_model.py new file mode 100644 index 00000000..81bdd163 --- /dev/null +++ b/src/elevenlabs/types/caption_style_model.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel +from .caption_style_horizontal_placement_model import CaptionStyleHorizontalPlacementModel +from .caption_style_model_text_align import CaptionStyleModelTextAlign +from .caption_style_model_text_style import CaptionStyleModelTextStyle +from .caption_style_model_text_weight import CaptionStyleModelTextWeight +from .caption_style_section_animation_model import CaptionStyleSectionAnimationModel +from .caption_style_template_model import CaptionStyleTemplateModel +from .caption_style_vertical_placement_model import CaptionStyleVerticalPlacementModel +from .caption_style_word_animation_model import CaptionStyleWordAnimationModel + + +class CaptionStyleModel(UncheckedBaseModel): + template: typing.Optional[CaptionStyleTemplateModel] = None + text_font: typing.Optional[str] = None + text_scale: typing.Optional[float] = None + text_color: typing.Optional[str] = None + text_align: typing.Optional[CaptionStyleModelTextAlign] = None + text_style: typing.Optional[CaptionStyleModelTextStyle] = None + text_weight: typing.Optional[CaptionStyleModelTextWeight] = None + background_enabled: typing.Optional[bool] = None + background_color: typing.Optional[str] = None + background_opacity: typing.Optional[float] = None + word_highlights_enabled: typing.Optional[bool] = None + word_highlights_color: typing.Optional[str] = None + word_highlights_background_color: typing.Optional[str] = None + word_highlights_opacity: typing.Optional[float] = None + section_animation: typing.Optional[CaptionStyleSectionAnimationModel] = None + word_animation: typing.Optional[CaptionStyleWordAnimationModel] = None + character_animation: typing.Optional[CaptionStyleCharacterAnimationModel] = None + width_pct: typing.Optional[float] = None + horizontal_placement: typing.Optional[CaptionStyleHorizontalPlacementModel] = None + vertical_placement: typing.Optional[CaptionStyleVerticalPlacementModel] = None + auto_break_enabled: typing.Optional[bool] = None + max_lines_per_section: typing.Optional[int] = None + max_words_per_line: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_model_text_align.py b/src/elevenlabs/types/caption_style_model_text_align.py new file mode 100644 index 00000000..4dc2f76a --- /dev/null +++ b/src/elevenlabs/types/caption_style_model_text_align.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleModelTextAlign = typing.Union[typing.Literal["start", "center", "end"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_model_text_style.py b/src/elevenlabs/types/caption_style_model_text_style.py new file mode 100644 index 00000000..e78d1b18 --- /dev/null +++ b/src/elevenlabs/types/caption_style_model_text_style.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleModelTextStyle = typing.Union[typing.Literal["normal", "italic"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_model_text_weight.py b/src/elevenlabs/types/caption_style_model_text_weight.py new file mode 100644 index 00000000..8432983e --- /dev/null +++ b/src/elevenlabs/types/caption_style_model_text_weight.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleModelTextWeight = typing.Union[typing.Literal["normal", "bold"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_section_animation_model.py b/src/elevenlabs/types/caption_style_section_animation_model.py new file mode 100644 index 00000000..ae5f9bd6 --- /dev/null +++ b/src/elevenlabs/types/caption_style_section_animation_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_section_animation_model_enter_type import CaptionStyleSectionAnimationModelEnterType +from .caption_style_section_animation_model_exit_type import CaptionStyleSectionAnimationModelExitType + + +class CaptionStyleSectionAnimationModel(UncheckedBaseModel): + enter_type: CaptionStyleSectionAnimationModelEnterType + exit_type: CaptionStyleSectionAnimationModelExitType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_section_animation_model_enter_type.py b/src/elevenlabs/types/caption_style_section_animation_model_enter_type.py new file mode 100644 index 00000000..7f1070e7 --- /dev/null +++ b/src/elevenlabs/types/caption_style_section_animation_model_enter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleSectionAnimationModelEnterType = typing.Union[typing.Literal["none", "fade", "scale"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_section_animation_model_exit_type.py b/src/elevenlabs/types/caption_style_section_animation_model_exit_type.py new file mode 100644 index 00000000..2490bd80 --- /dev/null +++ b/src/elevenlabs/types/caption_style_section_animation_model_exit_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleSectionAnimationModelExitType = typing.Union[typing.Literal["none", "fade", "scale"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_template_model.py b/src/elevenlabs/types/caption_style_template_model.py new file mode 100644 index 00000000..e2f7b6fe --- /dev/null +++ b/src/elevenlabs/types/caption_style_template_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CaptionStyleTemplateModel(UncheckedBaseModel): + key: str + label: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_vertical_placement_model.py b/src/elevenlabs/types/caption_style_vertical_placement_model.py new file mode 100644 index 00000000..40c946a0 --- /dev/null +++ b/src/elevenlabs/types/caption_style_vertical_placement_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_vertical_placement_model_align import CaptionStyleVerticalPlacementModelAlign + + +class CaptionStyleVerticalPlacementModel(UncheckedBaseModel): + align: CaptionStyleVerticalPlacementModelAlign + translate_pct: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_vertical_placement_model_align.py b/src/elevenlabs/types/caption_style_vertical_placement_model_align.py new file mode 100644 index 00000000..a27c9e94 --- /dev/null +++ b/src/elevenlabs/types/caption_style_vertical_placement_model_align.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleVerticalPlacementModelAlign = typing.Union[typing.Literal["top", "center", "bottom"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_word_animation_model.py b/src/elevenlabs/types/caption_style_word_animation_model.py new file mode 100644 index 00000000..1cab5d63 --- /dev/null +++ b/src/elevenlabs/types/caption_style_word_animation_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_word_animation_model_enter_type import CaptionStyleWordAnimationModelEnterType +from .caption_style_word_animation_model_exit_type import CaptionStyleWordAnimationModelExitType + + +class CaptionStyleWordAnimationModel(UncheckedBaseModel): + enter_type: CaptionStyleWordAnimationModelEnterType + exit_type: CaptionStyleWordAnimationModelExitType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_word_animation_model_enter_type.py b/src/elevenlabs/types/caption_style_word_animation_model_enter_type.py new file mode 100644 index 00000000..77058001 --- /dev/null +++ b/src/elevenlabs/types/caption_style_word_animation_model_enter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleWordAnimationModelEnterType = typing.Union[typing.Literal["none", "fade", "scale"], typing.Any] diff --git a/src/elevenlabs/types/caption_style_word_animation_model_exit_type.py b/src/elevenlabs/types/caption_style_word_animation_model_exit_type.py new file mode 100644 index 00000000..cb20ac5d --- /dev/null +++ b/src/elevenlabs/types/caption_style_word_animation_model_exit_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CaptionStyleWordAnimationModelExitType = typing.Union[typing.Literal["none", "fade", "scale"], typing.Any] diff --git a/src/elevenlabs/types/client_tool_config_input.py b/src/elevenlabs/types/client_tool_config_input.py index 2a61335d..433a2b11 100644 --- a/src/elevenlabs/types/client_tool_config_input.py +++ b/src/elevenlabs/types/client_tool_config_input.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig @@ -22,6 +23,21 @@ class ClientToolConfigInput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive). """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = pydantic.Field(default=None) """ Schema for any parameters to pass to the client diff --git a/src/elevenlabs/types/client_tool_config_output.py b/src/elevenlabs/types/client_tool_config_output.py index a5bf2ca6..ee2fa4aa 100644 --- a/src/elevenlabs/types/client_tool_config_output.py +++ b/src/elevenlabs/types/client_tool_config_output.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig @@ -22,6 +23,21 @@ class ClientToolConfigOutput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive). """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = pydantic.Field(default=None) """ Schema for any parameters to pass to the client diff --git a/src/elevenlabs/types/conversation_history_analysis_common_model.py b/src/elevenlabs/types/conversation_history_analysis_common_model.py index 4de32aba..be179583 100644 --- a/src/elevenlabs/types/conversation_history_analysis_common_model.py +++ b/src/elevenlabs/types/conversation_history_analysis_common_model.py @@ -19,6 +19,7 @@ class ConversationHistoryAnalysisCommonModel(UncheckedBaseModel): data_collection_results: typing.Optional[typing.Dict[str, DataCollectionResultCommonModel]] = None call_successful: EvaluationSuccessResult transcript_summary: str + call_summary_title: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py index b840fd94..472e4e16 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py @@ -9,8 +9,10 @@ from .conversation_history_transcript_common_model_input_source_medium import ( ConversationHistoryTranscriptCommonModelInputSourceMedium, ) +from .conversation_history_transcript_common_model_input_tool_results_item import ( + ConversationHistoryTranscriptCommonModelInputToolResultsItem, +) from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel -from .conversation_history_transcript_tool_result_common_model import ConversationHistoryTranscriptToolResultCommonModel from .conversation_turn_metrics import ConversationTurnMetrics from .llm_usage_input import LlmUsageInput from .rag_retrieval_info import RagRetrievalInfo @@ -21,7 +23,7 @@ class ConversationHistoryTranscriptCommonModelInput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelInputRole message: typing.Optional[str] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None - tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptToolResultCommonModel]] = None + tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelInputToolResultsItem]] = None feedback: typing.Optional[UserFeedback] = None llm_override: typing.Optional[str] = None time_in_call_secs: int diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py new file mode 100644 index 00000000..330d9ddb --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, +) +from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, +) + +ConversationHistoryTranscriptCommonModelInputToolResultsItem = typing.Union[ + ConversationHistoryTranscriptOtherToolsResultCommonModel, ConversationHistoryTranscriptSystemToolResultCommonModel +] diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py index 3d9dab9c..94234bef 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py @@ -9,8 +9,10 @@ from .conversation_history_transcript_common_model_output_source_medium import ( ConversationHistoryTranscriptCommonModelOutputSourceMedium, ) +from .conversation_history_transcript_common_model_output_tool_results_item import ( + ConversationHistoryTranscriptCommonModelOutputToolResultsItem, +) from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel -from .conversation_history_transcript_tool_result_common_model import ConversationHistoryTranscriptToolResultCommonModel from .conversation_turn_metrics import ConversationTurnMetrics from .llm_usage_output import LlmUsageOutput from .rag_retrieval_info import RagRetrievalInfo @@ -21,7 +23,7 @@ class ConversationHistoryTranscriptCommonModelOutput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelOutputRole message: typing.Optional[str] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None - tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptToolResultCommonModel]] = None + tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutputToolResultsItem]] = None feedback: typing.Optional[UserFeedback] = None llm_override: typing.Optional[str] = None time_in_call_secs: int diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py new file mode 100644 index 00000000..4da910e2 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, +) +from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, +) + +ConversationHistoryTranscriptCommonModelOutputToolResultsItem = typing.Union[ + ConversationHistoryTranscriptOtherToolsResultCommonModel, ConversationHistoryTranscriptSystemToolResultCommonModel +] diff --git a/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py new file mode 100644 index 00000000..bff49787 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_other_tools_result_common_model_type import ( + ConversationHistoryTranscriptOtherToolsResultCommonModelType, +) +from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel + + +class ConversationHistoryTranscriptOtherToolsResultCommonModel(UncheckedBaseModel): + request_id: str + tool_name: str + result_value: str + is_error: bool + tool_has_been_called: bool + tool_latency_secs: typing.Optional[float] = None + dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None + type: ConversationHistoryTranscriptOtherToolsResultCommonModelType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model_type.py b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model_type.py new file mode 100644 index 00000000..36472fb8 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConversationHistoryTranscriptOtherToolsResultCommonModelType = typing.Union[ + typing.Literal["client", "webhook", "mcp"], typing.Any +] diff --git a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model.py b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model.py new file mode 100644 index 00000000..51501993 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_system_tool_result_common_model_result import ( + ConversationHistoryTranscriptSystemToolResultCommonModelResult, +) +from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel + + +class ConversationHistoryTranscriptSystemToolResultCommonModel(UncheckedBaseModel): + request_id: str + tool_name: str + result_value: str + is_error: bool + tool_has_been_called: bool + tool_latency_secs: typing.Optional[float] = None + dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None + type: typing.Literal["system"] = "system" + result: typing.Optional[ConversationHistoryTranscriptSystemToolResultCommonModelResult] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py new file mode 100644 index 00000000..13590dc8 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py @@ -0,0 +1,195 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess(UncheckedBaseModel): + result_type: typing.Literal["end_call_success"] = "end_call_success" + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + message: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess(UncheckedBaseModel): + result_type: typing.Literal["language_detection_success"] = "language_detection_success" + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + language: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError(UncheckedBaseModel): + result_type: typing.Literal["play_dtmf_error"] = "play_dtmf_error" + status: typing.Optional[typing.Literal["error"]] = None + error: str + details: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess(UncheckedBaseModel): + result_type: typing.Literal["play_dtmf_success"] = "play_dtmf_success" + status: typing.Optional[typing.Literal["success"]] = None + dtmf_tones: str + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess(UncheckedBaseModel): + result_type: typing.Literal["skip_turn_success"] = "skip_turn_success" + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError(UncheckedBaseModel): + result_type: typing.Literal["transfer_to_agent_error"] = "transfer_to_agent_error" + status: typing.Optional[typing.Literal["error"]] = None + from_agent: str + error: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess(UncheckedBaseModel): + result_type: typing.Literal["transfer_to_agent_success"] = "transfer_to_agent_success" + status: typing.Optional[typing.Literal["success"]] = None + from_agent: str + to_agent: str + condition: str + delay_ms: typing.Optional[int] = None + transfer_message: typing.Optional[str] = None + enable_transferred_agent_first_message: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError(UncheckedBaseModel): + result_type: typing.Literal["transfer_to_number_error"] = "transfer_to_number_error" + status: typing.Optional[typing.Literal["error"]] = None + error: str + details: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess(UncheckedBaseModel): + result_type: typing.Literal["transfer_to_number_sip_success"] = "transfer_to_number_sip_success" + status: typing.Optional[typing.Literal["success"]] = None + transfer_number: str + reason: typing.Optional[str] = None + note: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess(UncheckedBaseModel): + result_type: typing.Literal["transfer_to_number_twilio_success"] = "transfer_to_number_twilio_success" + status: typing.Optional[typing.Literal["success"]] = None + transfer_number: str + reason: typing.Optional[str] = None + client_message: typing.Optional[str] = None + agent_message: str + conference_name: str + note: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationHistoryTranscriptSystemToolResultCommonModelResult = typing_extensions.Annotated[ + typing.Union[ + ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ], + UnionMetadata(discriminant="result_type"), +] diff --git a/src/elevenlabs/types/conversation_history_transcript_tool_call_common_model.py b/src/elevenlabs/types/conversation_history_transcript_tool_call_common_model.py index d079f863..8ee143fd 100644 --- a/src/elevenlabs/types/conversation_history_transcript_tool_call_common_model.py +++ b/src/elevenlabs/types/conversation_history_transcript_tool_call_common_model.py @@ -8,10 +8,11 @@ from .conversation_history_transcript_tool_call_common_model_tool_details import ( ConversationHistoryTranscriptToolCallCommonModelToolDetails, ) +from .tool_type import ToolType class ConversationHistoryTranscriptToolCallCommonModel(UncheckedBaseModel): - type: typing.Optional[str] = None + type: typing.Optional[ToolType] = None request_id: str tool_name: str params_as_json: str diff --git a/src/elevenlabs/types/conversation_initiation_client_data_internal.py b/src/elevenlabs/types/conversation_initiation_client_data_internal.py index 51c85544..393a090d 100644 --- a/src/elevenlabs/types/conversation_initiation_client_data_internal.py +++ b/src/elevenlabs/types/conversation_initiation_client_data_internal.py @@ -9,6 +9,7 @@ from .conversation_initiation_client_data_internal_dynamic_variables_value import ( ConversationInitiationClientDataInternalDynamicVariablesValue, ) +from .conversation_initiation_source_info import ConversationInitiationSourceInfo class ConversationInitiationClientDataInternal(UncheckedBaseModel): @@ -19,6 +20,7 @@ class ConversationInitiationClientDataInternal(UncheckedBaseModel): ID of the end user participating in this conversation (for agent owner's user identification) """ + source_info: typing.Optional[ConversationInitiationSourceInfo] = None dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[ConversationInitiationClientDataInternalDynamicVariablesValue]] ] = None diff --git a/src/elevenlabs/types/conversation_initiation_client_data_request_input.py b/src/elevenlabs/types/conversation_initiation_client_data_request_input.py index 8b455116..7a4d5fef 100644 --- a/src/elevenlabs/types/conversation_initiation_client_data_request_input.py +++ b/src/elevenlabs/types/conversation_initiation_client_data_request_input.py @@ -9,6 +9,7 @@ from .conversation_initiation_client_data_request_input_dynamic_variables_value import ( ConversationInitiationClientDataRequestInputDynamicVariablesValue, ) +from .conversation_initiation_source_info import ConversationInitiationSourceInfo class ConversationInitiationClientDataRequestInput(UncheckedBaseModel): @@ -19,6 +20,7 @@ class ConversationInitiationClientDataRequestInput(UncheckedBaseModel): ID of the end user participating in this conversation (for agent owner's user identification) """ + source_info: typing.Optional[ConversationInitiationSourceInfo] = None dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[ConversationInitiationClientDataRequestInputDynamicVariablesValue]] ] = None diff --git a/src/elevenlabs/types/conversation_initiation_client_data_request_output.py b/src/elevenlabs/types/conversation_initiation_client_data_request_output.py index 8876c20b..7795d780 100644 --- a/src/elevenlabs/types/conversation_initiation_client_data_request_output.py +++ b/src/elevenlabs/types/conversation_initiation_client_data_request_output.py @@ -9,6 +9,7 @@ from .conversation_initiation_client_data_request_output_dynamic_variables_value import ( ConversationInitiationClientDataRequestOutputDynamicVariablesValue, ) +from .conversation_initiation_source_info import ConversationInitiationSourceInfo class ConversationInitiationClientDataRequestOutput(UncheckedBaseModel): @@ -19,6 +20,7 @@ class ConversationInitiationClientDataRequestOutput(UncheckedBaseModel): ID of the end user participating in this conversation (for agent owner's user identification) """ + source_info: typing.Optional[ConversationInitiationSourceInfo] = None dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[ConversationInitiationClientDataRequestOutputDynamicVariablesValue]] ] = None diff --git a/src/elevenlabs/types/conversation_initiation_source.py b/src/elevenlabs/types/conversation_initiation_source.py index 8cd9139d..c628942c 100644 --- a/src/elevenlabs/types/conversation_initiation_source.py +++ b/src/elevenlabs/types/conversation_initiation_source.py @@ -15,6 +15,7 @@ "sip_trunk", "twilio", "genesys", + "swift_sdk", ], typing.Any, ] diff --git a/src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_add_to_knowledge_base_post.py b/src/elevenlabs/types/conversation_initiation_source_info.py similarity index 52% rename from src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_add_to_knowledge_base_post.py rename to src/elevenlabs/types/conversation_initiation_source_info.py index c3db24c9..97beb3fe 100644 --- a/src/elevenlabs/types/body_add_to_knowledge_base_v_1_convai_add_to_knowledge_base_post.py +++ b/src/elevenlabs/types/conversation_initiation_source_info.py @@ -5,22 +5,22 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_initiation_source import ConversationInitiationSource -class BodyAddToKnowledgeBaseV1ConvaiAddToKnowledgeBasePost(UncheckedBaseModel): - name: typing.Optional[str] = pydantic.Field(default=None) +class ConversationInitiationSourceInfo(UncheckedBaseModel): """ - A custom, human-readable name for the document. + Information about the source of conversation initiation """ - url: typing.Optional[str] = pydantic.Field(default=None) + source: typing.Optional[ConversationInitiationSource] = pydantic.Field(default=None) """ - URL to a page of documentation that the agent will have access to in order to interact with users. + Source of the conversation initiation """ - file: typing.Optional[str] = pydantic.Field(default=None) + version: typing.Optional[str] = pydantic.Field(default=None) """ - Documentation that the agent will have access to in order to interact with users. + The SDK version number """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/conversation_summary_response_model.py b/src/elevenlabs/types/conversation_summary_response_model.py index 7d3ebda0..b9051b02 100644 --- a/src/elevenlabs/types/conversation_summary_response_model.py +++ b/src/elevenlabs/types/conversation_summary_response_model.py @@ -18,6 +18,8 @@ class ConversationSummaryResponseModel(UncheckedBaseModel): message_count: int status: ConversationSummaryResponseModelStatus call_successful: EvaluationSuccessResult + transcript_summary: typing.Optional[str] = None + call_summary_title: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/dubbed_segment.py b/src/elevenlabs/types/dubbed_segment.py index 756084f8..1ac05e13 100644 --- a/src/elevenlabs/types/dubbed_segment.py +++ b/src/elevenlabs/types/dubbed_segment.py @@ -6,12 +6,14 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .dubbing_media_reference import DubbingMediaReference +from .segment_subtitle_frame import SegmentSubtitleFrame class DubbedSegment(UncheckedBaseModel): start_time: float end_time: float text: typing.Optional[str] = None + subtitles: typing.List[SegmentSubtitleFrame] audio_stale: bool media_ref: typing.Optional[DubbingMediaReference] = None diff --git a/src/elevenlabs/types/dynamic_variable_assignment.py b/src/elevenlabs/types/dynamic_variable_assignment.py new file mode 100644 index 00000000..98b8f520 --- /dev/null +++ b/src/elevenlabs/types/dynamic_variable_assignment.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class DynamicVariableAssignment(UncheckedBaseModel): + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables. + """ + + source: typing.Optional[typing.Literal["response"]] = pydantic.Field(default=None) + """ + The source to extract the value from. Currently only 'response' is supported. + """ + + dynamic_variable: str = pydantic.Field() + """ + The name of the dynamic variable to assign the extracted value to + """ + + value_path: str = pydantic.Field() + """ + Dot notation path to extract the value from the source (e.g., 'user.name' or 'data.0.id') + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_transcript_tool_result_common_model.py b/src/elevenlabs/types/dynamic_variable_update_common_model.py similarity index 64% rename from src/elevenlabs/types/conversation_history_transcript_tool_result_common_model.py rename to src/elevenlabs/types/dynamic_variable_update_common_model.py index 9dab09d1..de213b48 100644 --- a/src/elevenlabs/types/conversation_history_transcript_tool_result_common_model.py +++ b/src/elevenlabs/types/dynamic_variable_update_common_model.py @@ -7,14 +7,17 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class ConversationHistoryTranscriptToolResultCommonModel(UncheckedBaseModel): - type: typing.Optional[str] = None - request_id: str +class DynamicVariableUpdateCommonModel(UncheckedBaseModel): + """ + Tracks a dynamic variable update that occurred during tool execution. + """ + + variable_name: str + old_value: typing.Optional[str] = None + new_value: str + updated_at: float tool_name: str - result_value: str - is_error: bool - tool_has_been_called: bool - tool_latency_secs: typing.Optional[float] = None + tool_request_id: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/end_call_tool_result_model.py b/src/elevenlabs/types/end_call_tool_result_model.py new file mode 100644 index 00000000..cb52b88c --- /dev/null +++ b/src/elevenlabs/types/end_call_tool_result_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class EndCallToolResultModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + message: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/features_usage_common_model.py b/src/elevenlabs/types/features_usage_common_model.py index b7251b16..4fbdf03c 100644 --- a/src/elevenlabs/types/features_usage_common_model.py +++ b/src/elevenlabs/types/features_usage_common_model.py @@ -13,8 +13,12 @@ class FeaturesUsageCommonModel(UncheckedBaseModel): transfer_to_agent: typing.Optional[FeatureStatusCommonModel] = None transfer_to_number: typing.Optional[FeatureStatusCommonModel] = None multivoice: typing.Optional[FeatureStatusCommonModel] = None + dtmf_tones: typing.Optional[FeatureStatusCommonModel] = None + external_mcp_servers: typing.Optional[FeatureStatusCommonModel] = None pii_zrm_workspace: typing.Optional[bool] = None pii_zrm_agent: typing.Optional[bool] = None + tool_dynamic_variable_updates: typing.Optional[FeatureStatusCommonModel] = None + is_livekit: typing.Optional[bool] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/language_detection_tool_result_model.py b/src/elevenlabs/types/language_detection_tool_result_model.py new file mode 100644 index 00000000..eefba73d --- /dev/null +++ b/src/elevenlabs/types/language_detection_tool_result_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LanguageDetectionToolResultModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + language: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index 14e72be3..36fb6ecb 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -16,6 +16,7 @@ "gemini-1.5-flash", "gemini-2.0-flash", "gemini-2.0-flash-lite", + "gemini-2.5-flash-lite", "gemini-2.5-flash", "claude-sonnet-4", "claude-3-7-sonnet", @@ -24,6 +25,11 @@ "claude-3-haiku", "grok-beta", "custom-llm", + "qwen3-4b", + "watt-tool-8b", + "gemini-2.5-flash-preview-05-20", + "gemini-2.5-flash-preview-04-17", + "gemini-2.5-flash-lite-preview-06-17", "gemini-2.0-flash-lite-001", "gemini-2.0-flash-001", "gemini-1.5-flash-002", diff --git a/src/elevenlabs/types/mcp_tool_config_input.py b/src/elevenlabs/types/mcp_tool_config_input.py index b80335a6..cc747910 100644 --- a/src/elevenlabs/types/mcp_tool_config_input.py +++ b/src/elevenlabs/types/mcp_tool_config_input.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -23,6 +24,21 @@ class McpToolConfigInput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + integration_type: IntegrationType = pydantic.Field() """ The type of MCP tool diff --git a/src/elevenlabs/types/mcp_tool_config_output.py b/src/elevenlabs/types/mcp_tool_config_output.py index e13c1bc5..c4070882 100644 --- a/src/elevenlabs/types/mcp_tool_config_output.py +++ b/src/elevenlabs/types/mcp_tool_config_output.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -23,6 +24,21 @@ class McpToolConfigOutput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + integration_type: IntegrationType = pydantic.Field() """ The type of MCP tool diff --git a/src/elevenlabs/types/body_edit_chapter_v_1_projects_project_id_chapters_chapter_id_patch.py b/src/elevenlabs/types/multichannel_speech_to_text_response_model.py similarity index 55% rename from src/elevenlabs/types/body_edit_chapter_v_1_projects_project_id_chapters_chapter_id_patch.py rename to src/elevenlabs/types/multichannel_speech_to_text_response_model.py index 0d3a0328..c13a1ff7 100644 --- a/src/elevenlabs/types/body_edit_chapter_v_1_projects_project_id_chapters_chapter_id_patch.py +++ b/src/elevenlabs/types/multichannel_speech_to_text_response_model.py @@ -5,18 +5,17 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .chapter_content_input_model import ChapterContentInputModel +from .speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel -class BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch(UncheckedBaseModel): - name: typing.Optional[str] = pydantic.Field(default=None) +class MultichannelSpeechToTextResponseModel(UncheckedBaseModel): """ - The name of the chapter, used for identification only. + Response model for multichannel speech-to-text transcription. """ - content: typing.Optional[ChapterContentInputModel] = pydantic.Field(default=None) + transcripts: typing.List[SpeechToTextChunkResponseModel] = pydantic.Field() """ - The chapter content to use. + List of transcripts, one for each audio channel. Each transcript contains the text and word-level details for its respective channel. """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/play_dtmf_result_error_model.py b/src/elevenlabs/types/play_dtmf_result_error_model.py new file mode 100644 index 00000000..8340472b --- /dev/null +++ b/src/elevenlabs/types/play_dtmf_result_error_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class PlayDtmfResultErrorModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["error"]] = None + error: str + details: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/play_dtmf_result_success_model.py b/src/elevenlabs/types/play_dtmf_result_success_model.py new file mode 100644 index 00000000..c26cc6f3 --- /dev/null +++ b/src/elevenlabs/types/play_dtmf_result_success_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class PlayDtmfResultSuccessModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + dtmf_tones: str + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/project_extended_response.py b/src/elevenlabs/types/project_extended_response.py index 8b35e9ca..88e54d52 100644 --- a/src/elevenlabs/types/project_extended_response.py +++ b/src/elevenlabs/types/project_extended_response.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_model import CaptionStyleModel from .chapter_response import ChapterResponse from .project_creation_meta_response_model import ProjectCreationMetaResponseModel from .project_extended_response_model_access_level import ProjectExtendedResponseModelAccessLevel @@ -159,6 +160,16 @@ class ProjectExtendedResponse(UncheckedBaseModel): Whether chapters are enabled for the project. """ + captions_enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether captions are enabled for the project. + """ + + caption_style: typing.Optional[CaptionStyleModel] = pydantic.Field(default=None) + """ + Global styling to be applied to all captions + """ + quality_preset: ProjectExtendedResponseModelQualityPreset = pydantic.Field() """ The quality preset level of the project. diff --git a/src/elevenlabs/types/project_response.py b/src/elevenlabs/types/project_response.py index d77e05c2..12d21138 100644 --- a/src/elevenlabs/types/project_response.py +++ b/src/elevenlabs/types/project_response.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .caption_style_model import CaptionStyleModel from .project_creation_meta_response_model import ProjectCreationMetaResponseModel from .project_response_model_access_level import ProjectResponseModelAccessLevel from .project_response_model_fiction import ProjectResponseModelFiction @@ -154,6 +155,16 @@ class ProjectResponse(UncheckedBaseModel): Whether chapters are enabled for the project. """ + captions_enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether captions are enabled for the project. + """ + + caption_style: typing.Optional[CaptionStyleModel] = pydantic.Field(default=None) + """ + Global styling to be applied to all captions + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index ed5ccd46..66996892 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -24,6 +25,9 @@ class PromptAgentApiModelInputToolsItem_Client(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -47,6 +51,9 @@ class PromptAgentApiModelInputToolsItem_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None approval_policy: typing.Optional[McpApprovalPolicy] = None @@ -75,6 +82,9 @@ class PromptAgentApiModelInputToolsItem_System(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None params: SystemToolConfigInputParams if IS_PYDANTIC_V2: @@ -96,6 +106,9 @@ class PromptAgentApiModelInputToolsItem_Webhook(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index e4795652..971a5571 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -24,6 +25,9 @@ class PromptAgentApiModelOutputToolsItem_Client(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -47,6 +51,9 @@ class PromptAgentApiModelOutputToolsItem_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None approval_policy: typing.Optional[McpApprovalPolicy] = None @@ -75,6 +82,9 @@ class PromptAgentApiModelOutputToolsItem_System(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: @@ -96,6 +106,9 @@ class PromptAgentApiModelOutputToolsItem_Webhook(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_override.py b/src/elevenlabs/types/prompt_agent_api_model_override.py index 7fef065f..7480f737 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_override.py +++ b/src/elevenlabs/types/prompt_agent_api_model_override.py @@ -13,6 +13,11 @@ class PromptAgentApiModelOverride(UncheckedBaseModel): The prompt for the agent """ + native_mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of Native MCP server ids to be used by the agent + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/prompt_agent_api_model_override_config.py b/src/elevenlabs/types/prompt_agent_api_model_override_config.py index 24ff78d9..2d016cb1 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_override_config.py +++ b/src/elevenlabs/types/prompt_agent_api_model_override_config.py @@ -13,6 +13,11 @@ class PromptAgentApiModelOverrideConfig(UncheckedBaseModel): Whether to allow overriding the prompt field. """ + native_mcp_server_ids: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to allow overriding the native_mcp_server_ids field. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/save_voice_preview_request.py b/src/elevenlabs/types/save_voice_preview_request.py new file mode 100644 index 00000000..a843ff6c --- /dev/null +++ b/src/elevenlabs/types/save_voice_preview_request.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SaveVoicePreviewRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/segment_subtitle_frame.py b/src/elevenlabs/types/segment_subtitle_frame.py new file mode 100644 index 00000000..39182b5c --- /dev/null +++ b/src/elevenlabs/types/segment_subtitle_frame.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SegmentSubtitleFrame(UncheckedBaseModel): + start_time: float + end_time: float + lines: typing.List[str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/skip_turn_tool_response_model.py b/src/elevenlabs/types/skip_turn_tool_response_model.py new file mode 100644 index 00000000..d8416ffb --- /dev/null +++ b/src/elevenlabs/types/skip_turn_tool_response_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SkipTurnToolResponseModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/speaker_segment.py b/src/elevenlabs/types/speaker_segment.py index db4e5000..6d683d8b 100644 --- a/src/elevenlabs/types/speaker_segment.py +++ b/src/elevenlabs/types/speaker_segment.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .dubbed_segment import DubbedSegment +from .segment_subtitle_frame import SegmentSubtitleFrame class SpeakerSegment(UncheckedBaseModel): @@ -13,6 +14,7 @@ class SpeakerSegment(UncheckedBaseModel): start_time: float end_time: float text: str + subtitles: typing.List[SegmentSubtitleFrame] dubs: typing.Dict[str, DubbedSegment] if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/speech_to_text_chunk_response_model.py b/src/elevenlabs/types/speech_to_text_chunk_response_model.py index fdcb4357..3c324ddd 100644 --- a/src/elevenlabs/types/speech_to_text_chunk_response_model.py +++ b/src/elevenlabs/types/speech_to_text_chunk_response_model.py @@ -34,6 +34,11 @@ class SpeechToTextChunkResponseModel(UncheckedBaseModel): List of words with their timing information. """ + channel_index: typing.Optional[int] = pydantic.Field(default=None) + """ + The channel index this transcript belongs to (for multichannel audio). + """ + additional_formats: typing.Optional[typing.List[typing.Optional[AdditionalFormatResponseModel]]] = pydantic.Field( default=None ) diff --git a/src/elevenlabs/types/system_tool_config_input.py b/src/elevenlabs/types/system_tool_config_input.py index 5d406f7f..ace6e126 100644 --- a/src/elevenlabs/types/system_tool_config_input.py +++ b/src/elevenlabs/types/system_tool_config_input.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .system_tool_config_input_params import SystemToolConfigInputParams @@ -20,6 +21,21 @@ class SystemToolConfigInput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + params: SystemToolConfigInputParams if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/system_tool_config_input_params.py b/src/elevenlabs/types/system_tool_config_input_params.py index d962d2e6..bc81381c 100644 --- a/src/elevenlabs/types/system_tool_config_input_params.py +++ b/src/elevenlabs/types/system_tool_config_input_params.py @@ -93,6 +93,20 @@ class Config: extra = pydantic.Extra.allow +class SystemToolConfigInputParams_VoicemailDetection(UncheckedBaseModel): + system_tool_type: typing.Literal["voicemail_detection"] = "voicemail_detection" + voicemail_message: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + SystemToolConfigInputParams = typing_extensions.Annotated[ typing.Union[ SystemToolConfigInputParams_EndCall, @@ -101,6 +115,7 @@ class Config: SystemToolConfigInputParams_SkipTurn, SystemToolConfigInputParams_TransferToAgent, SystemToolConfigInputParams_TransferToNumber, + SystemToolConfigInputParams_VoicemailDetection, ], UnionMetadata(discriminant="system_tool_type"), ] diff --git a/src/elevenlabs/types/system_tool_config_output.py b/src/elevenlabs/types/system_tool_config_output.py index 21fa970a..497ef7a7 100644 --- a/src/elevenlabs/types/system_tool_config_output.py +++ b/src/elevenlabs/types/system_tool_config_output.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .system_tool_config_output_params import SystemToolConfigOutputParams @@ -20,6 +21,21 @@ class SystemToolConfigOutput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/system_tool_config_output_params.py b/src/elevenlabs/types/system_tool_config_output_params.py index aa4a750d..edbab3a2 100644 --- a/src/elevenlabs/types/system_tool_config_output_params.py +++ b/src/elevenlabs/types/system_tool_config_output_params.py @@ -93,6 +93,20 @@ class Config: extra = pydantic.Extra.allow +class SystemToolConfigOutputParams_VoicemailDetection(UncheckedBaseModel): + system_tool_type: typing.Literal["voicemail_detection"] = "voicemail_detection" + voicemail_message: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + SystemToolConfigOutputParams = typing_extensions.Annotated[ typing.Union[ SystemToolConfigOutputParams_EndCall, @@ -101,6 +115,7 @@ class Config: SystemToolConfigOutputParams_SkipTurn, SystemToolConfigOutputParams_TransferToAgent, SystemToolConfigOutputParams_TransferToNumber, + SystemToolConfigOutputParams_VoicemailDetection, ], UnionMetadata(discriminant="system_tool_type"), ] diff --git a/src/elevenlabs/types/token_response_model.py b/src/elevenlabs/types/token_response_model.py new file mode 100644 index 00000000..48c913d7 --- /dev/null +++ b/src/elevenlabs/types/token_response_model.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TokenResponseModel(UncheckedBaseModel): + token: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/tool.py b/src/elevenlabs/types/tool.py index d395efee..182de2ff 100644 --- a/src/elevenlabs/types/tool.py +++ b/src/elevenlabs/types/tool.py @@ -16,11 +16,18 @@ class Tool(UncheckedBaseModel): """ name: str + title: typing.Optional[str] = None description: typing.Optional[str] = None input_schema: typing_extensions.Annotated[ typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="inputSchema") ] + output_schema: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="outputSchema") + ] = None annotations: typing.Optional[ToolAnnotations] = None + meta: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="_meta") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index 93b43c5e..e78cb9b2 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -24,6 +25,9 @@ class ToolRequestModelToolConfig_Client(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -47,6 +51,9 @@ class ToolRequestModelToolConfig_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None approval_policy: typing.Optional[McpApprovalPolicy] = None @@ -75,6 +82,9 @@ class ToolRequestModelToolConfig_System(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None params: SystemToolConfigInputParams if IS_PYDANTIC_V2: @@ -96,6 +106,9 @@ class ToolRequestModelToolConfig_Webhook(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None diff --git a/src/elevenlabs/types/tool_response_model.py b/src/elevenlabs/types/tool_response_model.py index e92ddb6c..551990b0 100644 --- a/src/elevenlabs/types/tool_response_model.py +++ b/src/elevenlabs/types/tool_response_model.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .resource_access_info import ResourceAccessInfo from .tool_response_model_tool_config import ToolResponseModelToolConfig +from .tool_usage_stats_response_model import ToolUsageStatsResponseModel class ToolResponseModel(UncheckedBaseModel): @@ -19,6 +20,7 @@ class ToolResponseModel(UncheckedBaseModel): """ access_info: ResourceAccessInfo + usage_stats: ToolUsageStatsResponseModel if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index 4915519b..03882150 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .integration_type import IntegrationType from .mcp_approval_policy import McpApprovalPolicy @@ -24,6 +25,9 @@ class ToolResponseModelToolConfig_Client(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -47,6 +51,9 @@ class ToolResponseModelToolConfig_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None approval_policy: typing.Optional[McpApprovalPolicy] = None @@ -75,6 +82,9 @@ class ToolResponseModelToolConfig_System(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: @@ -96,6 +106,9 @@ class ToolResponseModelToolConfig_Webhook(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None diff --git a/src/elevenlabs/types/tool_type.py b/src/elevenlabs/types/tool_type.py new file mode 100644 index 00000000..6977762c --- /dev/null +++ b/src/elevenlabs/types/tool_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolType = typing.Union[typing.Literal["system", "webhook", "client", "mcp"], typing.Any] diff --git a/src/elevenlabs/types/body_stream_project_audio_v_1_projects_project_id_snapshots_project_snapshot_id_stream_post.py b/src/elevenlabs/types/tool_usage_stats_response_model.py similarity index 69% rename from src/elevenlabs/types/body_stream_project_audio_v_1_projects_project_id_snapshots_project_snapshot_id_stream_post.py rename to src/elevenlabs/types/tool_usage_stats_response_model.py index 617cf0c3..586bd946 100644 --- a/src/elevenlabs/types/body_stream_project_audio_v_1_projects_project_id_snapshots_project_snapshot_id_stream_post.py +++ b/src/elevenlabs/types/tool_usage_stats_response_model.py @@ -7,12 +7,14 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost(UncheckedBaseModel): - convert_to_mpeg: typing.Optional[bool] = pydantic.Field(default=None) +class ToolUsageStatsResponseModel(UncheckedBaseModel): + total_calls: typing.Optional[int] = pydantic.Field(default=None) """ - Whether to convert the audio to mpeg format. + The total number of calls to the tool """ + avg_latency_secs: float + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/transfer_to_agent_tool_result_error_model.py b/src/elevenlabs/types/transfer_to_agent_tool_result_error_model.py new file mode 100644 index 00000000..9dcd4d3f --- /dev/null +++ b/src/elevenlabs/types/transfer_to_agent_tool_result_error_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TransferToAgentToolResultErrorModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["error"]] = None + from_agent: str + error: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/transfer_to_agent_tool_result_success_model.py b/src/elevenlabs/types/transfer_to_agent_tool_result_success_model.py new file mode 100644 index 00000000..09baed67 --- /dev/null +++ b/src/elevenlabs/types/transfer_to_agent_tool_result_success_model.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TransferToAgentToolResultSuccessModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + from_agent: str + to_agent: str + condition: str + delay_ms: typing.Optional[int] = None + transfer_message: typing.Optional[str] = None + enable_transferred_agent_first_message: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/transfer_to_number_result_error_model.py b/src/elevenlabs/types/transfer_to_number_result_error_model.py new file mode 100644 index 00000000..3709483f --- /dev/null +++ b/src/elevenlabs/types/transfer_to_number_result_error_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TransferToNumberResultErrorModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["error"]] = None + error: str + details: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/transfer_to_number_result_sip_success_model.py b/src/elevenlabs/types/transfer_to_number_result_sip_success_model.py new file mode 100644 index 00000000..200026dd --- /dev/null +++ b/src/elevenlabs/types/transfer_to_number_result_sip_success_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TransferToNumberResultSipSuccessModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + transfer_number: str + reason: typing.Optional[str] = None + note: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/transfer_to_number_result_twilio_success_model.py b/src/elevenlabs/types/transfer_to_number_result_twilio_success_model.py new file mode 100644 index 00000000..c31a7316 --- /dev/null +++ b/src/elevenlabs/types/transfer_to_number_result_twilio_success_model.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TransferToNumberResultTwilioSuccessModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + transfer_number: str + reason: typing.Optional[str] = None + client_message: typing.Optional[str] = None + agent_message: str + conference_name: str + note: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/update_pronunciation_dictionaries_request.py b/src/elevenlabs/types/update_pronunciation_dictionaries_request.py index 967441fe..3740632b 100644 --- a/src/elevenlabs/types/update_pronunciation_dictionaries_request.py +++ b/src/elevenlabs/types/update_pronunciation_dictionaries_request.py @@ -2,28 +2,4 @@ import typing -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator - - -class UpdatePronunciationDictionariesRequest(UncheckedBaseModel): - pronunciation_dictionary_locators: typing.List[PronunciationDictionaryVersionLocator] = pydantic.Field() - """ - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. - """ - - invalidate_affected_text: typing.Optional[bool] = pydantic.Field(default=None) - """ - This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +UpdatePronunciationDictionariesRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/voice_response_model_safety_control.py b/src/elevenlabs/types/voice_response_model_safety_control.py index 8c887cd5..f381bd2f 100644 --- a/src/elevenlabs/types/voice_response_model_safety_control.py +++ b/src/elevenlabs/types/voice_response_model_safety_control.py @@ -3,6 +3,5 @@ import typing VoiceResponseModelSafetyControl = typing.Union[ - typing.Literal["NONE", "BAN", "CAPTCHA", "CAPTCHA_AND_MODERATION", "ENTERPRISE_BAN", "ENTERPRISE_CAPTCHA"], - typing.Any, + typing.Literal["NONE", "BAN", "CAPTCHA", "ENTERPRISE_BAN", "ENTERPRISE_CAPTCHA"], typing.Any ] diff --git a/src/elevenlabs/types/voicemail_detection_tool_config.py b/src/elevenlabs/types/voicemail_detection_tool_config.py new file mode 100644 index 00000000..73724096 --- /dev/null +++ b/src/elevenlabs/types/voicemail_detection_tool_config.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VoicemailDetectionToolConfig(UncheckedBaseModel): + """ + Allows the agent to detect when a voicemail system is encountered. + + This tool should be invoked by the LLM when it detects that the call has been + answered by a voicemail system rather than a human. If a voicemail message + is configured, it will be played; otherwise the call will end immediately. + """ + + voicemail_message: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional message to leave on voicemail when detected. If not provided, the call will end immediately when voicemail is detected. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index 6a7e114d..24fdc637 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -23,6 +24,21 @@ class WebhookToolConfigInput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + api_schema: WebhookToolApiSchemaConfigInput = pydantic.Field() """ The schema for the outgoing webhoook, including parameters and URL specification diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index 9f7322b2..56e9a61e 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -23,6 +24,21 @@ class WebhookToolConfigOutput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + api_schema: WebhookToolApiSchemaConfigOutput = pydantic.Field() """ The schema for the outgoing webhoook, including parameters and URL specification diff --git a/src/elevenlabs/types/widget_config.py b/src/elevenlabs/types/widget_config.py index 10b45cc7..543364d9 100644 --- a/src/elevenlabs/types/widget_config.py +++ b/src/elevenlabs/types/widget_config.py @@ -166,6 +166,16 @@ class WidgetConfig(UncheckedBaseModel): Whether the user should be able to send text messages """ + default_expanded: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the widget should be expanded by default + """ + + always_expanded: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the widget should always be expanded + """ + text_contents: typing.Optional[WidgetTextContents] = pydantic.Field(default=None) """ Text contents of the widget diff --git a/src/elevenlabs/types/widget_config_response.py b/src/elevenlabs/types/widget_config_response.py index 32200eec..d41d019d 100644 --- a/src/elevenlabs/types/widget_config_response.py +++ b/src/elevenlabs/types/widget_config_response.py @@ -166,6 +166,16 @@ class WidgetConfigResponse(UncheckedBaseModel): Whether the user should be able to send text messages """ + default_expanded: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the widget should be expanded by default + """ + + always_expanded: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the widget should always be expanded + """ + text_contents: typing.Optional[WidgetTextContents] = pydantic.Field(default=None) """ Text contents of the widget diff --git a/src/elevenlabs/types/workspace_api_key_list_response_model.py b/src/elevenlabs/types/workspace_api_key_list_response_model.py new file mode 100644 index 00000000..95e30191 --- /dev/null +++ b/src/elevenlabs/types/workspace_api_key_list_response_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel + + +class WorkspaceApiKeyListResponseModel(UncheckedBaseModel): + api_keys: typing_extensions.Annotated[typing.List[WorkspaceApiKeyResponseModel], FieldMetadata(alias="api-keys")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_api_key_response_model.py b/src/elevenlabs/types/workspace_api_key_response_model.py new file mode 100644 index 00000000..69adf289 --- /dev/null +++ b/src/elevenlabs/types/workspace_api_key_response_model.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem + + +class WorkspaceApiKeyResponseModel(UncheckedBaseModel): + name: str + hint: str + key_id: str + service_account_user_id: str + created_at_unix: typing.Optional[int] = None + is_disabled: typing.Optional[bool] = None + permissions: typing.Optional[typing.List[WorkspaceApiKeyResponseModelPermissionsItem]] = None + character_limit: typing.Optional[int] = None + character_count: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py b/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py new file mode 100644 index 00000000..dc2809b3 --- /dev/null +++ b/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkspaceApiKeyResponseModelPermissionsItem = typing.Union[ + typing.Literal[ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "models_read", + "models_write", + "voices_read", + "voices_write", + "speech_history_read", + "speech_history_write", + "sound_generation", + "audio_isolation", + "voice_generation", + "dubbing_read", + "dubbing_write", + "pronunciation_dictionaries_read", + "pronunciation_dictionaries_write", + "user_read", + "user_write", + "projects_read", + "projects_write", + "audio_native_read", + "audio_native_write", + "workspace_read", + "workspace_write", + "forced_alignment", + ], + typing.Any, +] diff --git a/src/elevenlabs/types/workspace_create_api_key_response_model.py b/src/elevenlabs/types/workspace_create_api_key_response_model.py new file mode 100644 index 00000000..5bea1621 --- /dev/null +++ b/src/elevenlabs/types/workspace_create_api_key_response_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkspaceCreateApiKeyResponseModel(UncheckedBaseModel): + xi_api_key: typing_extensions.Annotated[str, FieldMetadata(alias="xi-api-key")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 7e049bb9..3e1c9c53 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -20,6 +20,7 @@ "convai_mcp_servers", "convai_batch_calls", "convai_agent_response_tests", + "convai_test_suite_invocations", ], typing.Any, ] diff --git a/src/elevenlabs/types/workspace_service_account_list_response_model.py b/src/elevenlabs/types/workspace_service_account_list_response_model.py new file mode 100644 index 00000000..e58eab9e --- /dev/null +++ b/src/elevenlabs/types/workspace_service_account_list_response_model.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workspace_service_account_response_model import WorkspaceServiceAccountResponseModel + + +class WorkspaceServiceAccountListResponseModel(UncheckedBaseModel): + service_accounts: typing_extensions.Annotated[ + typing.List[WorkspaceServiceAccountResponseModel], FieldMetadata(alias="service-accounts") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_service_account_response_model.py b/src/elevenlabs/types/workspace_service_account_response_model.py new file mode 100644 index 00000000..77501929 --- /dev/null +++ b/src/elevenlabs/types/workspace_service_account_response_model.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel + + +class WorkspaceServiceAccountResponseModel(UncheckedBaseModel): + service_account_user_id: str + name: str + created_at_unix: typing.Optional[int] = None + api_keys: typing_extensions.Annotated[typing.List[WorkspaceApiKeyResponseModel], FieldMetadata(alias="api-keys")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/voices/client.py b/src/elevenlabs/voices/client.py index 3a1d9270..508043d0 100644 --- a/src/elevenlabs/voices/client.py +++ b/src/elevenlabs/voices/client.py @@ -89,6 +89,7 @@ def search( fine_tuning_state: typing.Optional[str] = None, collection_id: typing.Optional[str] = None, include_total_count: typing.Optional[bool] = None, + voice_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetVoicesV2Response: """ @@ -126,6 +127,9 @@ def search( include_total_count : typing.Optional[bool] Whether to include the total count of voices found in the response. Incurs a performance cost. + voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Voice IDs to lookup by. Maximum 100 voice IDs. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -156,6 +160,7 @@ def search( fine_tuning_state=fine_tuning_state, collection_id=collection_id, include_total_count=include_total_count, + voice_ids=voice_ids, request_options=request_options, ) return _response.data @@ -590,6 +595,7 @@ async def search( fine_tuning_state: typing.Optional[str] = None, collection_id: typing.Optional[str] = None, include_total_count: typing.Optional[bool] = None, + voice_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetVoicesV2Response: """ @@ -627,6 +633,9 @@ async def search( include_total_count : typing.Optional[bool] Whether to include the total count of voices found in the response. Incurs a performance cost. + voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Voice IDs to lookup by. Maximum 100 voice IDs. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -665,6 +674,7 @@ async def main() -> None: fine_tuning_state=fine_tuning_state, collection_id=collection_id, include_total_count=include_total_count, + voice_ids=voice_ids, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/voices/raw_client.py b/src/elevenlabs/voices/raw_client.py index 1be01e89..b2ede0a5 100644 --- a/src/elevenlabs/voices/raw_client.py +++ b/src/elevenlabs/voices/raw_client.py @@ -95,6 +95,7 @@ def search( fine_tuning_state: typing.Optional[str] = None, collection_id: typing.Optional[str] = None, include_total_count: typing.Optional[bool] = None, + voice_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetVoicesV2Response]: """ @@ -132,6 +133,9 @@ def search( include_total_count : typing.Optional[bool] Whether to include the total count of voices found in the response. Incurs a performance cost. + voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Voice IDs to lookup by. Maximum 100 voice IDs. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -154,6 +158,7 @@ def search( "fine_tuning_state": fine_tuning_state, "collection_id": collection_id, "include_total_count": include_total_count, + "voice_ids": voice_ids, }, request_options=request_options, ) @@ -726,6 +731,7 @@ async def search( fine_tuning_state: typing.Optional[str] = None, collection_id: typing.Optional[str] = None, include_total_count: typing.Optional[bool] = None, + voice_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetVoicesV2Response]: """ @@ -763,6 +769,9 @@ async def search( include_total_count : typing.Optional[bool] Whether to include the total count of voices found in the response. Incurs a performance cost. + voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Voice IDs to lookup by. Maximum 100 voice IDs. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -785,6 +794,7 @@ async def search( "fine_tuning_state": fine_tuning_state, "collection_id": collection_id, "include_total_count": include_total_count, + "voice_ids": voice_ids, }, request_options=request_options, ) From 2567ceee979d202bea89732aa30b23bf53f4aa86 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 01:43:58 +0200 Subject: [PATCH 03/34] SDK regeneration (#600) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 44 +++++------- .../conversational_ai/agents/client.py | 72 +++++++++---------- .../conversational_ai/agents/raw_client.py | 16 ----- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/types/agent_config.py | 45 +++++++++++- .../conversation_simulation_specification.py | 10 ++- src/elevenlabs/types/conversational_config.py | 10 ++- .../types/get_agent_response_model.py | 11 ++- 9 files changed, 128 insertions(+), 86 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index da8efd8f..495a3467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.9.0" +version = "v2.9.1" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 48ff556a..7bba54de 100644 --- a/reference.md +++ b/reference.md @@ -6172,14 +6172,6 @@ client.conversational_ai.agents.create(
-**workflow:** `typing.Optional[typing.Optional[typing.Any]]` - -
-
- -
-
- **name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -6422,14 +6414,6 @@ client.conversational_ai.agents.update(
-**workflow:** `typing.Optional[typing.Optional[typing.Any]]` - -
-
- -
-
- **name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -6647,7 +6631,11 @@ Run a conversation between the agent and a simulated user.
```python -from elevenlabs import ConversationSimulationSpecification, ElevenLabs +from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, +) client = ElevenLabs( api_key="YOUR_API_KEY", @@ -6655,10 +6643,10 @@ client = ElevenLabs( client.conversational_ai.agents.simulate_conversation( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) @@ -6747,7 +6735,11 @@ Run a conversation between the agent and a simulated user and stream back the re
```python -from elevenlabs import ConversationSimulationSpecification, ElevenLabs +from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, +) client = ElevenLabs( api_key="YOUR_API_KEY", @@ -6755,10 +6747,10 @@ client = ElevenLabs( client.conversational_ai.agents.simulate_conversation_stream( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 5da6be79..6e852507 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -49,7 +49,6 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -65,8 +64,6 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -95,7 +92,6 @@ def create( _response = self._raw_client.create( conversation_config=conversation_config, platform_settings=platform_settings, - workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -169,7 +165,6 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -188,8 +183,6 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -219,7 +212,6 @@ def update( agent_id, conversation_config=conversation_config, platform_settings=platform_settings, - workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -346,7 +338,11 @@ def simulate_conversation( Examples -------- - from elevenlabs import ConversationSimulationSpecification, ElevenLabs + from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, + ) client = ElevenLabs( api_key="YOUR_API_KEY", @@ -354,10 +350,10 @@ def simulate_conversation( client.conversational_ai.agents.simulate_conversation( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) """ @@ -405,7 +401,11 @@ def simulate_conversation_stream( Examples -------- - from elevenlabs import ConversationSimulationSpecification, ElevenLabs + from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, + ) client = ElevenLabs( api_key="YOUR_API_KEY", @@ -413,10 +413,10 @@ def simulate_conversation_stream( client.conversational_ai.agents.simulate_conversation_stream( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) """ @@ -457,7 +457,6 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -473,8 +472,6 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -511,7 +508,6 @@ async def main() -> None: _response = await self._raw_client.create( conversation_config=conversation_config, platform_settings=platform_settings, - workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -603,7 +599,6 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -622,8 +617,6 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -661,7 +654,6 @@ async def main() -> None: agent_id, conversation_config=conversation_config, platform_settings=platform_settings, - workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -806,7 +798,11 @@ async def simulate_conversation( -------- import asyncio - from elevenlabs import AsyncElevenLabs, ConversationSimulationSpecification + from elevenlabs import ( + AgentConfig, + AsyncElevenLabs, + ConversationSimulationSpecification, + ) client = AsyncElevenLabs( api_key="YOUR_API_KEY", @@ -817,10 +813,10 @@ async def main() -> None: await client.conversational_ai.agents.simulate_conversation( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) @@ -873,7 +869,11 @@ async def simulate_conversation_stream( -------- import asyncio - from elevenlabs import AsyncElevenLabs, ConversationSimulationSpecification + from elevenlabs import ( + AgentConfig, + AsyncElevenLabs, + ConversationSimulationSpecification, + ) client = AsyncElevenLabs( api_key="YOUR_API_KEY", @@ -884,10 +884,10 @@ async def main() -> None: await client.conversational_ai.agents.simulate_conversation_stream( agent_id="21m00Tcm4TlvDq8ikWAM", simulation_specification=ConversationSimulationSpecification( - simulated_user_config={ - "first_message": "Hello, how can I help you today?", - "language": "en", - }, + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), ), ) diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index f8bdc1b9..cc7ec855 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -34,7 +34,6 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -50,8 +49,6 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -76,7 +73,6 @@ def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, "name": name, "tags": tags, }, @@ -208,7 +204,6 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -227,8 +222,6 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -253,7 +246,6 @@ def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, "name": name, "tags": tags, }, @@ -581,7 +573,6 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -597,8 +588,6 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -623,7 +612,6 @@ async def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, "name": name, "tags": tags, }, @@ -757,7 +745,6 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -776,8 +763,6 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] - name : typing.Optional[str] A name to make the agent easier to find @@ -802,7 +787,6 @@ async def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, "name": name, "tags": tags, }, diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 8d96ebef..7548f6e7 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.9.0", + "User-Agent": "elevenlabs/v2.9.1", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.9.0", + "X-Fern-SDK-Version": "v2.9.1", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/types/agent_config.py b/src/elevenlabs/types/agent_config.py index a684411f..4b2ff3a8 100644 --- a/src/elevenlabs/types/agent_config.py +++ b/src/elevenlabs/types/agent_config.py @@ -1,5 +1,48 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -AgentConfig = typing.Optional[typing.Any] +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variables_config import DynamicVariablesConfig +from .prompt_agent_api_model_output import PromptAgentApiModelOutput + + +class AgentConfig(UncheckedBaseModel): + first_message: typing.Optional[str] = pydantic.Field(default=None) + """ + If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language of the agent - used for ASR and TTS + """ + + dynamic_variables: typing.Optional[DynamicVariablesConfig] = pydantic.Field(default=None) + """ + Configuration for dynamic variables + """ + + prompt: typing.Optional[PromptAgentApiModelOutput] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(AgentConfig) diff --git a/src/elevenlabs/types/conversation_simulation_specification.py b/src/elevenlabs/types/conversation_simulation_specification.py index 97e90c99..6a6390df 100644 --- a/src/elevenlabs/types/conversation_simulation_specification.py +++ b/src/elevenlabs/types/conversation_simulation_specification.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_config import AgentConfig from .conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput @@ -39,3 +41,9 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(ConversationSimulationSpecification) diff --git a/src/elevenlabs/types/conversational_config.py b/src/elevenlabs/types/conversational_config.py index 39bb6aea..e545bd7e 100644 --- a/src/elevenlabs/types/conversational_config.py +++ b/src/elevenlabs/types/conversational_config.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_config import AgentConfig from .asr_conversational_config import AsrConversationalConfig @@ -52,3 +54,9 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(ConversationalConfig) diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py index d80ccef5..6e37d263 100644 --- a/src/elevenlabs/types/get_agent_response_model.py +++ b/src/elevenlabs/types/get_agent_response_model.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_metadata_response_model import AgentMetadataResponseModel from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel @@ -43,7 +45,6 @@ class GetAgentResponseModel(UncheckedBaseModel): The phone numbers of the agent """ - workflow: typing.Optional[typing.Optional[typing.Any]] = None access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None) """ The access information of the agent for the user @@ -62,3 +63,9 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(GetAgentResponseModel) From c090428a53cfbc50cafe571d9c1cc1d20fe45cf1 Mon Sep 17 00:00:00 2001 From: Angelo Giacco Date: Sat, 9 Aug 2025 22:22:02 +0200 Subject: [PATCH 04/34] [convai] update llms (#606) * fix * udpate llm --- pyproject.toml | 2 +- src/elevenlabs/types/llm.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 495a3467..181f6454 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.9.1" +version = "v2.9.2" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index 36fb6ecb..aab32582 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -11,6 +11,9 @@ "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", "gpt-3.5-turbo", "gemini-1.5-pro", "gemini-1.5-flash", @@ -25,8 +28,6 @@ "claude-3-haiku", "grok-beta", "custom-llm", - "qwen3-4b", - "watt-tool-8b", "gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-flash-lite-preview-06-17", @@ -41,6 +42,9 @@ "claude-3-5-sonnet@20240620", "claude-3-5-sonnet-v2@20241022", "claude-3-haiku@20240307", + "gpt-5-2025-08-07", + "gpt-5-mini-2025-08-07", + "gpt-5-nano-2025-08-07", "gpt-4.1-2025-04-14", "gpt-4.1-mini-2025-04-14", "gpt-4.1-nano-2025-04-14", @@ -55,4 +59,4 @@ "gpt-3.5-turbo-1106", ], typing.Any, -] +] \ No newline at end of file From b61c50da4e29c42005057c992a362faa320b1a73 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 18:14:51 +0200 Subject: [PATCH 05/34] SDK regeneration (#609) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- poetry.lock | 173 ++++---- pyproject.toml | 2 +- reference.md | 148 ++++++- src/elevenlabs/__init__.py | 63 ++- src/elevenlabs/base_client.py | 3 + .../conversational_ai/agents/client.py | 16 + .../conversational_ai/agents/raw_client.py | 16 + src/elevenlabs/conversational_ai/client.py | 4 +- .../conversational_ai/conversations/client.py | 29 +- .../conversations/raw_client.py | 21 - .../conversational_ai/raw_client.py | 4 +- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/music/__init__.py | 8 + src/elevenlabs/music/client.py | 262 +++++++++++ .../music/composition_plan/__init__.py | 4 + .../music/composition_plan/client.py | 159 +++++++ .../music/composition_plan/raw_client.py | 181 ++++++++ src/elevenlabs/music/raw_client.py | 412 ++++++++++++++++++ src/elevenlabs/music/types/__init__.py | 8 + .../music_compose_request_output_format.py | 28 ++ .../music_stream_request_output_format.py | 28 ++ src/elevenlabs/speech_to_text/__init__.py | 2 + src/elevenlabs/speech_to_text/client.py | 15 +- src/elevenlabs/speech_to_text/raw_client.py | 15 +- .../speech_to_text/types/__init__.py | 2 + ...o_text_convert_request_webhook_metadata.py | 5 + .../types/speech_to_text_convert_response.py | 5 +- src/elevenlabs/types/__init__.py | 66 ++- ...gent_simulated_chat_test_response_model.py | 13 +- ...tailed_response_v_1_music_detailed_post.py | 44 ++ src/elevenlabs/types/breakdown_types.py | 1 + ...n_history_transcript_common_model_input.py | 13 +- ...pt_common_model_input_tool_results_item.py | 7 +- ..._history_transcript_common_model_output.py | 13 +- ...t_common_model_output_tool_results_item.py | 7 +- ..._system_tool_result_common_model_result.py | 17 + ...orkflow_tools_result_common_model_input.py | 37 ++ ...rkflow_tools_result_common_model_output.py | 37 ++ .../conversation_simulation_specification.py | 5 + .../conversation_summary_response_model.py | 2 + ...sation_summary_response_model_direction.py | 5 + .../types/features_usage_common_model.py | 1 + .../types/get_agent_response_model.py | 1 + .../types/get_conversation_response_model.py | 13 +- src/elevenlabs/types/llm.py | 6 +- src/elevenlabs/types/mcp_tool_config_input.py | 95 ---- .../types/mcp_tool_config_output.py | 95 ---- src/elevenlabs/types/metric_type.py | 9 +- src/elevenlabs/types/music_prompt.py | 34 ++ ...prompt_agent_api_model_input_tools_item.py | 25 +- ...rompt_agent_api_model_output_tools_item.py | 25 +- src/elevenlabs/types/song_section.py | 43 ++ .../speech_to_text_webhook_response_model.py | 28 ++ .../subscription_extras_response_model.py | 4 +- .../types/tool_request_model_tool_config.py | 25 +- .../types/tool_response_model_tool_config.py | 25 +- src/elevenlabs/types/tool_type.py | 2 +- ...ce_mail_detection_result_success_model.py} | 7 +- .../types/widget_config_response.py | 4 + .../types/workflow_tool_edge_step_model.py | 22 + ...tool_max_iterations_exceeded_step_model.py | 21 + ...flow_tool_nested_tools_step_model_input.py | 36 ++ ...ted_tools_step_model_input_results_item.py | 22 + ...low_tool_nested_tools_step_model_output.py | 36 ++ ...ed_tools_step_model_output_results_item.py | 22 + .../workflow_tool_response_model_input.py | 37 ++ ...ow_tool_response_model_input_steps_item.py | 79 ++++ .../workflow_tool_response_model_output.py | 37 ++ ...w_tool_response_model_output_steps_item.py | 79 ++++ src/elevenlabs/usage/client.py | 10 + src/elevenlabs/usage/raw_client.py | 10 + 71 files changed, 2257 insertions(+), 480 deletions(-) create mode 100644 src/elevenlabs/music/__init__.py create mode 100644 src/elevenlabs/music/client.py create mode 100644 src/elevenlabs/music/composition_plan/__init__.py create mode 100644 src/elevenlabs/music/composition_plan/client.py create mode 100644 src/elevenlabs/music/composition_plan/raw_client.py create mode 100644 src/elevenlabs/music/raw_client.py create mode 100644 src/elevenlabs/music/types/__init__.py create mode 100644 src/elevenlabs/music/types/music_compose_request_output_format.py create mode 100644 src/elevenlabs/music/types/music_stream_request_output_format.py create mode 100644 src/elevenlabs/speech_to_text/types/speech_to_text_convert_request_webhook_metadata.py create mode 100644 src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py create mode 100644 src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py create mode 100644 src/elevenlabs/types/conversation_summary_response_model_direction.py delete mode 100644 src/elevenlabs/types/mcp_tool_config_input.py delete mode 100644 src/elevenlabs/types/mcp_tool_config_output.py create mode 100644 src/elevenlabs/types/music_prompt.py create mode 100644 src/elevenlabs/types/song_section.py create mode 100644 src/elevenlabs/types/speech_to_text_webhook_response_model.py rename src/elevenlabs/types/{agent_ban.py => voice_mail_detection_result_success_model.py} (75%) create mode 100644 src/elevenlabs/types/workflow_tool_edge_step_model.py create mode 100644 src/elevenlabs/types/workflow_tool_max_iterations_exceeded_step_model.py create mode 100644 src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py create mode 100644 src/elevenlabs/types/workflow_tool_nested_tools_step_model_input_results_item.py create mode 100644 src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py create mode 100644 src/elevenlabs/types/workflow_tool_nested_tools_step_model_output_results_item.py create mode 100644 src/elevenlabs/types/workflow_tool_response_model_input.py create mode 100644 src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py create mode 100644 src/elevenlabs/types/workflow_tool_response_model_output.py create mode 100644 src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py diff --git a/poetry.lock b/poetry.lock index 2196abf1..b6521cbe 100644 --- a/poetry.lock +++ b/poetry.lock @@ -49,103 +49,90 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.2" +version = "3.4.3" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, - {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, - {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fb7f67a1bfa6e40b438170ebdc8158b78dc465a5a67b6dde178a46987b244a72"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc9370a2da1ac13f0153780040f465839e6cccb4a1e44810124b4e22483c93fe"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:07a0eae9e2787b586e129fdcbe1af6997f8d0e5abaa0bc98c0e20e124d67e601"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:74d77e25adda8581ffc1c720f1c81ca082921329452eba58b16233ab1842141c"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0e909868420b7049dafd3a31d45125b31143eec59235311fc4c57ea26a4acd2"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c6f162aabe9a91a309510d74eeb6507fab5fff92337a15acbe77753d88d9dcf0"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca4c094de7771a98d7fbd67d9e5dbf1eb73efa4f744a730437d8a3a5cf994f0"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:02425242e96bcf29a49711b0ca9f37e451da7c70562bc10e8ed992a5a7a25cc0"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:78deba4d8f9590fe4dae384aeff04082510a709957e968753ff3c48399f6f92a"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-win32.whl", hash = "sha256:d79c198e27580c8e958906f803e63cddb77653731be08851c7df0b1a14a8fc0f"}, + {file = "charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:c6e490913a46fa054e03699c70019ab869e990270597018cef1d8562132c2669"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-win32.whl", hash = "sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849"}, + {file = "charset_normalizer-3.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-win32.whl", hash = "sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37"}, + {file = "charset_normalizer-3.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-win32.whl", hash = "sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce"}, + {file = "charset_normalizer-3.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-win32.whl", hash = "sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce"}, + {file = "charset_normalizer-3.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0f2be7e0cf7754b9a30eb01f4295cc3d4358a479843b31f328afd210e2c7598c"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c60e092517a73c632ec38e290eba714e9627abe9d301c8c8a12ec32c314a2a4b"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:252098c8c7a873e17dd696ed98bbe91dbacd571da4b87df3736768efa7a792e4"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3653fad4fe3ed447a596ae8638b437f827234f01a8cd801842e43f3d0a6b281b"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8999f965f922ae054125286faf9f11bc6932184b93011d138925a1773830bbe9"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d95bfb53c211b57198bb91c46dd5a2d8018b3af446583aab40074bf7988401cb"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:5b413b0b1bfd94dbf4023ad6945889f374cd24e3f62de58d6bb102c4d9ae534a"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:b5e3b2d152e74e100a9e9573837aba24aab611d39428ded46f4e4022ea7d1942"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a2d08ac246bb48479170408d6c19f6385fa743e7157d716e144cad849b2dd94b"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-win32.whl", hash = "sha256:ec557499516fc90fd374bf2e32349a2887a876fbf162c160e3c01b6849eaf557"}, + {file = "charset_normalizer-3.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:5d8d01eac18c423815ed4f4a2ec3b439d654e55ee4ad610e153cf02faf67ea40"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:70bfc5f2c318afece2f5838ea5e4c3febada0be750fcf4775641052bbba14d05"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:23b6b24d74478dc833444cbd927c338349d6ae852ba53a0d02a2de1fce45b96e"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:34a7f768e3f985abdb42841e20e17b330ad3aaf4bb7e7aeeb73db2e70f077b99"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fb731e5deb0c7ef82d698b0f4c5bb724633ee2a489401594c5c88b02e6cb15f7"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:257f26fed7d7ff59921b78244f3cd93ed2af1800ff048c33f624c87475819dd7"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1ef99f0456d3d46a50945c98de1774da86f8e992ab5c77865ea8b8195341fc19"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:2c322db9c8c89009a990ef07c3bcc9f011a3269bc06782f916cd3d9eed7c9312"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:511729f456829ef86ac41ca78c63a5cb55240ed23b4b737faca0eb1abb1c41bc"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:88ab34806dea0671532d3f82d82b85e8fc23d7b2dd12fa837978dad9bb392a34"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-win32.whl", hash = "sha256:16a8770207946ac75703458e2c743631c79c59c5890c80011d536248f8eaa432"}, + {file = "charset_normalizer-3.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:d22dbedd33326a4a5190dd4fe9e9e693ef12160c77382d9e87919bce54f3d4ca"}, + {file = "charset_normalizer-3.4.3-py3-none-any.whl", hash = "sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a"}, + {file = "charset_normalizer-3.4.3.tar.gz", hash = "sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 181f6454..0d21a881 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.9.2" +version = "v2.10.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 7bba54de..c945b2a0 100644 --- a/reference.md +++ b/reference.md @@ -4375,6 +4375,14 @@ client.usage.get(
+**aggregation_bucket_size:** `typing.Optional[int]` — Aggregation bucket size in seconds. Overrides the aggregation interval. + +
+
+ +
+
+ **metric:** `typing.Optional[MetricType]` — Which metric to aggregate.
@@ -4910,7 +4918,7 @@ client.webhooks.list(
-Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. +Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking.
@@ -5086,6 +5094,14 @@ typing.Optional[core.File]` — See core.File for more documentation
+**webhook_metadata:** `typing.Optional[SpeechToTextConvertRequestWebhookMetadata]` — Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -5200,7 +5216,7 @@ core.File` — See core.File for more documentation
-Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/conversational-ai/api-reference/agents/update-agent). +Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update).
@@ -5579,6 +5595,7 @@ client.conversational_ai.update_secret(
+## Music ## ConversationalAi Conversations
client.conversational_ai.conversations.get_signed_url(...)
@@ -5716,22 +5733,6 @@ client.conversational_ai.conversations.get_webrtc_token(
-**source:** `typing.Optional[ConversationInitiationSource]` — The source of the conversation initiation. - -
-
- -
-
- -**version:** `typing.Optional[str]` — The SDK version number - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -6172,6 +6173,14 @@ client.conversational_ai.agents.create(
+**workflow:** `typing.Optional[typing.Optional[typing.Any]]` + +
+
+ +
+
+ **name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -6414,6 +6423,14 @@ client.conversational_ai.agents.update(
+**workflow:** `typing.Optional[typing.Optional[typing.Any]]` + +
+
+ +
+
+ **name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -11672,6 +11689,101 @@ client.dubbing.resource.speaker.segment.create(
+ +
+
+ +## Music CompositionPlan +
client.music.composition_plan.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.music.composition_plan.create( + prompt="prompt", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**prompt:** `str` — A simple text prompt to compose a plan from. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**source_composition_plan:** `typing.Optional[MusicPrompt]` — An optional composition plan to use as a source for the new composition plan. + +
+
+ +
+
+ +**model_id:** `typing.Optional[typing.Literal["music_v1"]]` — The model to use for the generation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 12099d71..107f3aec 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -17,7 +17,6 @@ AdditionalFormatResponseModel, AdditionalFormats, Age, - AgentBan, AgentCallLimits, AgentConfig, AgentConfigOverride, @@ -57,6 +56,7 @@ BatchCallRecipientStatus, BatchCallResponse, BatchCallStatus, + BodyComposeMusicWithADetailedResponseV1MusicDetailedPost, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, BreakdownTypes, @@ -164,6 +164,7 @@ ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, ConversationHistoryTranscriptToolCallClientDetails, ConversationHistoryTranscriptToolCallCommonModel, ConversationHistoryTranscriptToolCallCommonModelToolDetails, @@ -172,6 +173,8 @@ ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, ConversationHistoryTranscriptToolCallMcpDetails, ConversationHistoryTranscriptToolCallWebhookDetails, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, ConversationHistoryTwilioPhoneCallModel, ConversationHistoryTwilioPhoneCallModelDirection, ConversationInitiationClientDataConfigInput, @@ -190,6 +193,7 @@ ConversationSimulationSpecification, ConversationSimulationSpecificationDynamicVariablesValue, ConversationSummaryResponseModel, + ConversationSummaryResponseModelDirection, ConversationSummaryResponseModelStatus, ConversationTokenDbModel, ConversationTokenPurpose, @@ -407,8 +411,6 @@ McpServersResponseModel, McpToolApprovalHash, McpToolApprovalPolicy, - McpToolConfigInput, - McpToolConfigOutput, MetricRecord, MetricType, Model, @@ -419,6 +421,7 @@ ModerationStatusResponseModelSafetyStatus, ModerationStatusResponseModelWarningStatus, MultichannelSpeechToTextResponseModel, + MusicPrompt, NormalizedAlignment, ObjectJsonSchemaPropertyInput, ObjectJsonSchemaPropertyInputPropertiesValue, @@ -545,6 +548,7 @@ SipUriTransferDestination, SkipTurnToolConfig, SkipTurnToolResponseModel, + SongSection, SpeakerAudioResponseModel, SpeakerResponseModel, SpeakerSegment, @@ -557,6 +561,7 @@ SpeechHistoryItemResponseModelVoiceCategory, SpeechToTextCharacterResponseModel, SpeechToTextChunkResponseModel, + SpeechToTextWebhookResponseModel, SpeechToTextWordResponseModel, SpeechToTextWordResponseModelType, SrtExportOptions, @@ -655,6 +660,7 @@ VoiceDesignPreviewResponse, VoiceGenerationParameterOptionResponse, VoiceGenerationParameterResponse, + VoiceMailDetectionResultSuccessModel, VoicePreviewResponseModel, VoiceResponseModelCategory, VoiceResponseModelSafetyControl, @@ -701,6 +707,22 @@ WidgetPlacement, WidgetStyles, WidgetTextContents, + WorkflowToolEdgeStepModel, + WorkflowToolMaxIterationsExceededStepModel, + WorkflowToolNestedToolsStepModelInput, + WorkflowToolNestedToolsStepModelInputResultsItem, + WorkflowToolNestedToolsStepModelOutput, + WorkflowToolNestedToolsStepModelOutputResultsItem, + WorkflowToolResponseModelInput, + WorkflowToolResponseModelInputStepsItem, + WorkflowToolResponseModelInputStepsItem_Edge, + WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelInputStepsItem_NestedTools, + WorkflowToolResponseModelOutput, + WorkflowToolResponseModelOutputStepsItem, + WorkflowToolResponseModelOutputStepsItem_Edge, + WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelOutputStepsItem_NestedTools, WorkspaceApiKeyListResponseModel, WorkspaceApiKeyResponseModel, WorkspaceApiKeyResponseModelPermissionsItem, @@ -723,6 +745,7 @@ forced_alignment, history, models, + music, pronunciation_dictionaries, samples, service_accounts, @@ -746,6 +769,7 @@ from .dubbing import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator from .environment import ElevenLabsEnvironment from .history import HistoryListRequestSource +from .music import MusicComposeRequestOutputFormat, MusicStreamRequestOutputFormat from .play import play, save, stream from .pronunciation_dictionaries import ( BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, @@ -764,6 +788,7 @@ from .speech_to_text import ( SpeechToTextConvertRequestFileFormat, SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertRequestWebhookMetadata, SpeechToTextConvertResponse, ) from .studio import ( @@ -814,7 +839,6 @@ "AdditionalFormatResponseModel", "AdditionalFormats", "Age", - "AgentBan", "AgentCallLimits", "AgentConfig", "AgentConfigOverride", @@ -862,6 +886,7 @@ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess", + "BodyComposeMusicWithADetailedResponseV1MusicDetailedPost", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", @@ -982,6 +1007,7 @@ "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess", "ConversationHistoryTranscriptToolCallClientDetails", "ConversationHistoryTranscriptToolCallCommonModel", "ConversationHistoryTranscriptToolCallCommonModelToolDetails", @@ -990,6 +1016,8 @@ "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook", "ConversationHistoryTranscriptToolCallMcpDetails", "ConversationHistoryTranscriptToolCallWebhookDetails", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput", "ConversationHistoryTwilioPhoneCallModel", "ConversationHistoryTwilioPhoneCallModelDirection", "ConversationInitiationClientDataConfigInput", @@ -1008,6 +1036,7 @@ "ConversationSimulationSpecification", "ConversationSimulationSpecificationDynamicVariablesValue", "ConversationSummaryResponseModel", + "ConversationSummaryResponseModelDirection", "ConversationSummaryResponseModelStatus", "ConversationTokenDbModel", "ConversationTokenPurpose", @@ -1231,8 +1260,6 @@ "McpServersResponseModel", "McpToolApprovalHash", "McpToolApprovalPolicy", - "McpToolConfigInput", - "McpToolConfigOutput", "MetricRecord", "MetricType", "Model", @@ -1243,6 +1270,9 @@ "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", + "MusicComposeRequestOutputFormat", + "MusicPrompt", + "MusicStreamRequestOutputFormat", "NormalizedAlignment", "NotFoundError", "ObjectJsonSchemaPropertyInput", @@ -1376,6 +1406,7 @@ "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", + "SongSection", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -1394,7 +1425,9 @@ "SpeechToTextChunkResponseModel", "SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertRequestWebhookMetadata", "SpeechToTextConvertResponse", + "SpeechToTextWebhookResponseModel", "SpeechToTextWordResponseModel", "SpeechToTextWordResponseModelType", "SrtExportOptions", @@ -1505,6 +1538,7 @@ "VoiceDesignRequestModelModelId", "VoiceGenerationParameterOptionResponse", "VoiceGenerationParameterResponse", + "VoiceMailDetectionResultSuccessModel", "VoicePreviewResponseModel", "VoiceResponseModelCategory", "VoiceResponseModelSafetyControl", @@ -1552,6 +1586,22 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowToolEdgeStepModel", + "WorkflowToolMaxIterationsExceededStepModel", + "WorkflowToolNestedToolsStepModelInput", + "WorkflowToolNestedToolsStepModelInputResultsItem", + "WorkflowToolNestedToolsStepModelOutput", + "WorkflowToolNestedToolsStepModelOutputResultsItem", + "WorkflowToolResponseModelInput", + "WorkflowToolResponseModelInputStepsItem", + "WorkflowToolResponseModelInputStepsItem_Edge", + "WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded", + "WorkflowToolResponseModelInputStepsItem_NestedTools", + "WorkflowToolResponseModelOutput", + "WorkflowToolResponseModelOutputStepsItem", + "WorkflowToolResponseModelOutputStepsItem_Edge", + "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", + "WorkflowToolResponseModelOutputStepsItem_NestedTools", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", @@ -1572,6 +1622,7 @@ "forced_alignment", "history", "models", + "music", "play", "pronunciation_dictionaries", "samples", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index 51610a00..54d9566a 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -13,6 +13,7 @@ from .forced_alignment.client import AsyncForcedAlignmentClient, ForcedAlignmentClient from .history.client import AsyncHistoryClient, HistoryClient from .models.client import AsyncModelsClient, ModelsClient +from .music.client import AsyncMusicClient, MusicClient from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient from .raw_base_client import AsyncRawBaseElevenLabs, RawBaseElevenLabs from .samples.client import AsyncSamplesClient, SamplesClient @@ -113,6 +114,7 @@ def __init__( self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper) + self.music = MusicClient(client_wrapper=self._client_wrapper) self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) @property @@ -234,6 +236,7 @@ def __init__( self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper) + self.music = AsyncMusicClient(client_wrapper=self._client_wrapper) self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) @property diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 6e852507..b05ac8fc 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -49,6 +49,7 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -64,6 +65,8 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -92,6 +95,7 @@ def create( _response = self._raw_client.create( conversation_config=conversation_config, platform_settings=platform_settings, + workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -165,6 +169,7 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -183,6 +188,8 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -212,6 +219,7 @@ def update( agent_id, conversation_config=conversation_config, platform_settings=platform_settings, + workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -457,6 +465,7 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -472,6 +481,8 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -508,6 +519,7 @@ async def main() -> None: _response = await self._raw_client.create( conversation_config=conversation_config, platform_settings=platform_settings, + workflow=workflow, name=name, tags=tags, request_options=request_options, @@ -599,6 +611,7 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -617,6 +630,8 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -654,6 +669,7 @@ async def main() -> None: agent_id, conversation_config=conversation_config, platform_settings=platform_settings, + workflow=workflow, name=name, tags=tags, request_options=request_options, diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index cc7ec855..f8bdc1b9 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -34,6 +34,7 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -49,6 +50,8 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -73,6 +76,7 @@ def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), + "workflow": workflow, "name": name, "tags": tags, }, @@ -204,6 +208,7 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -222,6 +227,8 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -246,6 +253,7 @@ def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), + "workflow": workflow, "name": name, "tags": tags, }, @@ -573,6 +581,7 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -588,6 +597,8 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -612,6 +623,7 @@ async def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), + "workflow": workflow, "name": name, "tags": tags, }, @@ -745,6 +757,7 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, + workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -763,6 +776,8 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + workflow : typing.Optional[typing.Optional[typing.Any]] + name : typing.Optional[str] A name to make the agent easier to find @@ -787,6 +802,7 @@ async def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), + "workflow": workflow, "name": name, "tags": tags, }, diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py index aadec78f..2c7ab2aa 100644 --- a/src/elevenlabs/conversational_ai/client.py +++ b/src/elevenlabs/conversational_ai/client.py @@ -79,7 +79,7 @@ def add_to_knowledge_base( request_options: typing.Optional[RequestOptions] = None, ) -> AddKnowledgeBaseResponseModel: """ - Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/conversational-ai/api-reference/agents/update-agent). + Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). Parameters ---------- @@ -305,7 +305,7 @@ async def add_to_knowledge_base( request_options: typing.Optional[RequestOptions] = None, ) -> AddKnowledgeBaseResponseModel: """ - Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/conversational-ai/api-reference/agents/update-agent). + Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). Parameters ---------- diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index 092e646b..a223be81 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -4,7 +4,6 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions -from ...types.conversation_initiation_source import ConversationInitiationSource from ...types.conversation_signed_url_response_model import ConversationSignedUrlResponseModel from ...types.evaluation_success_result import EvaluationSuccessResult from ...types.get_conversation_response_model import GetConversationResponseModel @@ -72,8 +71,6 @@ def get_webrtc_token( *, agent_id: str, participant_name: typing.Optional[str] = None, - source: typing.Optional[ConversationInitiationSource] = None, - version: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> TokenResponseModel: """ @@ -87,12 +84,6 @@ def get_webrtc_token( participant_name : typing.Optional[str] Optional custom participant name. If not provided, user ID will be used - source : typing.Optional[ConversationInitiationSource] - The source of the conversation initiation. - - version : typing.Optional[str] - The SDK version number - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -113,11 +104,7 @@ def get_webrtc_token( ) """ _response = self._raw_client.get_webrtc_token( - agent_id=agent_id, - participant_name=participant_name, - source=source, - version=version, - request_options=request_options, + agent_id=agent_id, participant_name=participant_name, request_options=request_options ) return _response.data @@ -324,8 +311,6 @@ async def get_webrtc_token( *, agent_id: str, participant_name: typing.Optional[str] = None, - source: typing.Optional[ConversationInitiationSource] = None, - version: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> TokenResponseModel: """ @@ -339,12 +324,6 @@ async def get_webrtc_token( participant_name : typing.Optional[str] Optional custom participant name. If not provided, user ID will be used - source : typing.Optional[ConversationInitiationSource] - The source of the conversation initiation. - - version : typing.Optional[str] - The SDK version number - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -373,11 +352,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.get_webrtc_token( - agent_id=agent_id, - participant_name=participant_name, - source=source, - version=version, - request_options=request_options, + agent_id=agent_id, participant_name=participant_name, request_options=request_options ) return _response.data diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py index 5e95db50..eeb7f5ad 100644 --- a/src/elevenlabs/conversational_ai/conversations/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py @@ -10,7 +10,6 @@ from ...core.request_options import RequestOptions from ...core.unchecked_base_model import construct_type from ...errors.unprocessable_entity_error import UnprocessableEntityError -from ...types.conversation_initiation_source import ConversationInitiationSource from ...types.conversation_signed_url_response_model import ConversationSignedUrlResponseModel from ...types.evaluation_success_result import EvaluationSuccessResult from ...types.get_conversation_response_model import GetConversationResponseModel @@ -82,8 +81,6 @@ def get_webrtc_token( *, agent_id: str, participant_name: typing.Optional[str] = None, - source: typing.Optional[ConversationInitiationSource] = None, - version: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[TokenResponseModel]: """ @@ -97,12 +94,6 @@ def get_webrtc_token( participant_name : typing.Optional[str] Optional custom participant name. If not provided, user ID will be used - source : typing.Optional[ConversationInitiationSource] - The source of the conversation initiation. - - version : typing.Optional[str] - The SDK version number - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -117,8 +108,6 @@ def get_webrtc_token( params={ "agent_id": agent_id, "participant_name": participant_name, - "source": source, - "version": version, }, request_options=request_options, ) @@ -404,8 +393,6 @@ async def get_webrtc_token( *, agent_id: str, participant_name: typing.Optional[str] = None, - source: typing.Optional[ConversationInitiationSource] = None, - version: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[TokenResponseModel]: """ @@ -419,12 +406,6 @@ async def get_webrtc_token( participant_name : typing.Optional[str] Optional custom participant name. If not provided, user ID will be used - source : typing.Optional[ConversationInitiationSource] - The source of the conversation initiation. - - version : typing.Optional[str] - The SDK version number - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -439,8 +420,6 @@ async def get_webrtc_token( params={ "agent_id": agent_id, "participant_name": participant_name, - "source": source, - "version": version, }, request_options=request_options, ) diff --git a/src/elevenlabs/conversational_ai/raw_client.py b/src/elevenlabs/conversational_ai/raw_client.py index dd0326b7..eef42a91 100644 --- a/src/elevenlabs/conversational_ai/raw_client.py +++ b/src/elevenlabs/conversational_ai/raw_client.py @@ -36,7 +36,7 @@ def add_to_knowledge_base( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AddKnowledgeBaseResponseModel]: """ - Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/conversational-ai/api-reference/agents/update-agent). + Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). Parameters ---------- @@ -329,7 +329,7 @@ async def add_to_knowledge_base( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AddKnowledgeBaseResponseModel]: """ - Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/conversational-ai/api-reference/agents/update-agent). + Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). Parameters ---------- diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 7548f6e7..688f111c 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.9.1", + "User-Agent": "elevenlabs/v2.10.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.9.1", + "X-Fern-SDK-Version": "v2.10.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/music/__init__.py b/src/elevenlabs/music/__init__.py new file mode 100644 index 00000000..10111260 --- /dev/null +++ b/src/elevenlabs/music/__init__.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .types import MusicComposeRequestOutputFormat, MusicStreamRequestOutputFormat +from . import composition_plan + +__all__ = ["MusicComposeRequestOutputFormat", "MusicStreamRequestOutputFormat", "composition_plan"] diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py new file mode 100644 index 00000000..984922a4 --- /dev/null +++ b/src/elevenlabs/music/client.py @@ -0,0 +1,262 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.music_prompt import MusicPrompt +from .composition_plan.client import AsyncCompositionPlanClient, CompositionPlanClient +from .raw_client import AsyncRawMusicClient, RawMusicClient +from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat +from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class MusicClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawMusicClient(client_wrapper=client_wrapper) + self.composition_plan = CompositionPlanClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawMusicClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawMusicClient + """ + return self._raw_client + + def compose( + self, + *, + output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + The generated audio file in the format specified + """ + with self._raw_client.compose( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + yield from r.data + + def stream( + self, + *, + output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Stream a composed song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicStreamRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + Streaming audio data in the format specified + """ + with self._raw_client.stream( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + yield from r.data + + +class AsyncMusicClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawMusicClient(client_wrapper=client_wrapper) + self.composition_plan = AsyncCompositionPlanClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawMusicClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawMusicClient + """ + return self._raw_client + + async def compose( + self, + *, + output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + The generated audio file in the format specified + """ + async with self._raw_client.compose( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk + + async def stream( + self, + *, + output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Stream a composed song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicStreamRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + Streaming audio data in the format specified + """ + async with self._raw_client.stream( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk diff --git a/src/elevenlabs/music/composition_plan/__init__.py b/src/elevenlabs/music/composition_plan/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/elevenlabs/music/composition_plan/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/elevenlabs/music/composition_plan/client.py b/src/elevenlabs/music/composition_plan/client.py new file mode 100644 index 00000000..e04b6360 --- /dev/null +++ b/src/elevenlabs/music/composition_plan/client.py @@ -0,0 +1,159 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.request_options import RequestOptions +from ...types.music_prompt import MusicPrompt +from .raw_client import AsyncRawCompositionPlanClient, RawCompositionPlanClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class CompositionPlanClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawCompositionPlanClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawCompositionPlanClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawCompositionPlanClient + """ + return self._raw_client + + def create( + self, + *, + prompt: str, + music_length_ms: typing.Optional[int] = OMIT, + source_composition_plan: typing.Optional[MusicPrompt] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> MusicPrompt: + """ + Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. + + Parameters + ---------- + prompt : str + A simple text prompt to compose a plan from. + + music_length_ms : typing.Optional[int] + The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + source_composition_plan : typing.Optional[MusicPrompt] + An optional composition plan to use as a source for the new composition plan. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MusicPrompt + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.music.composition_plan.create( + prompt="prompt", + ) + """ + _response = self._raw_client.create( + prompt=prompt, + music_length_ms=music_length_ms, + source_composition_plan=source_composition_plan, + model_id=model_id, + request_options=request_options, + ) + return _response.data + + +class AsyncCompositionPlanClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawCompositionPlanClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawCompositionPlanClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawCompositionPlanClient + """ + return self._raw_client + + async def create( + self, + *, + prompt: str, + music_length_ms: typing.Optional[int] = OMIT, + source_composition_plan: typing.Optional[MusicPrompt] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> MusicPrompt: + """ + Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. + + Parameters + ---------- + prompt : str + A simple text prompt to compose a plan from. + + music_length_ms : typing.Optional[int] + The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + source_composition_plan : typing.Optional[MusicPrompt] + An optional composition plan to use as a source for the new composition plan. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MusicPrompt + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.music.composition_plan.create( + prompt="prompt", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + prompt=prompt, + music_length_ms=music_length_ms, + source_composition_plan=source_composition_plan, + model_id=model_id, + request_options=request_options, + ) + return _response.data diff --git a/src/elevenlabs/music/composition_plan/raw_client.py b/src/elevenlabs/music/composition_plan/raw_client.py new file mode 100644 index 00000000..81831942 --- /dev/null +++ b/src/elevenlabs/music/composition_plan/raw_client.py @@ -0,0 +1,181 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.http_response import AsyncHttpResponse, HttpResponse +from ...core.request_options import RequestOptions +from ...core.serialization import convert_and_respect_annotation_metadata +from ...core.unchecked_base_model import construct_type +from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.http_validation_error import HttpValidationError +from ...types.music_prompt import MusicPrompt + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawCompositionPlanClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, + *, + prompt: str, + music_length_ms: typing.Optional[int] = OMIT, + source_composition_plan: typing.Optional[MusicPrompt] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[MusicPrompt]: + """ + Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. + + Parameters + ---------- + prompt : str + A simple text prompt to compose a plan from. + + music_length_ms : typing.Optional[int] + The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + source_composition_plan : typing.Optional[MusicPrompt] + An optional composition plan to use as a source for the new composition plan. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MusicPrompt] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/music/plan", + method="POST", + json={ + "prompt": prompt, + "music_length_ms": music_length_ms, + "source_composition_plan": convert_and_respect_annotation_metadata( + object_=source_composition_plan, annotation=MusicPrompt, direction="write" + ), + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MusicPrompt, + construct_type( + type_=MusicPrompt, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawCompositionPlanClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, + *, + prompt: str, + music_length_ms: typing.Optional[int] = OMIT, + source_composition_plan: typing.Optional[MusicPrompt] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[MusicPrompt]: + """ + Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. + + Parameters + ---------- + prompt : str + A simple text prompt to compose a plan from. + + music_length_ms : typing.Optional[int] + The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + source_composition_plan : typing.Optional[MusicPrompt] + An optional composition plan to use as a source for the new composition plan. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MusicPrompt] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/music/plan", + method="POST", + json={ + "prompt": prompt, + "music_length_ms": music_length_ms, + "source_composition_plan": convert_and_respect_annotation_metadata( + object_=source_composition_plan, annotation=MusicPrompt, direction="write" + ), + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MusicPrompt, + construct_type( + type_=MusicPrompt, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py new file mode 100644 index 00000000..eb51bb10 --- /dev/null +++ b/src/elevenlabs/music/raw_client.py @@ -0,0 +1,412 @@ +# This file was auto-generated by Fern from our API Definition. + +import contextlib +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..types.music_prompt import MusicPrompt +from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat +from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawMusicClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + @contextlib.contextmanager + def compose( + self, + *, + output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + The generated audio file in the format specified + """ + with self._client_wrapper.httpx_client.stream( + "v1/music", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + + @contextlib.contextmanager + def stream( + self, + *, + output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Stream a composed song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicStreamRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + Streaming audio data in the format specified + """ + with self._client_wrapper.httpx_client.stream( + "v1/music/stream", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + + +class AsyncRawMusicClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + @contextlib.asynccontextmanager + async def compose( + self, + *, + output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + The generated audio file in the format specified + """ + async with self._client_wrapper.httpx_client.stream( + "v1/music", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() + + @contextlib.asynccontextmanager + async def stream( + self, + *, + output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Stream a composed song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicStreamRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + Streaming audio data in the format specified + """ + async with self._client_wrapper.httpx_client.stream( + "v1/music/stream", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() diff --git a/src/elevenlabs/music/types/__init__.py b/src/elevenlabs/music/types/__init__.py new file mode 100644 index 00000000..b282372e --- /dev/null +++ b/src/elevenlabs/music/types/__init__.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .music_compose_request_output_format import MusicComposeRequestOutputFormat +from .music_stream_request_output_format import MusicStreamRequestOutputFormat + +__all__ = ["MusicComposeRequestOutputFormat", "MusicStreamRequestOutputFormat"] diff --git a/src/elevenlabs/music/types/music_compose_request_output_format.py b/src/elevenlabs/music/types/music_compose_request_output_format.py new file mode 100644 index 00000000..d78ef8b7 --- /dev/null +++ b/src/elevenlabs/music/types/music_compose_request_output_format.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MusicComposeRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/music/types/music_stream_request_output_format.py b/src/elevenlabs/music/types/music_stream_request_output_format.py new file mode 100644 index 00000000..6c251ab5 --- /dev/null +++ b/src/elevenlabs/music/types/music_stream_request_output_format.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MusicStreamRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/speech_to_text/__init__.py b/src/elevenlabs/speech_to_text/__init__.py index 818c2134..58f97876 100644 --- a/src/elevenlabs/speech_to_text/__init__.py +++ b/src/elevenlabs/speech_to_text/__init__.py @@ -5,11 +5,13 @@ from .types import ( SpeechToTextConvertRequestFileFormat, SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertRequestWebhookMetadata, SpeechToTextConvertResponse, ) __all__ = [ "SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertRequestWebhookMetadata", "SpeechToTextConvertResponse", ] diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index d6414828..177d5c37 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -9,6 +9,7 @@ from .raw_client import AsyncRawSpeechToTextClient, RawSpeechToTextClient from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .types.speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata from .types.speech_to_text_convert_response import SpeechToTextConvertResponse # this is used as the default value for optional parameters @@ -50,10 +51,11 @@ def convert( temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, use_multi_channel: typing.Optional[bool] = OMIT, + webhook_metadata: typing.Optional[SpeechToTextConvertRequestWebhookMetadata] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SpeechToTextConvertResponse: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. Parameters ---------- @@ -108,6 +110,9 @@ def convert( use_multi_channel : typing.Optional[bool] Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + webhook_metadata : typing.Optional[SpeechToTextConvertRequestWebhookMetadata] + Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -145,6 +150,7 @@ def convert( temperature=temperature, seed=seed, use_multi_channel=use_multi_channel, + webhook_metadata=webhook_metadata, request_options=request_options, ) return _response.data @@ -185,10 +191,11 @@ async def convert( temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, use_multi_channel: typing.Optional[bool] = OMIT, + webhook_metadata: typing.Optional[SpeechToTextConvertRequestWebhookMetadata] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SpeechToTextConvertResponse: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. Parameters ---------- @@ -243,6 +250,9 @@ async def convert( use_multi_channel : typing.Optional[bool] Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + webhook_metadata : typing.Optional[SpeechToTextConvertRequestWebhookMetadata] + Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -288,6 +298,7 @@ async def main() -> None: temperature=temperature, seed=seed, use_multi_channel=use_multi_channel, + webhook_metadata=webhook_metadata, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 4b62a1c6..fc590fd6 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -16,6 +16,7 @@ from ..types.http_validation_error import HttpValidationError from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .types.speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata from .types.speech_to_text_convert_response import SpeechToTextConvertResponse # this is used as the default value for optional parameters @@ -46,10 +47,11 @@ def convert( temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, use_multi_channel: typing.Optional[bool] = OMIT, + webhook_metadata: typing.Optional[SpeechToTextConvertRequestWebhookMetadata] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SpeechToTextConvertResponse]: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. Parameters ---------- @@ -104,6 +106,9 @@ def convert( use_multi_channel : typing.Optional[bool] Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + webhook_metadata : typing.Optional[SpeechToTextConvertRequestWebhookMetadata] + Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -133,6 +138,7 @@ def convert( "temperature": temperature, "seed": seed, "use_multi_channel": use_multi_channel, + "webhook_metadata": webhook_metadata, }, files={ **({"file": file} if file is not None else {}), @@ -197,10 +203,11 @@ async def convert( temperature: typing.Optional[float] = OMIT, seed: typing.Optional[int] = OMIT, use_multi_channel: typing.Optional[bool] = OMIT, + webhook_metadata: typing.Optional[SpeechToTextConvertRequestWebhookMetadata] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SpeechToTextConvertResponse]: """ - Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. + Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. Parameters ---------- @@ -255,6 +262,9 @@ async def convert( use_multi_channel : typing.Optional[bool] Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. + webhook_metadata : typing.Optional[SpeechToTextConvertRequestWebhookMetadata] + Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -284,6 +294,7 @@ async def convert( "temperature": temperature, "seed": seed, "use_multi_channel": use_multi_channel, + "webhook_metadata": webhook_metadata, }, files={ **({"file": file} if file is not None else {}), diff --git a/src/elevenlabs/speech_to_text/types/__init__.py b/src/elevenlabs/speech_to_text/types/__init__.py index 2c7956eb..e300fc6c 100644 --- a/src/elevenlabs/speech_to_text/types/__init__.py +++ b/src/elevenlabs/speech_to_text/types/__init__.py @@ -4,10 +4,12 @@ from .speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity +from .speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata from .speech_to_text_convert_response import SpeechToTextConvertResponse __all__ = [ "SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity", + "SpeechToTextConvertRequestWebhookMetadata", "SpeechToTextConvertResponse", ] diff --git a/src/elevenlabs/speech_to_text/types/speech_to_text_convert_request_webhook_metadata.py b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_request_webhook_metadata.py new file mode 100644 index 00000000..9095fa48 --- /dev/null +++ b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_request_webhook_metadata.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechToTextConvertRequestWebhookMetadata = typing.Union[str, typing.Dict[str, typing.Optional[typing.Any]]] diff --git a/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py index 0c6220bb..625287a0 100644 --- a/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py +++ b/src/elevenlabs/speech_to_text/types/speech_to_text_convert_response.py @@ -4,5 +4,8 @@ from ...types.multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel from ...types.speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel +from ...types.speech_to_text_webhook_response_model import SpeechToTextWebhookResponseModel -SpeechToTextConvertResponse = typing.Union[SpeechToTextChunkResponseModel, MultichannelSpeechToTextResponseModel] +SpeechToTextConvertResponse = typing.Union[ + SpeechToTextChunkResponseModel, MultichannelSpeechToTextResponseModel, SpeechToTextWebhookResponseModel +] diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 36270c35..7ed686b9 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -18,7 +18,6 @@ from .additional_format_response_model import AdditionalFormatResponseModel from .additional_formats import AdditionalFormats from .age import Age -from .agent_ban import AgentBan from .agent_call_limits import AgentCallLimits from .agent_config import AgentConfig from .agent_config_override import AgentConfigOverride @@ -58,6 +57,9 @@ from .batch_call_recipient_status import BatchCallRecipientStatus from .batch_call_response import BatchCallResponse from .batch_call_status import BatchCallStatus +from .body_compose_music_with_a_detailed_response_v_1_music_detailed_post import ( + BodyComposeMusicWithADetailedResponseV1MusicDetailedPost, +) from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age import ( BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, ) @@ -196,6 +198,7 @@ ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, ) from .conversation_history_transcript_tool_call_client_details import ConversationHistoryTranscriptToolCallClientDetails from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel @@ -209,6 +212,12 @@ from .conversation_history_transcript_tool_call_webhook_details import ( ConversationHistoryTranscriptToolCallWebhookDetails, ) +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) from .conversation_history_twilio_phone_call_model import ConversationHistoryTwilioPhoneCallModel from .conversation_history_twilio_phone_call_model_direction import ConversationHistoryTwilioPhoneCallModelDirection from .conversation_initiation_client_data_config_input import ConversationInitiationClientDataConfigInput @@ -237,6 +246,7 @@ ConversationSimulationSpecificationDynamicVariablesValue, ) from .conversation_summary_response_model import ConversationSummaryResponseModel +from .conversation_summary_response_model_direction import ConversationSummaryResponseModelDirection from .conversation_summary_response_model_status import ConversationSummaryResponseModelStatus from .conversation_token_db_model import ConversationTokenDbModel from .conversation_token_purpose import ConversationTokenPurpose @@ -480,8 +490,6 @@ from .mcp_servers_response_model import McpServersResponseModel from .mcp_tool_approval_hash import McpToolApprovalHash from .mcp_tool_approval_policy import McpToolApprovalPolicy -from .mcp_tool_config_input import McpToolConfigInput -from .mcp_tool_config_output import McpToolConfigOutput from .metric_record import MetricRecord from .metric_type import MetricType from .model import Model @@ -492,6 +500,7 @@ from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel +from .music_prompt import MusicPrompt from .normalized_alignment import NormalizedAlignment from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue @@ -626,6 +635,7 @@ from .sip_uri_transfer_destination import SipUriTransferDestination from .skip_turn_tool_config import SkipTurnToolConfig from .skip_turn_tool_response_model import SkipTurnToolResponseModel +from .song_section import SongSection from .speaker_audio_response_model import SpeakerAudioResponseModel from .speaker_response_model import SpeakerResponseModel from .speaker_segment import SpeakerSegment @@ -638,6 +648,7 @@ from .speech_history_item_response_model_voice_category import SpeechHistoryItemResponseModelVoiceCategory from .speech_to_text_character_response_model import SpeechToTextCharacterResponseModel from .speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel +from .speech_to_text_webhook_response_model import SpeechToTextWebhookResponseModel from .speech_to_text_word_response_model import SpeechToTextWordResponseModel from .speech_to_text_word_response_model_type import SpeechToTextWordResponseModelType from .srt_export_options import SrtExportOptions @@ -744,6 +755,7 @@ from .voice_design_preview_response import VoiceDesignPreviewResponse from .voice_generation_parameter_option_response import VoiceGenerationParameterOptionResponse from .voice_generation_parameter_response import VoiceGenerationParameterResponse +from .voice_mail_detection_result_success_model import VoiceMailDetectionResultSuccessModel from .voice_preview_response_model import VoicePreviewResponseModel from .voice_response_model_category import VoiceResponseModelCategory from .voice_response_model_safety_control import VoiceResponseModelSafetyControl @@ -800,6 +812,26 @@ from .widget_placement import WidgetPlacement from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents +from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel +from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput +from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput +from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput +from .workflow_tool_response_model_input_steps_item import ( + WorkflowToolResponseModelInputStepsItem, + WorkflowToolResponseModelInputStepsItem_Edge, + WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelInputStepsItem_NestedTools, +) +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput +from .workflow_tool_response_model_output_steps_item import ( + WorkflowToolResponseModelOutputStepsItem, + WorkflowToolResponseModelOutputStepsItem_Edge, + WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelOutputStepsItem_NestedTools, +) from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem @@ -828,7 +860,6 @@ "AdditionalFormatResponseModel", "AdditionalFormats", "Age", - "AgentBan", "AgentCallLimits", "AgentConfig", "AgentConfigOverride", @@ -868,6 +899,7 @@ "BatchCallRecipientStatus", "BatchCallResponse", "BatchCallStatus", + "BodyComposeMusicWithADetailedResponseV1MusicDetailedPost", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", "BreakdownTypes", @@ -975,6 +1007,7 @@ "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess", "ConversationHistoryTranscriptToolCallClientDetails", "ConversationHistoryTranscriptToolCallCommonModel", "ConversationHistoryTranscriptToolCallCommonModelToolDetails", @@ -983,6 +1016,8 @@ "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook", "ConversationHistoryTranscriptToolCallMcpDetails", "ConversationHistoryTranscriptToolCallWebhookDetails", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput", "ConversationHistoryTwilioPhoneCallModel", "ConversationHistoryTwilioPhoneCallModelDirection", "ConversationInitiationClientDataConfigInput", @@ -1001,6 +1036,7 @@ "ConversationSimulationSpecification", "ConversationSimulationSpecificationDynamicVariablesValue", "ConversationSummaryResponseModel", + "ConversationSummaryResponseModelDirection", "ConversationSummaryResponseModelStatus", "ConversationTokenDbModel", "ConversationTokenPurpose", @@ -1218,8 +1254,6 @@ "McpServersResponseModel", "McpToolApprovalHash", "McpToolApprovalPolicy", - "McpToolConfigInput", - "McpToolConfigOutput", "MetricRecord", "MetricType", "Model", @@ -1230,6 +1264,7 @@ "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", + "MusicPrompt", "NormalizedAlignment", "ObjectJsonSchemaPropertyInput", "ObjectJsonSchemaPropertyInputPropertiesValue", @@ -1356,6 +1391,7 @@ "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", + "SongSection", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -1368,6 +1404,7 @@ "SpeechHistoryItemResponseModelVoiceCategory", "SpeechToTextCharacterResponseModel", "SpeechToTextChunkResponseModel", + "SpeechToTextWebhookResponseModel", "SpeechToTextWordResponseModel", "SpeechToTextWordResponseModelType", "SrtExportOptions", @@ -1466,6 +1503,7 @@ "VoiceDesignPreviewResponse", "VoiceGenerationParameterOptionResponse", "VoiceGenerationParameterResponse", + "VoiceMailDetectionResultSuccessModel", "VoicePreviewResponseModel", "VoiceResponseModelCategory", "VoiceResponseModelSafetyControl", @@ -1512,6 +1550,22 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowToolEdgeStepModel", + "WorkflowToolMaxIterationsExceededStepModel", + "WorkflowToolNestedToolsStepModelInput", + "WorkflowToolNestedToolsStepModelInputResultsItem", + "WorkflowToolNestedToolsStepModelOutput", + "WorkflowToolNestedToolsStepModelOutputResultsItem", + "WorkflowToolResponseModelInput", + "WorkflowToolResponseModelInputStepsItem", + "WorkflowToolResponseModelInputStepsItem_Edge", + "WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded", + "WorkflowToolResponseModelInputStepsItem_NestedTools", + "WorkflowToolResponseModelOutput", + "WorkflowToolResponseModelOutputStepsItem", + "WorkflowToolResponseModelOutputStepsItem_Edge", + "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", + "WorkflowToolResponseModelOutputStepsItem_NestedTools", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", diff --git a/src/elevenlabs/types/agent_simulated_chat_test_response_model.py b/src/elevenlabs/types/agent_simulated_chat_test_response_model.py index adea39a5..af3f5eb8 100644 --- a/src/elevenlabs/types/agent_simulated_chat_test_response_model.py +++ b/src/elevenlabs/types/agent_simulated_chat_test_response_model.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput @@ -21,3 +23,12 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(AgentSimulatedChatTestResponseModel) diff --git a/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py b/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py new file mode 100644 index 00000000..67bef216 --- /dev/null +++ b/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .music_prompt import MusicPrompt + + +class BodyComposeMusicWithADetailedResponseV1MusicDetailedPost(UncheckedBaseModel): + prompt: typing.Optional[str] = pydantic.Field(default=None) + """ + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + """ + + music_prompt: typing.Optional[MusicPrompt] = pydantic.Field(default=None) + """ + A music prompt. Deprecated. Use `composition_plan` instead. + """ + + composition_plan: typing.Optional[MusicPrompt] = pydantic.Field(default=None) + """ + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + """ + + music_length_ms: typing.Optional[int] = pydantic.Field(default=None) + """ + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + """ + + model_id: typing.Optional[typing.Literal["music_v1"]] = pydantic.Field(default=None) + """ + The model to use for the generation. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/breakdown_types.py b/src/elevenlabs/types/breakdown_types.py index b0910ed1..0e6f8ba8 100644 --- a/src/elevenlabs/types/breakdown_types.py +++ b/src/elevenlabs/types/breakdown_types.py @@ -18,6 +18,7 @@ "region", "subresource_id", "reporting_workspace_id", + "has_api_key", ], typing.Any, ] diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py index 472e4e16..5999c83a 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .conversation_history_transcript_common_model_input_role import ConversationHistoryTranscriptCommonModelInputRole from .conversation_history_transcript_common_model_input_source_medium import ( @@ -42,3 +44,12 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 + +update_forward_refs(ConversationHistoryTranscriptCommonModelInput) diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py index 330d9ddb..9a4ebd86 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input_tool_results_item.py @@ -8,7 +8,12 @@ from .conversation_history_transcript_system_tool_result_common_model import ( ConversationHistoryTranscriptSystemToolResultCommonModel, ) +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) ConversationHistoryTranscriptCommonModelInputToolResultsItem = typing.Union[ - ConversationHistoryTranscriptOtherToolsResultCommonModel, ConversationHistoryTranscriptSystemToolResultCommonModel + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModel, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, ] diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py index 94234bef..26ae71a1 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .conversation_history_transcript_common_model_output_role import ConversationHistoryTranscriptCommonModelOutputRole from .conversation_history_transcript_common_model_output_source_medium import ( @@ -42,3 +44,12 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(ConversationHistoryTranscriptCommonModelOutput) diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py index 4da910e2..b94f558a 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output_tool_results_item.py @@ -8,7 +8,12 @@ from .conversation_history_transcript_system_tool_result_common_model import ( ConversationHistoryTranscriptSystemToolResultCommonModel, ) +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) ConversationHistoryTranscriptCommonModelOutputToolResultsItem = typing.Union[ - ConversationHistoryTranscriptOtherToolsResultCommonModel, ConversationHistoryTranscriptSystemToolResultCommonModel + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModel, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, ] diff --git a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py index 13590dc8..1e28a5ee 100644 --- a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py +++ b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py @@ -178,6 +178,22 @@ class Config: extra = pydantic.Extra.allow +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess(UncheckedBaseModel): + result_type: typing.Literal["voicemail_detection_success"] = "voicemail_detection_success" + status: typing.Optional[typing.Literal["success"]] = None + voicemail_message: typing.Optional[str] = None + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + ConversationHistoryTranscriptSystemToolResultCommonModelResult = typing_extensions.Annotated[ typing.Union[ ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, @@ -190,6 +206,7 @@ class Config: ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, ], UnionMetadata(discriminant="result_type"), ] diff --git a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py new file mode 100644 index 00000000..4ee627b4 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel + + +class ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput(UncheckedBaseModel): + request_id: str + tool_name: str + result_value: str + is_error: bool + tool_has_been_called: bool + tool_latency_secs: typing.Optional[float] = None + dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None + type: typing.Literal["workflow"] = "workflow" + result: typing.Optional["WorkflowToolResponseModelInput"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 + +update_forward_refs(ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput) diff --git a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py new file mode 100644 index 00000000..11e4b2d0 --- /dev/null +++ b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel + + +class ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput(UncheckedBaseModel): + request_id: str + tool_name: str + result_value: str + is_error: bool + tool_has_been_called: bool + tool_latency_secs: typing.Optional[float] = None + dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None + type: typing.Literal["workflow"] = "workflow" + result: typing.Optional["WorkflowToolResponseModelOutput"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput) diff --git a/src/elevenlabs/types/conversation_simulation_specification.py b/src/elevenlabs/types/conversation_simulation_specification.py index 6a6390df..4d1967fb 100644 --- a/src/elevenlabs/types/conversation_simulation_specification.py +++ b/src/elevenlabs/types/conversation_simulation_specification.py @@ -45,5 +45,10 @@ class Config: from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 update_forward_refs(ConversationSimulationSpecification) diff --git a/src/elevenlabs/types/conversation_summary_response_model.py b/src/elevenlabs/types/conversation_summary_response_model.py index b9051b02..ab3028a3 100644 --- a/src/elevenlabs/types/conversation_summary_response_model.py +++ b/src/elevenlabs/types/conversation_summary_response_model.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_summary_response_model_direction import ConversationSummaryResponseModelDirection from .conversation_summary_response_model_status import ConversationSummaryResponseModelStatus from .evaluation_success_result import EvaluationSuccessResult @@ -20,6 +21,7 @@ class ConversationSummaryResponseModel(UncheckedBaseModel): call_successful: EvaluationSuccessResult transcript_summary: typing.Optional[str] = None call_summary_title: typing.Optional[str] = None + direction: typing.Optional[ConversationSummaryResponseModelDirection] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/conversation_summary_response_model_direction.py b/src/elevenlabs/types/conversation_summary_response_model_direction.py new file mode 100644 index 00000000..67bf4a28 --- /dev/null +++ b/src/elevenlabs/types/conversation_summary_response_model_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConversationSummaryResponseModelDirection = typing.Union[typing.Literal["inbound", "outbound"], typing.Any] diff --git a/src/elevenlabs/types/features_usage_common_model.py b/src/elevenlabs/types/features_usage_common_model.py index 4fbdf03c..c642719a 100644 --- a/src/elevenlabs/types/features_usage_common_model.py +++ b/src/elevenlabs/types/features_usage_common_model.py @@ -19,6 +19,7 @@ class FeaturesUsageCommonModel(UncheckedBaseModel): pii_zrm_agent: typing.Optional[bool] = None tool_dynamic_variable_updates: typing.Optional[FeatureStatusCommonModel] = None is_livekit: typing.Optional[bool] = None + voicemail_detection: typing.Optional[FeatureStatusCommonModel] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py index 6e37d263..c8be5bba 100644 --- a/src/elevenlabs/types/get_agent_response_model.py +++ b/src/elevenlabs/types/get_agent_response_model.py @@ -45,6 +45,7 @@ class GetAgentResponseModel(UncheckedBaseModel): The phone numbers of the agent """ + workflow: typing.Optional[typing.Optional[typing.Any]] = None access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None) """ The access information of the agent for the user diff --git a/src/elevenlabs/types/get_conversation_response_model.py b/src/elevenlabs/types/get_conversation_response_model.py index c8c3a594..662716c6 100644 --- a/src/elevenlabs/types/get_conversation_response_model.py +++ b/src/elevenlabs/types/get_conversation_response_model.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel from .conversation_history_metadata_common_model import ConversationHistoryMetadataCommonModel @@ -33,3 +35,12 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(GetConversationResponseModel) diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index aab32582..9a27ef1e 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -28,6 +28,10 @@ "claude-3-haiku", "grok-beta", "custom-llm", + "qwen3-4b", + "qwen3-30b-a3b", + "watt-tool-8b", + "watt-tool-70b", "gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-flash-lite-preview-06-17", @@ -59,4 +63,4 @@ "gpt-3.5-turbo-1106", ], typing.Any, -] \ No newline at end of file +] diff --git a/src/elevenlabs/types/mcp_tool_config_input.py b/src/elevenlabs/types/mcp_tool_config_input.py deleted file mode 100644 index cc747910..00000000 --- a/src/elevenlabs/types/mcp_tool_config_input.py +++ /dev/null @@ -1,95 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .dynamic_variable_assignment import DynamicVariableAssignment -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy - - -class McpToolConfigInput(UncheckedBaseModel): - """ - An MCP tool configuration that can be used to call MCP servers - """ - - name: str - description: str - response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) - """ - The maximum time in seconds to wait for the tool call to complete. - """ - - disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) - """ - If true, the user will not be able to interrupt the agent while this tool is running. - """ - - force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) - """ - If true, the agent will speak before the tool call. - """ - - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) - """ - Configuration for extracting values from tool responses and assigning them to dynamic variables - """ - - integration_type: IntegrationType = pydantic.Field() - """ - The type of MCP tool - """ - - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = pydantic.Field(default=None) - """ - Schema for any parameters the LLM needs to provide to the MCP tool. - """ - - approval_policy: typing.Optional[McpApprovalPolicy] = pydantic.Field(default=None) - """ - The approval policy for the MCP tool - """ - - mcp_tool_name: str = pydantic.Field() - """ - The name of the MCP tool to call - """ - - mcp_tool_description: str = pydantic.Field() - """ - The description of the MCP tool to call - """ - - mcp_server_id: str = pydantic.Field() - """ - The id of the MCP server to call - """ - - mcp_server_name: str = pydantic.Field() - """ - The name of the MCP server to call - """ - - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - Original inputSchema dict for consistent hashing (pure MCP format) - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - -update_forward_refs(McpToolConfigInput) diff --git a/src/elevenlabs/types/mcp_tool_config_output.py b/src/elevenlabs/types/mcp_tool_config_output.py deleted file mode 100644 index c4070882..00000000 --- a/src/elevenlabs/types/mcp_tool_config_output.py +++ /dev/null @@ -1,95 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .dynamic_variable_assignment import DynamicVariableAssignment -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy - - -class McpToolConfigOutput(UncheckedBaseModel): - """ - An MCP tool configuration that can be used to call MCP servers - """ - - name: str - description: str - response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) - """ - The maximum time in seconds to wait for the tool call to complete. - """ - - disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) - """ - If true, the user will not be able to interrupt the agent while this tool is running. - """ - - force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) - """ - If true, the agent will speak before the tool call. - """ - - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) - """ - Configuration for extracting values from tool responses and assigning them to dynamic variables - """ - - integration_type: IntegrationType = pydantic.Field() - """ - The type of MCP tool - """ - - parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = pydantic.Field(default=None) - """ - Schema for any parameters the LLM needs to provide to the MCP tool. - """ - - approval_policy: typing.Optional[McpApprovalPolicy] = pydantic.Field(default=None) - """ - The approval policy for the MCP tool - """ - - mcp_tool_name: str = pydantic.Field() - """ - The name of the MCP tool to call - """ - - mcp_tool_description: str = pydantic.Field() - """ - The description of the MCP tool to call - """ - - mcp_server_id: str = pydantic.Field() - """ - The id of the MCP server to call - """ - - mcp_server_name: str = pydantic.Field() - """ - The name of the MCP server to call - """ - - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - Original inputSchema dict for consistent hashing (pure MCP format) - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - -update_forward_refs(McpToolConfigOutput) diff --git a/src/elevenlabs/types/metric_type.py b/src/elevenlabs/types/metric_type.py index 71ecdc70..c57c8944 100644 --- a/src/elevenlabs/types/metric_type.py +++ b/src/elevenlabs/types/metric_type.py @@ -4,7 +4,14 @@ MetricType = typing.Union[ typing.Literal[ - "credits", "minutes_used", "request_count", "ttfb_avg", "ttfb_p95", "fiat_units_spent", "concurrency" + "credits", + "minutes_used", + "request_count", + "ttfb_avg", + "ttfb_p95", + "fiat_units_spent", + "concurrency", + "concurrency_average", ], typing.Any, ] diff --git a/src/elevenlabs/types/music_prompt.py b/src/elevenlabs/types/music_prompt.py new file mode 100644 index 00000000..3d40fa9d --- /dev/null +++ b/src/elevenlabs/types/music_prompt.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .song_section import SongSection + + +class MusicPrompt(UncheckedBaseModel): + positive_global_styles: typing.List[str] = pydantic.Field() + """ + The styles that should be present in the entire song. + """ + + negative_global_styles: typing.List[str] = pydantic.Field() + """ + The styles that should not be present in the entire song. + """ + + sections: typing.List[SongSection] = pydantic.Field() + """ + The sections of the song. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index 66996892..51395a29 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -10,8 +10,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_input_params import SystemToolConfigInputParams from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -43,34 +41,16 @@ class Config: class PromptAgentApiModelInputToolsItem_Mcp(UncheckedBaseModel): - """ - The type of tool - """ - + value: typing.Optional[typing.Any] = None type: typing.Literal["mcp"] = "mcp" - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - disable_interruptions: typing.Optional[bool] = None - force_pre_tool_speech: typing.Optional[bool] = None - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None - integration_type: IntegrationType - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None - approval_policy: typing.Optional[McpApprovalPolicy] = None - mcp_tool_name: str - mcp_tool_description: str - mcp_server_id: str - mcp_server_name: str - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True - extra = pydantic.Extra.allow class PromptAgentApiModelInputToolsItem_System(UncheckedBaseModel): @@ -135,5 +115,4 @@ class Config: UnionMetadata(discriminant="type"), ] update_forward_refs(PromptAgentApiModelInputToolsItem_Client) -update_forward_refs(PromptAgentApiModelInputToolsItem_Mcp) update_forward_refs(PromptAgentApiModelInputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index 971a5571..2867ae48 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -10,8 +10,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_output_params import SystemToolConfigOutputParams from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -43,34 +41,16 @@ class Config: class PromptAgentApiModelOutputToolsItem_Mcp(UncheckedBaseModel): - """ - The type of tool - """ - + value: typing.Optional[typing.Any] = None type: typing.Literal["mcp"] = "mcp" - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - disable_interruptions: typing.Optional[bool] = None - force_pre_tool_speech: typing.Optional[bool] = None - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None - integration_type: IntegrationType - parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None - approval_policy: typing.Optional[McpApprovalPolicy] = None - mcp_tool_name: str - mcp_tool_description: str - mcp_server_id: str - mcp_server_name: str - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True - extra = pydantic.Extra.allow class PromptAgentApiModelOutputToolsItem_System(UncheckedBaseModel): @@ -135,5 +115,4 @@ class Config: UnionMetadata(discriminant="type"), ] update_forward_refs(PromptAgentApiModelOutputToolsItem_Client) -update_forward_refs(PromptAgentApiModelOutputToolsItem_Mcp) update_forward_refs(PromptAgentApiModelOutputToolsItem_Webhook) diff --git a/src/elevenlabs/types/song_section.py b/src/elevenlabs/types/song_section.py new file mode 100644 index 00000000..2d905178 --- /dev/null +++ b/src/elevenlabs/types/song_section.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SongSection(UncheckedBaseModel): + section_name: str = pydantic.Field() + """ + The name of the section. Must be between 1 and 100 characters. + """ + + positive_local_styles: typing.List[str] = pydantic.Field() + """ + The styles that should be present in this section. + """ + + negative_local_styles: typing.List[str] = pydantic.Field() + """ + The styles that should not be present in this section. + """ + + duration_ms: int = pydantic.Field() + """ + The duration of the section in milliseconds. Must be between 3000ms and 120000ms. + """ + + lines: typing.List[str] = pydantic.Field() + """ + The lyrics of the section. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/speech_to_text_webhook_response_model.py b/src/elevenlabs/types/speech_to_text_webhook_response_model.py new file mode 100644 index 00000000..59707adb --- /dev/null +++ b/src/elevenlabs/types/speech_to_text_webhook_response_model.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SpeechToTextWebhookResponseModel(UncheckedBaseModel): + message: str = pydantic.Field() + """ + The message of the webhook response. + """ + + request_id: str = pydantic.Field() + """ + The request ID of the webhook response. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/subscription_extras_response_model.py b/src/elevenlabs/types/subscription_extras_response_model.py index 96e45165..bf4cb594 100644 --- a/src/elevenlabs/types/subscription_extras_response_model.py +++ b/src/elevenlabs/types/subscription_extras_response_model.py @@ -22,12 +22,12 @@ class SubscriptionExtrasResponseModel(UncheckedBaseModel): convai_chars_per_minute: typing.Optional[int] = pydantic.Field(default=None) """ - The Convai characters per minute of the user. + The Convai characters per minute of the user. This field is deprecated and will always return None. """ convai_asr_chars_per_minute: typing.Optional[int] = pydantic.Field(default=None) """ - The Convai ASR characters per minute of the user. + The Convai ASR characters per minute of the user. This field is deprecated and will always return None. """ force_logging_disabled: bool = pydantic.Field() diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index e78cb9b2..707f2d3e 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -10,8 +10,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_input_params import SystemToolConfigInputParams from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -43,34 +41,16 @@ class Config: class ToolRequestModelToolConfig_Mcp(UncheckedBaseModel): - """ - Configuration for the tool - """ - + value: typing.Optional[typing.Any] = None type: typing.Literal["mcp"] = "mcp" - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - disable_interruptions: typing.Optional[bool] = None - force_pre_tool_speech: typing.Optional[bool] = None - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None - integration_type: IntegrationType - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None - approval_policy: typing.Optional[McpApprovalPolicy] = None - mcp_tool_name: str - mcp_tool_description: str - mcp_server_id: str - mcp_server_name: str - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True - extra = pydantic.Extra.allow class ToolRequestModelToolConfig_System(UncheckedBaseModel): @@ -135,5 +115,4 @@ class Config: UnionMetadata(discriminant="type"), ] update_forward_refs(ToolRequestModelToolConfig_Client) -update_forward_refs(ToolRequestModelToolConfig_Mcp) update_forward_refs(ToolRequestModelToolConfig_Webhook) diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index 03882150..f974c4ae 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -10,8 +10,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig -from .integration_type import IntegrationType -from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_output_params import SystemToolConfigOutputParams from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -43,34 +41,16 @@ class Config: class ToolResponseModelToolConfig_Mcp(UncheckedBaseModel): - """ - The type of tool - """ - + value: typing.Optional[typing.Any] = None type: typing.Literal["mcp"] = "mcp" - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - disable_interruptions: typing.Optional[bool] = None - force_pre_tool_speech: typing.Optional[bool] = None - assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None - integration_type: IntegrationType - parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None - approval_policy: typing.Optional[McpApprovalPolicy] = None - mcp_tool_name: str - mcp_tool_description: str - mcp_server_id: str - mcp_server_name: str - mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True - extra = pydantic.Extra.allow class ToolResponseModelToolConfig_System(UncheckedBaseModel): @@ -135,5 +115,4 @@ class Config: UnionMetadata(discriminant="type"), ] update_forward_refs(ToolResponseModelToolConfig_Client) -update_forward_refs(ToolResponseModelToolConfig_Mcp) update_forward_refs(ToolResponseModelToolConfig_Webhook) diff --git a/src/elevenlabs/types/tool_type.py b/src/elevenlabs/types/tool_type.py index 6977762c..f247f22a 100644 --- a/src/elevenlabs/types/tool_type.py +++ b/src/elevenlabs/types/tool_type.py @@ -2,4 +2,4 @@ import typing -ToolType = typing.Union[typing.Literal["system", "webhook", "client", "mcp"], typing.Any] +ToolType = typing.Union[typing.Literal["system", "webhook", "client", "mcp", "workflow"], typing.Any] diff --git a/src/elevenlabs/types/agent_ban.py b/src/elevenlabs/types/voice_mail_detection_result_success_model.py similarity index 75% rename from src/elevenlabs/types/agent_ban.py rename to src/elevenlabs/types/voice_mail_detection_result_success_model.py index 78494965..69db5c7b 100644 --- a/src/elevenlabs/types/agent_ban.py +++ b/src/elevenlabs/types/voice_mail_detection_result_success_model.py @@ -5,13 +5,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .ban_reason_type import BanReasonType -class AgentBan(UncheckedBaseModel): - at_unix: int +class VoiceMailDetectionResultSuccessModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + voicemail_message: typing.Optional[str] = None reason: typing.Optional[str] = None - reason_type: BanReasonType if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/widget_config_response.py b/src/elevenlabs/types/widget_config_response.py index d41d019d..9031b1dc 100644 --- a/src/elevenlabs/types/widget_config_response.py +++ b/src/elevenlabs/types/widget_config_response.py @@ -204,6 +204,10 @@ class WidgetConfigResponse(UncheckedBaseModel): """ first_message: typing.Optional[str] = None + use_rtc: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to use WebRTC for conversation connections + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/workflow_tool_edge_step_model.py b/src/elevenlabs/types/workflow_tool_edge_step_model.py new file mode 100644 index 00000000..8d69a8f3 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_edge_step_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowToolEdgeStepModel(UncheckedBaseModel): + step_latency_secs: float + edge_id: str + target_node_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_tool_max_iterations_exceeded_step_model.py b/src/elevenlabs/types/workflow_tool_max_iterations_exceeded_step_model.py new file mode 100644 index 00000000..1407bd1a --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_max_iterations_exceeded_step_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowToolMaxIterationsExceededStepModel(UncheckedBaseModel): + step_latency_secs: float + max_iterations: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py new file mode 100644 index 00000000..31e597de --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel + + +class WorkflowToolNestedToolsStepModelInput(UncheckedBaseModel): + step_latency_secs: float + node_id: str + requests: typing.List[ConversationHistoryTranscriptToolCallCommonModel] + results: typing.List["WorkflowToolNestedToolsStepModelInputResultsItem"] + is_successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolNestedToolsStepModelInput) diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input_results_item.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input_results_item.py new file mode 100644 index 00000000..df96f4d0 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input_results_item.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, +) +from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, +) + +if typing.TYPE_CHECKING: + from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, + ) +WorkflowToolNestedToolsStepModelInputResultsItem = typing.Union[ + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModel, + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput", +] diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py new file mode 100644 index 00000000..88a7ad96 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel + + +class WorkflowToolNestedToolsStepModelOutput(UncheckedBaseModel): + step_latency_secs: float + node_id: str + requests: typing.List[ConversationHistoryTranscriptToolCallCommonModel] + results: typing.List["WorkflowToolNestedToolsStepModelOutputResultsItem"] + is_successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolNestedToolsStepModelOutput) diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output_results_item.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output_results_item.py new file mode 100644 index 00000000..6d463c1b --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output_results_item.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, +) +from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, +) + +if typing.TYPE_CHECKING: + from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, + ) +WorkflowToolNestedToolsStepModelOutputResultsItem = typing.Union[ + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModel, + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput", +] diff --git a/src/elevenlabs/types/workflow_tool_response_model_input.py b/src/elevenlabs/types/workflow_tool_response_model_input.py new file mode 100644 index 00000000..3bbc856e --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_response_model_input.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel + + +class WorkflowToolResponseModelInput(UncheckedBaseModel): + """ + A common model for workflow tool responses. + """ + + final_transfer: typing.Optional[TransferToAgentToolResultSuccessModel] = None + steps: typing.Optional[typing.List["WorkflowToolResponseModelInputStepsItem"]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input_steps_item import WorkflowToolResponseModelInputStepsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolResponseModelInput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py b/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py new file mode 100644 index 00000000..c0b1aed8 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py @@ -0,0 +1,79 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel + + +class WorkflowToolResponseModelInputStepsItem_Edge(UncheckedBaseModel): + type: typing.Literal["edge"] = "edge" + step_latency_secs: float + edge_id: str + target_node_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded(UncheckedBaseModel): + type: typing.Literal["max_iterations_exceeded"] = "max_iterations_exceeded" + step_latency_secs: float + max_iterations: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowToolResponseModelInputStepsItem_NestedTools(UncheckedBaseModel): + type: typing.Literal["nested_tools"] = "nested_tools" + step_latency_secs: float + node_id: str + requests: typing.List[ConversationHistoryTranscriptToolCallCommonModel] + results: typing.List["WorkflowToolNestedToolsStepModelInputResultsItem"] + is_successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 + +WorkflowToolResponseModelInputStepsItem = typing_extensions.Annotated[ + typing.Union[ + WorkflowToolResponseModelInputStepsItem_Edge, + WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelInputStepsItem_NestedTools, + ], + UnionMetadata(discriminant="type"), +] +from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolResponseModelInputStepsItem_NestedTools) diff --git a/src/elevenlabs/types/workflow_tool_response_model_output.py b/src/elevenlabs/types/workflow_tool_response_model_output.py new file mode 100644 index 00000000..4e922538 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_response_model_output.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel + + +class WorkflowToolResponseModelOutput(UncheckedBaseModel): + """ + A common model for workflow tool responses. + """ + + final_transfer: typing.Optional[TransferToAgentToolResultSuccessModel] = None + steps: typing.Optional[typing.List["WorkflowToolResponseModelOutputStepsItem"]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output_steps_item import WorkflowToolResponseModelOutputStepsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolResponseModelOutput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py b/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py new file mode 100644 index 00000000..475718b5 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py @@ -0,0 +1,79 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel + + +class WorkflowToolResponseModelOutputStepsItem_Edge(UncheckedBaseModel): + type: typing.Literal["edge"] = "edge" + step_latency_secs: float + edge_id: str + target_node_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded(UncheckedBaseModel): + type: typing.Literal["max_iterations_exceeded"] = "max_iterations_exceeded" + step_latency_secs: float + max_iterations: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowToolResponseModelOutputStepsItem_NestedTools(UncheckedBaseModel): + type: typing.Literal["nested_tools"] = "nested_tools" + step_latency_secs: float + node_id: str + requests: typing.List[ConversationHistoryTranscriptToolCallCommonModel] + results: typing.List["WorkflowToolNestedToolsStepModelOutputResultsItem"] + is_successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +WorkflowToolResponseModelOutputStepsItem = typing_extensions.Annotated[ + typing.Union[ + WorkflowToolResponseModelOutputStepsItem_Edge, + WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelOutputStepsItem_NestedTools, + ], + UnionMetadata(discriminant="type"), +] +from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, F401, I001 + +update_forward_refs(WorkflowToolResponseModelOutputStepsItem_NestedTools) diff --git a/src/elevenlabs/usage/client.py b/src/elevenlabs/usage/client.py index fb980a51..dde562d0 100644 --- a/src/elevenlabs/usage/client.py +++ b/src/elevenlabs/usage/client.py @@ -34,6 +34,7 @@ def get( include_workspace_metrics: typing.Optional[bool] = None, breakdown_type: typing.Optional[BreakdownTypes] = None, aggregation_interval: typing.Optional[UsageAggregationInterval] = None, + aggregation_bucket_size: typing.Optional[int] = None, metric: typing.Optional[MetricType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> UsageCharactersResponseModel: @@ -57,6 +58,9 @@ def get( aggregation_interval : typing.Optional[UsageAggregationInterval] How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". + aggregation_bucket_size : typing.Optional[int] + Aggregation bucket size in seconds. Overrides the aggregation interval. + metric : typing.Optional[MetricType] Which metric to aggregate. @@ -86,6 +90,7 @@ def get( include_workspace_metrics=include_workspace_metrics, breakdown_type=breakdown_type, aggregation_interval=aggregation_interval, + aggregation_bucket_size=aggregation_bucket_size, metric=metric, request_options=request_options, ) @@ -115,6 +120,7 @@ async def get( include_workspace_metrics: typing.Optional[bool] = None, breakdown_type: typing.Optional[BreakdownTypes] = None, aggregation_interval: typing.Optional[UsageAggregationInterval] = None, + aggregation_bucket_size: typing.Optional[int] = None, metric: typing.Optional[MetricType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> UsageCharactersResponseModel: @@ -138,6 +144,9 @@ async def get( aggregation_interval : typing.Optional[UsageAggregationInterval] How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". + aggregation_bucket_size : typing.Optional[int] + Aggregation bucket size in seconds. Overrides the aggregation interval. + metric : typing.Optional[MetricType] Which metric to aggregate. @@ -175,6 +184,7 @@ async def main() -> None: include_workspace_metrics=include_workspace_metrics, breakdown_type=breakdown_type, aggregation_interval=aggregation_interval, + aggregation_bucket_size=aggregation_bucket_size, metric=metric, request_options=request_options, ) diff --git a/src/elevenlabs/usage/raw_client.py b/src/elevenlabs/usage/raw_client.py index 2f0a2f8b..fb8a50ca 100644 --- a/src/elevenlabs/usage/raw_client.py +++ b/src/elevenlabs/usage/raw_client.py @@ -28,6 +28,7 @@ def get( include_workspace_metrics: typing.Optional[bool] = None, breakdown_type: typing.Optional[BreakdownTypes] = None, aggregation_interval: typing.Optional[UsageAggregationInterval] = None, + aggregation_bucket_size: typing.Optional[int] = None, metric: typing.Optional[MetricType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UsageCharactersResponseModel]: @@ -51,6 +52,9 @@ def get( aggregation_interval : typing.Optional[UsageAggregationInterval] How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". + aggregation_bucket_size : typing.Optional[int] + Aggregation bucket size in seconds. Overrides the aggregation interval. + metric : typing.Optional[MetricType] Which metric to aggregate. @@ -71,6 +75,7 @@ def get( "include_workspace_metrics": include_workspace_metrics, "breakdown_type": breakdown_type, "aggregation_interval": aggregation_interval, + "aggregation_bucket_size": aggregation_bucket_size, "metric": metric, }, request_options=request_options, @@ -114,6 +119,7 @@ async def get( include_workspace_metrics: typing.Optional[bool] = None, breakdown_type: typing.Optional[BreakdownTypes] = None, aggregation_interval: typing.Optional[UsageAggregationInterval] = None, + aggregation_bucket_size: typing.Optional[int] = None, metric: typing.Optional[MetricType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UsageCharactersResponseModel]: @@ -137,6 +143,9 @@ async def get( aggregation_interval : typing.Optional[UsageAggregationInterval] How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". + aggregation_bucket_size : typing.Optional[int] + Aggregation bucket size in seconds. Overrides the aggregation interval. + metric : typing.Optional[MetricType] Which metric to aggregate. @@ -157,6 +166,7 @@ async def get( "include_workspace_metrics": include_workspace_metrics, "breakdown_type": breakdown_type, "aggregation_interval": aggregation_interval, + "aggregation_bucket_size": aggregation_bucket_size, "metric": metric, }, request_options=request_options, From b9c7fd9de05f0e7580c2a6ba1564568f8f853cae Mon Sep 17 00:00:00 2001 From: Angelo Giacco Date: Tue, 19 Aug 2025 14:01:18 +0100 Subject: [PATCH 06/34] [convai] async conv (#608) * async conv * fix * bump * reduce duplication * bump --- pyproject.toml | 2 +- .../conversational_ai/conversation.py | 598 +++++++++++++++--- .../default_audio_interface.py | 94 ++- tests/test_async_convai.py | 366 +++++++++++ 4 files changed, 965 insertions(+), 95 deletions(-) create mode 100644 tests/test_async_convai.py diff --git a/pyproject.toml b/pyproject.toml index 0d21a881..ddf90ee0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.10.0" +version = "v2.11.0" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index 1e0c0156..62a50ab7 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -8,6 +8,7 @@ from enum import Enum from websockets.sync.client import connect, Connection +import websockets from websockets.exceptions import ConnectionClosedOK from ..base_client import BaseElevenLabs @@ -105,6 +106,50 @@ def interrupt(self): pass +class AsyncAudioInterface(ABC): + """AsyncAudioInterface provides an async abstraction for handling audio input and output.""" + + @abstractmethod + async def start(self, input_callback: Callable[[bytes], Awaitable[None]]): + """Starts the audio interface. + + Called one time before the conversation starts. + The `input_callback` should be called regularly with input audio chunks from + the user. The audio should be in 16-bit PCM mono format at 16kHz. Recommended + chunk size is 4000 samples (250 milliseconds). + """ + pass + + @abstractmethod + async def stop(self): + """Stops the audio interface. + + Called one time after the conversation ends. Should clean up any resources + used by the audio interface and stop any audio streams. Do not call the + `input_callback` from `start` after this method is called. + """ + pass + + @abstractmethod + async def output(self, audio: bytes): + """Output audio to the user. + + The `audio` input is in 16-bit PCM mono format at 16kHz. Implementations can + choose to do additional buffering. This method should return quickly and not + block the calling thread. + """ + pass + + @abstractmethod + async def interrupt(self): + """Interruption signal to stop any audio output. + + User has interrupted the agent and all previosly buffered audio output should + be stopped. + """ + pass + + class ClientTools: """Handles registration and execution of client-side tools that can be called by the agent. @@ -231,13 +276,167 @@ def __init__( self.user_id = user_id -class Conversation: - client: BaseElevenLabs - agent_id: str - requires_auth: bool - config: ConversationInitiationData +class BaseConversation: + """Base class for conversation implementations with shared parameters and logic.""" + + def __init__( + self, + client: BaseElevenLabs, + agent_id: str, + user_id: Optional[str] = None, + *, + requires_auth: bool, + config: Optional[ConversationInitiationData] = None, + client_tools: Optional[ClientTools] = None, + ): + self.client = client + self.agent_id = agent_id + self.user_id = user_id + self.requires_auth = requires_auth + self.config = config or ConversationInitiationData() + self.client_tools = client_tools or ClientTools() + + self.client_tools.start() + + self._conversation_id = None + self._last_interrupt_id = 0 + + def _get_wss_url(http://github.com/self): + base_ws_url = self.client._client_wrapper.get_environment().wss + return f"{base_ws_url}/v1/convai/conversation?agent_id={self.agent_id}&source=python_sdk&version={__version__}" + + def _get_signed_url(http://github.com/self): + response = self.client.conversational_ai.conversations.get_signed_url(http://github.com/agent_id=self.agent_id) + signed_url = response.signed_url + # Append source and version query parameters to the signed URL + separator = "&" if "?" in signed_url else "?" + return f"{signed_url}{separator}source=python_sdk&version={__version__}" + + def _create_initiation_message(self): + return json.dumps( + { + "type": "conversation_initiation_client_data", + "custom_llm_extra_body": self.config.extra_body, + "conversation_config_override": self.config.conversation_config_override, + "dynamic_variables": self.config.dynamic_variables, + "source_info": { + "source": "python_sdk", + "version": __version__, + }, + **({"user_id": self.config.user_id} if self.config.user_id else {}), + } + ) + + def _handle_message_core(self, message, message_handler): + """Core message handling logic shared between sync and async implementations. + + Args: + message: The parsed message dictionary + message_handler: Handler object with methods for different operations + """ + if message["type"] == "conversation_initiation_metadata": + event = message["conversation_initiation_metadata_event"] + assert self._conversation_id is None + self._conversation_id = event["conversation_id"] + + elif message["type"] == "audio": + event = message["audio_event"] + if int(event["event_id"]) <= self._last_interrupt_id: + return + audio = base64.b64decode(event["audio_base_64"]) + message_handler.handle_audio_output(audio) + + elif message["type"] == "agent_response": + if message_handler.callback_agent_response: + event = message["agent_response_event"] + message_handler.handle_agent_response(event["agent_response"].strip()) + + elif message["type"] == "agent_response_correction": + if message_handler.callback_agent_response_correction: + event = message["agent_response_correction_event"] + message_handler.handle_agent_response_correction( + event["original_agent_response"].strip(), + event["corrected_agent_response"].strip() + ) + + elif message["type"] == "user_transcript": + if message_handler.callback_user_transcript: + event = message["user_transcription_event"] + message_handler.handle_user_transcript(event["user_transcript"].strip()) + + elif message["type"] == "interruption": + event = message["interruption_event"] + self._last_interrupt_id = int(event["event_id"]) + message_handler.handle_interruption() + + elif message["type"] == "ping": + event = message["ping_event"] + message_handler.handle_ping(event) + if message_handler.callback_latency_measurement and event["ping_ms"]: + message_handler.handle_latency_measurement(int(event["ping_ms"])) + + elif message["type"] == "client_tool_call": + tool_call = message.get("client_tool_call", {}) + tool_name = tool_call.get("tool_name") + parameters = {"tool_call_id": tool_call["tool_call_id"], **tool_call.get("parameters", {})} + message_handler.handle_client_tool_call(tool_name, parameters) + else: + pass # Ignore all other message types. + + async def _handle_message_core_async(self, message, message_handler): + """Async wrapper for core message handling logic.""" + if message["type"] == "conversation_initiation_metadata": + event = message["conversation_initiation_metadata_event"] + assert self._conversation_id is None + self._conversation_id = event["conversation_id"] + + elif message["type"] == "audio": + event = message["audio_event"] + if int(event["event_id"]) <= self._last_interrupt_id: + return + audio = base64.b64decode(event["audio_base_64"]) + await message_handler.handle_audio_output(audio) + + elif message["type"] == "agent_response": + if message_handler.callback_agent_response: + event = message["agent_response_event"] + await message_handler.handle_agent_response(event["agent_response"].strip()) + + elif message["type"] == "agent_response_correction": + if message_handler.callback_agent_response_correction: + event = message["agent_response_correction_event"] + await message_handler.handle_agent_response_correction( + event["original_agent_response"].strip(), + event["corrected_agent_response"].strip() + ) + + elif message["type"] == "user_transcript": + if message_handler.callback_user_transcript: + event = message["user_transcription_event"] + await message_handler.handle_user_transcript(event["user_transcript"].strip()) + + elif message["type"] == "interruption": + event = message["interruption_event"] + self._last_interrupt_id = int(event["event_id"]) + await message_handler.handle_interruption() + + elif message["type"] == "ping": + event = message["ping_event"] + await message_handler.handle_ping(event) + if message_handler.callback_latency_measurement and event["ping_ms"]: + await message_handler.handle_latency_measurement(int(event["ping_ms"])) + + elif message["type"] == "client_tool_call": + tool_call = message.get("client_tool_call", {}) + tool_name = tool_call.get("tool_name") + parameters = {"tool_call_id": tool_call["tool_call_id"], **tool_call.get("parameters", {})} + message_handler.handle_client_tool_call(tool_name, parameters) + else: + pass # Ignore all other message types. + + +class Conversation(BaseConversation): audio_interface: AudioInterface - client_tools: Optional[ClientTools] callback_agent_response: Optional[Callable[[str], None]] callback_agent_response_correction: Optional[Callable[[str, str], None]] callback_user_transcript: Optional[Callable[[str], None]] @@ -246,8 +445,6 @@ class Conversation: _thread: Optional[threading.Thread] _should_stop: threading.Event - _conversation_id: Optional[str] - _last_interrupt_id: int _ws: Optional[Connection] def __init__( @@ -285,26 +482,25 @@ def __init__( callback_latency_measurement: Callback for latency measurements (in milliseconds). """ - self.client = client - self.agent_id = agent_id - self.user_id = user_id - self.requires_auth = requires_auth + super().__init__( + client=client, + agent_id=agent_id, + user_id=user_id, + requires_auth=requires_auth, + config=config, + client_tools=client_tools, + ) + self.audio_interface = audio_interface self.callback_agent_response = callback_agent_response - self.config = config or ConversationInitiationData() - self.client_tools = client_tools or ClientTools() self.callback_agent_response_correction = callback_agent_response_correction self.callback_user_transcript = callback_user_transcript self.callback_latency_measurement = callback_latency_measurement self.callback_end_session = callback_end_session - self.client_tools.start() - self._thread = None self._ws: Optional[Connection] = None self._should_stop = threading.Event() - self._conversation_id = None - self._last_interrupt_id = 0 def start_session(self): """Starts the conversation session. @@ -399,21 +595,7 @@ def send_contextual_update(self, text: str): def _run(self, ws_url: str): with connect(ws_url, max_size=16 * 1024 * 1024) as ws: self._ws = ws - ws.send( - json.dumps( - { - "type": "conversation_initiation_client_data", - "custom_llm_extra_body": self.config.extra_body, - "conversation_config_override": self.config.conversation_config_override, - "dynamic_variables": self.config.dynamic_variables, - "source_info": { - "source": "python_sdk", - "version": __version__, - }, - **({"user_id": self.config.user_id} if self.config.user_id else {}), - } - ) - ) + ws.send(self._create_initiation_message()) self._ws = ws def input_callback(audio): @@ -449,67 +631,299 @@ def input_callback(audio): self._ws = None def _handle_message(self, message, ws): - if message["type"] == "conversation_initiation_metadata": - event = message["conversation_initiation_metadata_event"] - assert self._conversation_id is None - self._conversation_id = event["conversation_id"] - - elif message["type"] == "audio": - event = message["audio_event"] - if int(event["event_id"]) <= self._last_interrupt_id: - return - audio = base64.b64decode(event["audio_base_64"]) - self.audio_interface.output(audio) - elif message["type"] == "agent_response": - if self.callback_agent_response: - event = message["agent_response_event"] - self.callback_agent_response(event["agent_response"].strip()) - elif message["type"] == "agent_response_correction": - if self.callback_agent_response_correction: - event = message["agent_response_correction_event"] - self.callback_agent_response_correction( - event["original_agent_response"].strip(), event["corrected_agent_response"].strip() - ) - elif message["type"] == "user_transcript": - if self.callback_user_transcript: - event = message["user_transcription_event"] - self.callback_user_transcript(event["user_transcript"].strip()) - elif message["type"] == "interruption": - event = message["interruption_event"] - self._last_interrupt_id = int(event["event_id"]) - self.audio_interface.interrupt() - elif message["type"] == "ping": - event = message["ping_event"] - ws.send( - json.dumps( - { - "type": "pong", - "event_id": event["event_id"], - } + class SyncMessageHandler: + def __init__(self, conversation, ws): + self.conversation = conversation + self.ws = ws + self.callback_agent_response = conversation.callback_agent_response + self.callback_agent_response_correction = conversation.callback_agent_response_correction + self.callback_user_transcript = conversation.callback_user_transcript + self.callback_latency_measurement = conversation.callback_latency_measurement + + def handle_audio_output(self, audio): + self.conversation.audio_interface.output(audio) + + def handle_agent_response(self, response): + self.conversation.callback_agent_response(response) + + def handle_agent_response_correction(self, original, corrected): + self.conversation.callback_agent_response_correction(original, corrected) + + def handle_user_transcript(self, transcript): + self.conversation.callback_user_transcript(transcript) + + def handle_interruption(self): + self.conversation.audio_interface.interrupt() + + def handle_ping(self, event): + self.ws.send( + json.dumps( + { + "type": "pong", + "event_id": event["event_id"], + } + ) ) - ) - if self.callback_latency_measurement and event["ping_ms"]: - self.callback_latency_measurement(int(event["ping_ms"])) - elif message["type"] == "client_tool_call": - tool_call = message.get("client_tool_call", {}) - tool_name = tool_call.get("tool_name") - parameters = {"tool_call_id": tool_call["tool_call_id"], **tool_call.get("parameters", {})} + + def handle_latency_measurement(self, latency): + self.conversation.callback_latency_measurement(latency) + + def handle_client_tool_call(self, tool_name, parameters): + def send_response(response): + if not self.conversation._should_stop.is_set(): + self.ws.send(json.dumps(response)) + + self.conversation.client_tools.execute_tool(tool_name, parameters, send_response) + + handler = SyncMessageHandler(self, ws) + self._handle_message_core(message, handler) + + +class AsyncConversation(BaseConversation): + audio_interface: AsyncAudioInterface + callback_agent_response: Optional[Callable[[str], Awaitable[None]]] + callback_agent_response_correction: Optional[Callable[[str, str], Awaitable[None]]] + callback_user_transcript: Optional[Callable[[str], Awaitable[None]]] + callback_latency_measurement: Optional[Callable[[int], Awaitable[None]]] + callback_end_session: Optional[Callable[[], Awaitable[None]]] + + _task: Optional[asyncio.Task] + _should_stop: asyncio.Event + _ws: Optional[websockets.WebSocketClientProtocol] - def send_response(response): - if not self._should_stop.is_set(): - ws.send(json.dumps(response)) + def __init__( + self, + client: BaseElevenLabs, + agent_id: str, + user_id: Optional[str] = None, + *, + requires_auth: bool, + audio_interface: AsyncAudioInterface, + config: Optional[ConversationInitiationData] = None, + client_tools: Optional[ClientTools] = None, + callback_agent_response: Optional[Callable[[str], Awaitable[None]]] = None, + callback_agent_response_correction: Optional[Callable[[str, str], Awaitable[None]]] = None, + callback_user_transcript: Optional[Callable[[str], Awaitable[None]]] = None, + callback_latency_measurement: Optional[Callable[[int], Awaitable[None]]] = None, + callback_end_session: Optional[Callable[[], Awaitable[None]]] = None, + ): + """Async Conversational AI session. - self.client_tools.execute_tool(tool_name, parameters, send_response) - else: - pass # Ignore all other message types. + BETA: This API is subject to change without regard to backwards compatibility. - def _get_wss_url(http://github.com/self): - base_ws_url = self.client._client_wrapper.get_environment().wss - return f"{base_ws_url}/v1/convai/conversation?agent_id={self.agent_id}&source=python_sdk&version={__version__}" + Args: + client: The ElevenLabs client to use for the conversation. + agent_id: The ID of the agent to converse with. + user_id: The ID of the user conversing with the agent. + requires_auth: Whether the agent requires authentication. + audio_interface: The async audio interface to use for input and output. + client_tools: The client tools to use for the conversation. + callback_agent_response: Async callback for agent responses. + callback_agent_response_correction: Async callback for agent response corrections. + First argument is the original response (previously given to + callback_agent_response), second argument is the corrected response. + callback_user_transcript: Async callback for user transcripts. + callback_latency_measurement: Async callback for latency measurements (in milliseconds). + callback_end_session: Async callback for when session ends. + """ - def _get_signed_url(http://github.com/self): - response = self.client.conversational_ai.conversations.get_signed_url(http://github.com/agent_id=self.agent_id) - signed_url = response.signed_url - # Append source and version query parameters to the signed URL - separator = "&" if "?" in signed_url else "?" - return f"{signed_url}{separator}source=python_sdk&version={__version__}" + super().__init__( + client=client, + agent_id=agent_id, + user_id=user_id, + requires_auth=requires_auth, + config=config, + client_tools=client_tools, + ) + + self.audio_interface = audio_interface + self.callback_agent_response = callback_agent_response + self.callback_agent_response_correction = callback_agent_response_correction + self.callback_user_transcript = callback_user_transcript + self.callback_latency_measurement = callback_latency_measurement + self.callback_end_session = callback_end_session + + self._task = None + self._ws = None + self._should_stop = asyncio.Event() + + async def start_session(self): + """Starts the conversation session. + + Will run in background task until `end_session` is called. + """ + ws_url = self._get_signed_url() if self.requires_auth else self._get_wss_url() + self._task = asyncio.create_task(self._run(ws_url)) + + async def end_session(self): + """Ends the conversation session and cleans up resources.""" + await self.audio_interface.stop() + self.client_tools.stop() + self._ws = None + self._should_stop.set() + + if self.callback_end_session: + await self.callback_end_session() + + async def wait_for_session_end(self) -> Optional[str]: + """Waits for the conversation session to end. + + You must call `end_session` before calling this method, otherwise it will block. + + Returns the conversation ID, if available. + """ + if not self._task: + raise RuntimeError("Session not started.") + await self._task + return self._conversation_id + + async def send_user_message(self, text: str): + """Send a text message from the user to the agent. + + Args: + text: The text message to send to the agent. + + Raises: + RuntimeError: If the session is not active or websocket is not connected. + """ + if not self._ws: + raise RuntimeError("Session not started or websocket not connected.") + + event = UserMessageClientToOrchestratorEvent(text=text) + try: + await self._ws.send(json.dumps(event.to_dict())) + except Exception as e: + print(f"Error sending user message: {e}") + raise + + async def register_user_activity(self): + """Register user activity to prevent session timeout. + + This sends a ping to the orchestrator to reset the timeout timer. + + Raises: + RuntimeError: If the session is not active or websocket is not connected. + """ + if not self._ws: + raise RuntimeError("Session not started or websocket not connected.") + + event = UserActivityClientToOrchestratorEvent() + try: + await self._ws.send(json.dumps(event.to_dict())) + except Exception as e: + print(f"Error registering user activity: {e}") + raise + + async def send_contextual_update(self, text: str): + """Send a contextual update to the conversation. + + Contextual updates are non-interrupting content that is sent to the server + to update the conversation state without directly prompting the agent. + + Args: + text: The contextual information to send to the conversation. + + Raises: + RuntimeError: If the session is not active or websocket is not connected. + """ + if not self._ws: + raise RuntimeError("Session not started or websocket not connected.") + + event = ContextualUpdateClientToOrchestratorEvent(text=text) + try: + await self._ws.send(json.dumps(event.to_dict())) + except Exception as e: + print(f"Error sending contextual update: {e}") + raise + + async def _run(self, ws_url: str): + async with websockets.connect(ws_url, max_size=16 * 1024 * 1024) as ws: + self._ws = ws + await ws.send(self._create_initiation_message()) + + async def input_callback(audio): + try: + await ws.send( + json.dumps( + { + "user_audio_chunk": base64.b64encode(audio).decode(), + } + ) + ) + except ConnectionClosedOK: + await self.end_session() + except Exception as e: + print(f"Error sending user audio chunk: {e}") + await self.end_session() + + await self.audio_interface.start(input_callback) + + try: + while not self._should_stop.is_set(): + try: + message_str = await asyncio.wait_for(ws.recv(), timeout=0.5) + if self._should_stop.is_set(): + return + message = json.loads(message_str) + await self._handle_message(message, ws) + except asyncio.TimeoutError: + pass + except ConnectionClosedOK: + await self.end_session() + break + except Exception as e: + print(f"Error receiving message: {e}") + await self.end_session() + break + finally: + self._ws = None + + async def _handle_message(self, message, ws): + class AsyncMessageHandler: + def __init__(self, conversation, ws): + self.conversation = conversation + self.ws = ws + self.callback_agent_response = conversation.callback_agent_response + self.callback_agent_response_correction = conversation.callback_agent_response_correction + self.callback_user_transcript = conversation.callback_user_transcript + self.callback_latency_measurement = conversation.callback_latency_measurement + + async def handle_audio_output(self, audio): + await self.conversation.audio_interface.output(audio) + + async def handle_agent_response(self, response): + await self.conversation.callback_agent_response(response) + + async def handle_agent_response_correction(self, original, corrected): + await self.conversation.callback_agent_response_correction(original, corrected) + + async def handle_user_transcript(self, transcript): + await self.conversation.callback_user_transcript(transcript) + + async def handle_interruption(self): + await self.conversation.audio_interface.interrupt() + + async def handle_ping(self, event): + await self.ws.send( + json.dumps( + { + "type": "pong", + "event_id": event["event_id"], + } + ) + ) + + async def handle_latency_measurement(self, latency): + await self.conversation.callback_latency_measurement(latency) + + def handle_client_tool_call(self, tool_name, parameters): + def send_response(response): + if not self.conversation._should_stop.is_set(): + asyncio.create_task(self.ws.send(json.dumps(response))) + + self.conversation.client_tools.execute_tool(tool_name, parameters, send_response) + + handler = AsyncMessageHandler(self, ws) + + # Use the shared core message handling logic with async wrapper + await self._handle_message_core_async(message, handler) diff --git a/src/elevenlabs/conversational_ai/default_audio_interface.py b/src/elevenlabs/conversational_ai/default_audio_interface.py index b1660d85..e3bd9ad8 100644 --- a/src/elevenlabs/conversational_ai/default_audio_interface.py +++ b/src/elevenlabs/conversational_ai/default_audio_interface.py @@ -1,8 +1,9 @@ -from typing import Callable +from typing import Callable, Awaitable import queue import threading +import asyncio -from .conversation import AudioInterface +from .conversation import AudioInterface, AsyncAudioInterface class DefaultAudioInterface(AudioInterface): @@ -81,3 +82,92 @@ def _in_callback(self, in_data, frame_count, time_info, status): if self.input_callback: self.input_callback(in_data) return (None, self.pyaudio.paContinue) + + +class AsyncDefaultAudioInterface(AsyncAudioInterface): + INPUT_FRAMES_PER_BUFFER = 4000 # 250ms @ 16kHz + OUTPUT_FRAMES_PER_BUFFER = 1000 # 62.5ms @ 16kHz + + def __init__(self): + try: + import pyaudio + except ImportError: + raise ImportError("To use AsyncDefaultAudioInterface you must install pyaudio.") + self.pyaudio = pyaudio + + async def start(self, input_callback: Callable[[bytes], Awaitable[None]]): + # Audio input is using callbacks from pyaudio which we adapt to async + self.input_callback = input_callback + + # Audio output is buffered so we can handle interruptions. + # Start a separate task to handle writing to the output stream. + self.output_queue: asyncio.Queue[bytes] = asyncio.Queue() + self.should_stop = asyncio.Event() + + self.p = self.pyaudio.PyAudio() + self.in_stream = self.p.open( + format=self.pyaudio.paInt16, + channels=1, + rate=16000, + input=True, + stream_callback=self._in_callback, + frames_per_buffer=self.INPUT_FRAMES_PER_BUFFER, + start=True, + ) + self.out_stream = self.p.open( + format=self.pyaudio.paInt16, + channels=1, + rate=16000, + output=True, + frames_per_buffer=self.OUTPUT_FRAMES_PER_BUFFER, + start=True, + ) + + # Start the output task + self.output_task = asyncio.create_task(self._output_task()) + + async def stop(self): + self.should_stop.set() + await self.output_task + self.in_stream.stop_stream() + self.in_stream.close() + self.out_stream.close() + self.p.terminate() + + async def output(self, audio: bytes): + await self.output_queue.put(audio) + + async def interrupt(self): + # Clear the output queue to stop any audio that is currently playing. + try: + while True: + try: + _ = self.output_queue.get_nowait() + except asyncio.QueueEmpty: + break + except AttributeError: + # In Python 3.8, it's asyncio.QueueEmpty, in 3.10+ it's asyncio.QueueEmpty + while not self.output_queue.empty(): + try: + _ = self.output_queue.get_nowait() + except: + break + + async def _output_task(self): + while not self.should_stop.is_set(): + try: + audio = await asyncio.wait_for(self.output_queue.get(), timeout=0.25) + self.out_stream.write(audio) + except asyncio.TimeoutError: + pass + + def _in_callback(self, in_data, frame_count, time_info, status): + if self.input_callback: + # Schedule the async callback to run in the event loop + try: + loop = asyncio.get_event_loop() + asyncio.run_coroutine_threadsafe(self.input_callback(in_data), loop) + except RuntimeError: + # No event loop running, ignore + pass + return (None, self.pyaudio.paContinue) diff --git a/tests/test_async_convai.py b/tests/test_async_convai.py new file mode 100644 index 00000000..72de00d2 --- /dev/null +++ b/tests/test_async_convai.py @@ -0,0 +1,366 @@ +import asyncio +import json +from unittest.mock import AsyncMock, MagicMock, patch +import pytest + +from elevenlabs.conversational_ai.conversation import ( + AsyncConversation, + AsyncAudioInterface, + ConversationInitiationData, +) + + +class MockAsyncAudioInterface(AsyncAudioInterface): + async def start(self, input_callback): + print("Async audio interface started") + self.input_callback = input_callback + + async def stop(self): + print("Async audio interface stopped") + + async def output(self, audio): + print(f"Would play audio of length: {len(audio)} bytes") + + async def interrupt(self): + print("Async audio interrupted") + + +# Add test constants and helpers at module level +TEST_CONVERSATION_ID = "test123" +TEST_AGENT_ID = "test_agent" + + +def create_mock_async_websocket(messages=None): + """Helper to create a mock async websocket with predefined responses""" + mock_ws = AsyncMock() + + if messages is None: + messages = [ + { + "type": "conversation_initiation_metadata", + "conversation_initiation_metadata_event": {"conversation_id": TEST_CONVERSATION_ID}, + }, + {"type": "agent_response", "agent_response_event": {"agent_response": "Hello there!"}}, + ] + + # Convert messages to JSON strings + json_messages = [json.dumps(msg) for msg in messages] + json_messages.extend(['{"type": "keep_alive"}'] * 10) # Add some keep-alive messages + + # Create an iterator + message_iter = iter(json_messages) + + async def mock_recv(): + try: + return next(message_iter) + except StopIteration: + # Simulate connection close after messages + raise asyncio.TimeoutError() + + mock_ws.recv = mock_recv + return mock_ws + + +@pytest.mark.asyncio +async def test_async_conversation_basic_flow(): + # Mock setup + mock_ws = create_mock_async_websocket() + mock_client = MagicMock() + agent_response_callback = AsyncMock() + test_user_id = "test_user_123" + + # Setup the conversation + config = ConversationInitiationData(user_id=test_user_id) + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + config=config, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + callback_agent_response=agent_response_callback, + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + + # Wait a bit for the callback to be called + await asyncio.sleep(0.1) + + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions - check the call was made with the right structure + send_calls = [call[0][0] for call in mock_ws.send.call_args_list] + init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + assert len(init_messages) == 1 + init_message = init_messages[0] + + assert init_message["type"] == "conversation_initiation_client_data" + assert init_message["custom_llm_extra_body"] == {} + assert init_message["conversation_config_override"] == {} + assert init_message["dynamic_variables"] == {} + assert init_message["source_info"]["source"] == "python_sdk" + assert "version" in init_message["source_info"] + assert init_message["user_id"] == test_user_id + agent_response_callback.assert_called_once_with("Hello there!") + assert conversation._conversation_id == TEST_CONVERSATION_ID + assert conversation.config.user_id == test_user_id + + +@pytest.mark.asyncio +async def test_async_conversation_with_auth(): + # Mock setup + mock_client = MagicMock() + mock_client.conversational_ai.conversations.get_signed_url.return_value.signed_url = "wss://signed.url" + mock_ws = create_mock_async_websocket( + [ + { + "type": "conversation_initiation_metadata", + "conversation_initiation_metadata_event": {"conversation_id": TEST_CONVERSATION_ID}, + } + ] + ) + + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=True, + audio_interface=MockAsyncAudioInterface(), + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions + mock_client.conversational_ai.conversations.get_signed_url.assert_called_once_with(agent_id=TEST_AGENT_ID) + + +@pytest.mark.asyncio +async def test_async_conversation_with_dynamic_variables(): + # Mock setup + mock_ws = create_mock_async_websocket() + mock_client = MagicMock() + agent_response_callback = AsyncMock() + + dynamic_variables = {"name": "angelo"} + config = ConversationInitiationData(dynamic_variables=dynamic_variables) + + # Setup the conversation + conversation = AsyncConversation( + client=mock_client, + config=config, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + callback_agent_response=agent_response_callback, + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + + # Wait a bit for the callback to be called + await asyncio.sleep(0.1) + + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions - check the call was made with the right structure + send_calls = [call[0][0] for call in mock_ws.send.call_args_list] + init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + assert len(init_messages) == 1 + init_message = init_messages[0] + + assert init_message["type"] == "conversation_initiation_client_data" + assert init_message["custom_llm_extra_body"] == {} + assert init_message["conversation_config_override"] == {} + assert init_message["dynamic_variables"] == {"name": "angelo"} + assert init_message["source_info"]["source"] == "python_sdk" + assert "version" in init_message["source_info"] + agent_response_callback.assert_called_once_with("Hello there!") + assert conversation._conversation_id == TEST_CONVERSATION_ID + + +@pytest.mark.asyncio +async def test_async_conversation_with_contextual_update(): + # Mock setup + mock_ws = create_mock_async_websocket([]) + mock_client = MagicMock() + + # Setup the conversation + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + await asyncio.sleep(0.1) + + await conversation.send_contextual_update("User appears to be looking at pricing page") + + # Teardown + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions + expected = json.dumps({"type": "contextual_update", "text": "User appears to be looking at pricing page"}) + mock_ws.send.assert_any_call(expected) + + +@pytest.mark.asyncio +async def test_async_conversation_send_user_message(): + # Mock setup + mock_ws = create_mock_async_websocket([]) + mock_client = MagicMock() + + # Setup the conversation + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + await asyncio.sleep(0.1) + + await conversation.send_user_message("Hello, how are you?") + + # Teardown + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions + expected = json.dumps({"type": "user_message", "text": "Hello, how are you?"}) + mock_ws.send.assert_any_call(expected) + + +@pytest.mark.asyncio +async def test_async_conversation_register_user_activity(): + # Mock setup + mock_ws = create_mock_async_websocket([]) + mock_client = MagicMock() + + # Setup the conversation + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + await asyncio.sleep(0.1) + + await conversation.register_user_activity() + + # Teardown + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions + expected = json.dumps({"type": "user_activity"}) + mock_ws.send.assert_any_call(expected) + + +@pytest.mark.asyncio +async def test_async_conversation_callback_flows(): + # Mock setup for testing all callback types + messages = [ + { + "type": "conversation_initiation_metadata", + "conversation_initiation_metadata_event": {"conversation_id": TEST_CONVERSATION_ID}, + }, + {"type": "agent_response", "agent_response_event": {"agent_response": "Hello there!"}}, + { + "type": "agent_response_correction", + "agent_response_correction_event": { + "original_agent_response": "Hello ther!", + "corrected_agent_response": "Hello there!" + } + }, + { + "type": "user_transcript", + "user_transcription_event": {"user_transcript": "Hi, how are you?"} + }, + { + "type": "ping", + "ping_event": {"event_id": "123", "ping_ms": 50} + }, + { + "type": "interruption", + "interruption_event": {"event_id": "456"} + }, + { + "type": "audio", + "audio_event": {"event_id": "789", "audio_base_64": "dGVzdA=="} # "test" in base64 + } + ] + + mock_ws = create_mock_async_websocket(messages) + mock_client = MagicMock() + + # Setup callbacks + agent_response_callback = AsyncMock() + agent_response_correction_callback = AsyncMock() + user_transcript_callback = AsyncMock() + latency_measurement_callback = AsyncMock() + end_session_callback = AsyncMock() + + # Setup the conversation + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface(), + callback_agent_response=agent_response_callback, + callback_agent_response_correction=agent_response_correction_callback, + callback_user_transcript=user_transcript_callback, + callback_latency_measurement=latency_measurement_callback, + callback_end_session=end_session_callback, + ) + + # Run the test + with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: + mock_connect.return_value.__aenter__.return_value = mock_ws + + await conversation.start_session() + + # Wait for callbacks to be processed + await asyncio.sleep(0.2) + + await conversation.end_session() + await conversation.wait_for_session_end() + + # Assertions + agent_response_callback.assert_called_with("Hello there!") + agent_response_correction_callback.assert_called_with("Hello ther!", "Hello there!") + user_transcript_callback.assert_called_with("Hi, how are you?") + latency_measurement_callback.assert_called_with(50) + end_session_callback.assert_called_once() + assert conversation._conversation_id == TEST_CONVERSATION_ID + assert conversation._last_interrupt_id == 456 From 5fc97ce0d41e59951798d0cbf4d72c648a149f31 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 17:04:25 +0200 Subject: [PATCH 07/34] :herb: Fern Regeneration -- August 20, 2025 (#610) * SDK regeneration * compose_detailed parsing * ignore override --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Paul Asjes --- src/elevenlabs/__init__.py | 9 +- src/elevenlabs/client.py | 3 + src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/music/__init__.py | 13 +- src/elevenlabs/music/client.py | 108 +++++++ src/elevenlabs/music/raw_client.py | 192 ++++++++++++ src/elevenlabs/music/types/__init__.py | 7 +- ..._compose_detailed_request_output_format.py | 28 ++ src/elevenlabs/music_custom.py | 286 ++++++++++++++++++ src/elevenlabs/types/__init__.py | 4 - ...tailed_response_v_1_music_detailed_post.py | 44 --- src/elevenlabs/types/user.py | 7 +- 12 files changed, 648 insertions(+), 57 deletions(-) create mode 100644 src/elevenlabs/music/types/music_compose_detailed_request_output_format.py create mode 100644 src/elevenlabs/music_custom.py delete mode 100644 src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 107f3aec..d09a9e8a 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -56,7 +56,6 @@ BatchCallRecipientStatus, BatchCallResponse, BatchCallStatus, - BodyComposeMusicWithADetailedResponseV1MusicDetailedPost, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, BreakdownTypes, @@ -769,7 +768,11 @@ from .dubbing import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator from .environment import ElevenLabsEnvironment from .history import HistoryListRequestSource -from .music import MusicComposeRequestOutputFormat, MusicStreamRequestOutputFormat +from .music import ( + MusicComposeDetailedRequestOutputFormat, + MusicComposeRequestOutputFormat, + MusicStreamRequestOutputFormat, +) from .play import play, save, stream from .pronunciation_dictionaries import ( BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, @@ -886,7 +889,6 @@ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess", - "BodyComposeMusicWithADetailedResponseV1MusicDetailedPost", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", @@ -1270,6 +1272,7 @@ "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", + "MusicComposeDetailedRequestOutputFormat", "MusicComposeRequestOutputFormat", "MusicPrompt", "MusicStreamRequestOutputFormat", diff --git a/src/elevenlabs/client.py b/src/elevenlabs/client.py index 00b05309..a1c37c9e 100644 --- a/src/elevenlabs/client.py +++ b/src/elevenlabs/client.py @@ -8,6 +8,7 @@ from .environment import ElevenLabsEnvironment from .realtime_tts import RealtimeTextToSpeechClient from .webhooks_custom import WebhooksClient, AsyncWebhooksClient +from .music_custom import MusicClient, AsyncMusicClient # this is used as the default value for optional parameters @@ -59,6 +60,7 @@ def __init__( ) self.text_to_speech = RealtimeTextToSpeechClient(client_wrapper=self._client_wrapper) self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper) + self.music = MusicClient(client_wrapper=self._client_wrapper) class AsyncElevenLabs(AsyncBaseElevenLabs): @@ -102,3 +104,4 @@ def __init__( httpx_client=httpx_client ) self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) + self.music = AsyncMusicClient(client_wrapper=self._client_wrapper) diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 688f111c..76f445e9 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.10.0", + "User-Agent": "elevenlabs/v2.11.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.10.0", + "X-Fern-SDK-Version": "v2.11.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/music/__init__.py b/src/elevenlabs/music/__init__.py index 10111260..28d8ce0e 100644 --- a/src/elevenlabs/music/__init__.py +++ b/src/elevenlabs/music/__init__.py @@ -2,7 +2,16 @@ # isort: skip_file -from .types import MusicComposeRequestOutputFormat, MusicStreamRequestOutputFormat +from .types import ( + MusicComposeDetailedRequestOutputFormat, + MusicComposeRequestOutputFormat, + MusicStreamRequestOutputFormat, +) from . import composition_plan -__all__ = ["MusicComposeRequestOutputFormat", "MusicStreamRequestOutputFormat", "composition_plan"] +__all__ = [ + "MusicComposeDetailedRequestOutputFormat", + "MusicComposeRequestOutputFormat", + "MusicStreamRequestOutputFormat", + "composition_plan", +] diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 984922a4..975d1ab5 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -7,6 +7,7 @@ from ..types.music_prompt import MusicPrompt from .composition_plan.client import AsyncCompositionPlanClient, CompositionPlanClient from .raw_client import AsyncRawMusicClient, RawMusicClient +from .types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat @@ -83,6 +84,59 @@ def compose( ) as r: yield from r.data + def compose_detailed( + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeDetailedRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + Successful Response + """ + with self._raw_client.compose_detailed( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + yield from r.data + def stream( self, *, @@ -207,6 +261,60 @@ async def compose( async for _chunk in r.data: yield _chunk + async def compose_detailed( + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeDetailedRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + Successful Response + """ + async with self._raw_client.compose_detailed( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk + async def stream( self, *, diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index eb51bb10..0a0c38b4 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -13,6 +13,7 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.http_validation_error import HttpValidationError from ..types.music_prompt import MusicPrompt +from .types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat @@ -119,6 +120,101 @@ def _stream() -> HttpResponse[typing.Iterator[bytes]]: yield _stream() + @contextlib.contextmanager + def compose_detailed( + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeDetailedRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + Successful Response + """ + with self._client_wrapper.httpx_client.stream( + "v1/music/detailed", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + @contextlib.contextmanager def stream( self, @@ -315,6 +411,102 @@ async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: yield await _stream() + @contextlib.asynccontextmanager + async def compose_detailed( + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Compose a song from a prompt or a composition plan. + + Parameters + ---------- + output_format : typing.Optional[MusicComposeDetailedRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + prompt : typing.Optional[str] + A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + + music_prompt : typing.Optional[MusicPrompt] + A music prompt. Deprecated. Use `composition_plan` instead. + + composition_plan : typing.Optional[MusicPrompt] + A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + + music_length_ms : typing.Optional[int] + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + + model_id : typing.Optional[typing.Literal["music_v1"]] + The model to use for the generation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + Successful Response + """ + async with self._client_wrapper.httpx_client.stream( + "v1/music/detailed", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "prompt": prompt, + "music_prompt": convert_and_respect_annotation_metadata( + object_=music_prompt, annotation=MusicPrompt, direction="write" + ), + "composition_plan": convert_and_respect_annotation_metadata( + object_=composition_plan, annotation=MusicPrompt, direction="write" + ), + "music_length_ms": music_length_ms, + "model_id": model_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() + @contextlib.asynccontextmanager async def stream( self, diff --git a/src/elevenlabs/music/types/__init__.py b/src/elevenlabs/music/types/__init__.py index b282372e..0ee5210c 100644 --- a/src/elevenlabs/music/types/__init__.py +++ b/src/elevenlabs/music/types/__init__.py @@ -2,7 +2,12 @@ # isort: skip_file +from .music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .music_compose_request_output_format import MusicComposeRequestOutputFormat from .music_stream_request_output_format import MusicStreamRequestOutputFormat -__all__ = ["MusicComposeRequestOutputFormat", "MusicStreamRequestOutputFormat"] +__all__ = [ + "MusicComposeDetailedRequestOutputFormat", + "MusicComposeRequestOutputFormat", + "MusicStreamRequestOutputFormat", +] diff --git a/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py b/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py new file mode 100644 index 00000000..cbf22684 --- /dev/null +++ b/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MusicComposeDetailedRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/music_custom.py b/src/elevenlabs/music_custom.py new file mode 100644 index 00000000..ae199183 --- /dev/null +++ b/src/elevenlabs/music_custom.py @@ -0,0 +1,286 @@ +import typing +import json +import re +from dataclasses import dataclass + +from elevenlabs.music.client import MusicClient as AutogeneratedMusicClient, AsyncMusicClient as AutogeneratedAsyncMusicClient +from elevenlabs.types.music_prompt import MusicPrompt +from elevenlabs.music.types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat +from elevenlabs.core.request_options import RequestOptions + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +@dataclass +class SongMetadata: + title: str + description: str + genres: typing.List[str] + languages: typing.List[str] + is_explicit: bool + + +@dataclass +class MultipartResponse: + json: typing.Dict[str, typing.Any] # Contains compositionPlan and songMetadata + audio: bytes + filename: str + + +class MusicClient(AutogeneratedMusicClient): + """ + A client to handle ElevenLabs music-related functionality + Extends the autogenerated client to include custom music methods + """ + + def compose_detailed( # type: ignore[override] + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> MultipartResponse: + """ + Compose a song from a prompt or a composition plan with detailed response parsing. + This method calls the original compose_detailed and then parses the stream response. + + Returns a MultipartResponse containing parsed JSON metadata, audio bytes, and filename. + """ + # Call the parent method to get the stream + stream = super().compose_detailed( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) + + # Parse the stream using the parsing method + return self._parse_multipart(stream) + + def _parse_multipart(self, stream: typing.Iterator[bytes]) -> MultipartResponse: + """ + Reads a byte stream containing multipart data and parses it into JSON and audio parts. + + Args: + stream: Iterator of bytes from ElevenLabs music API response + + Returns: + MultipartResponse containing parsed JSON metadata, audio bytes, and filename + """ + # Collect all chunks into a single bytes object + chunks = [] + for chunk in stream: + chunks.append(chunk) + + # Combine all chunks into a single buffer + response_bytes = b''.join(chunks) + + # Parse the multipart content + response_text = response_bytes.decode('utf-8', errors='ignore') + lines = response_text.split('\n') + + if not lines: + raise ValueError("Empty response from music API") + + boundary = lines[0].strip() + + # Find the JSON part (should be early in the response) + json_data = None + filename = 'generated_music.mp3' + + # Parse JSON from the text representation + for i in range(min(10, len(lines))): + if 'Content-Type: application/json' in lines[i] and i + 2 < len(lines): + json_line = lines[i + 2] + if json_line.strip() and json_line.startswith('{'): + try: + json_data = json.loads(json_line) + print('✓ Successfully parsed JSON metadata') + except json.JSONDecodeError as e: + print(f'Failed to parse JSON: {e}') + break + + # Extract filename from headers + for i in range(min(20, len(lines))): + if 'filename=' in lines[i]: + match = re.search(r'filename="([^"]+)"', lines[i]) + if match: + filename = match.group(1) + break + + # Find where the audio data starts (after the second boundary and headers) + boundary_bytes = boundary.encode('utf-8') + first_boundary = -1 + second_boundary = -1 + + for i in range(len(response_bytes) - len(boundary_bytes) + 1): + if response_bytes[i:i + len(boundary_bytes)] == boundary_bytes: + if first_boundary == -1: + first_boundary = i + elif second_boundary == -1: + second_boundary = i + break + + if second_boundary == -1: + raise ValueError('Could not find audio part boundary') + + # Find the start of audio data (after headers and empty line) + audio_start = second_boundary + len(boundary_bytes) + + # Skip past the headers to find the empty line (\n\n) + while audio_start < len(response_bytes) - 1: + if (response_bytes[audio_start] == 0x0A and + response_bytes[audio_start + 1] == 0x0A): + # Found \n\n - audio starts after this + audio_start += 2 + break + audio_start += 1 + + # Audio goes until the end (or until we find another boundary) + audio_buffer = response_bytes[audio_start:] + + if not json_data: + raise ValueError('Could not parse JSON data') + + return MultipartResponse( + json=json_data, + audio=audio_buffer, + filename=filename + ) + + +class AsyncMusicClient(AutogeneratedAsyncMusicClient): + """ + An async client to handle ElevenLabs music-related functionality + Extends the autogenerated async client to include custom music methods + """ + + async def compose_detailed( # type: ignore[override] + self, + *, + output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, + prompt: typing.Optional[str] = OMIT, + music_prompt: typing.Optional[MusicPrompt] = OMIT, + composition_plan: typing.Optional[MusicPrompt] = OMIT, + music_length_ms: typing.Optional[int] = OMIT, + model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> MultipartResponse: + """ + Compose a song from a prompt or a composition plan with detailed response parsing. + This method calls the original compose_detailed and then parses the stream response. + + Returns a MultipartResponse containing parsed JSON metadata, audio bytes, and filename. + """ + # Call the parent method to get the stream + stream = super().compose_detailed( + output_format=output_format, + prompt=prompt, + music_prompt=music_prompt, + composition_plan=composition_plan, + music_length_ms=music_length_ms, + model_id=model_id, + request_options=request_options, + ) + + # Parse the stream using the parsing method + return await self._parse_multipart_async(stream) + + async def _parse_multipart_async(self, stream: typing.AsyncIterator[bytes]) -> MultipartResponse: + """ + Reads an async byte stream containing multipart data and parses it into JSON and audio parts. + + Args: + stream: AsyncIterator of bytes from ElevenLabs music API response + + Returns: + MultipartResponse containing parsed JSON metadata, audio bytes, and filename + """ + # Collect all chunks into a single bytes object + chunks = [] + async for chunk in stream: + chunks.append(chunk) + + # Combine all chunks into a single buffer + response_bytes = b''.join(chunks) + + # Parse the multipart content + response_text = response_bytes.decode('utf-8', errors='ignore') + lines = response_text.split('\n') + + if not lines: + raise ValueError("Empty response from music API") + + boundary = lines[0].strip() + + # Find the JSON part (should be early in the response) + json_data = None + filename = 'generated_music.mp3' + + # Parse JSON from the text representation + for i in range(min(10, len(lines))): + if 'Content-Type: application/json' in lines[i] and i + 2 < len(lines): + json_line = lines[i + 2] + if json_line.strip() and json_line.startswith('{'): + try: + json_data = json.loads(json_line) + print('✓ Successfully parsed JSON metadata') + except json.JSONDecodeError as e: + print(f'Failed to parse JSON: {e}') + break + + # Extract filename from headers + for i in range(min(20, len(lines))): + if 'filename=' in lines[i]: + match = re.search(r'filename="([^"]+)"', lines[i]) + if match: + filename = match.group(1) + break + + # Find where the audio data starts (after the second boundary and headers) + boundary_bytes = boundary.encode('utf-8') + first_boundary = -1 + second_boundary = -1 + + for i in range(len(response_bytes) - len(boundary_bytes) + 1): + if response_bytes[i:i + len(boundary_bytes)] == boundary_bytes: + if first_boundary == -1: + first_boundary = i + elif second_boundary == -1: + second_boundary = i + break + + if second_boundary == -1: + raise ValueError('Could not find audio part boundary') + + # Find the start of audio data (after headers and empty line) + audio_start = second_boundary + len(boundary_bytes) + + # Skip past the headers to find the empty line (\n\n) + while audio_start < len(response_bytes) - 1: + if (response_bytes[audio_start] == 0x0A and + response_bytes[audio_start + 1] == 0x0A): + # Found \n\n - audio starts after this + audio_start += 2 + break + audio_start += 1 + + # Audio goes until the end (or until we find another boundary) + audio_buffer = response_bytes[audio_start:] + + if not json_data: + raise ValueError('Could not parse JSON data') + + return MultipartResponse( + json=json_data, + audio=audio_buffer, + filename=filename + ) \ No newline at end of file diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 7ed686b9..0d348598 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -57,9 +57,6 @@ from .batch_call_recipient_status import BatchCallRecipientStatus from .batch_call_response import BatchCallResponse from .batch_call_status import BatchCallStatus -from .body_compose_music_with_a_detailed_response_v_1_music_detailed_post import ( - BodyComposeMusicWithADetailedResponseV1MusicDetailedPost, -) from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age import ( BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, ) @@ -899,7 +896,6 @@ "BatchCallRecipientStatus", "BatchCallResponse", "BatchCallStatus", - "BodyComposeMusicWithADetailedResponseV1MusicDetailedPost", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", "BreakdownTypes", diff --git a/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py b/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py deleted file mode 100644 index 67bef216..00000000 --- a/src/elevenlabs/types/body_compose_music_with_a_detailed_response_v_1_music_detailed_post.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .music_prompt import MusicPrompt - - -class BodyComposeMusicWithADetailedResponseV1MusicDetailedPost(UncheckedBaseModel): - prompt: typing.Optional[str] = pydantic.Field(default=None) - """ - A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - """ - - music_prompt: typing.Optional[MusicPrompt] = pydantic.Field(default=None) - """ - A music prompt. Deprecated. Use `composition_plan` instead. - """ - - composition_plan: typing.Optional[MusicPrompt] = pydantic.Field(default=None) - """ - A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. - """ - - music_length_ms: typing.Optional[int] = pydantic.Field(default=None) - """ - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. - """ - - model_id: typing.Optional[typing.Literal["music_v1"]] = pydantic.Field(default=None) - """ - The model to use for the generation. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/user.py b/src/elevenlabs/types/user.py index 857d0126..c2080846 100644 --- a/src/elevenlabs/types/user.py +++ b/src/elevenlabs/types/user.py @@ -27,7 +27,7 @@ class User(UncheckedBaseModel): is_new_user: bool = pydantic.Field() """ - Whether the user is new. + Whether the user is new. This field is deprecated and will be removed in the future. Use 'created_at' instead. """ xi_api_key: typing.Optional[str] = pydantic.Field(default=None) @@ -75,6 +75,11 @@ class User(UncheckedBaseModel): The Partnerstack partner default link of the user. """ + created_at: int = pydantic.Field() + """ + The unix timestamp of the user's creation. 0 if the user was created before the unix timestamp was added. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: From ec45e3fc3a2be589b27e2fb8e9eaaa379a2443b6 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Fri, 22 Aug 2025 17:47:58 +0200 Subject: [PATCH 08/34] Update fernignore (#613) --- .fernignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.fernignore b/.fernignore index d7e75b72..5979d745 100644 --- a/.fernignore +++ b/.fernignore @@ -7,6 +7,7 @@ src/elevenlabs/conversational_ai/default_audio_interface.py src/elevenlabs/realtime_tts.py src/elevenlabs/play.py src/elevenlabs/webhooks_custom.py +src/elevenlabs/music_custom.py # Ignore CI files .github/ From 2ebc69ad766195632f72bd16ada794a7cdb7ea29 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:57:05 +0100 Subject: [PATCH 09/34] SDK regeneration (#614) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 944 +++++++++++- src/elevenlabs/__init__.py | 78 + src/elevenlabs/base_client.py | 1036 +++++++++++++ .../conversational_ai/tools/client.py | 4 +- .../conversational_ai/tools/raw_client.py | 4 +- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/music/client.py | 4 +- src/elevenlabs/music/raw_client.py | 4 +- .../pronunciation_dictionaries/client.py | 174 ++- .../pronunciation_dictionaries/raw_client.py | 328 ++-- src/elevenlabs/raw_base_client.py | 1313 +++++++++++++++++ ..._user_id_api_keys_post_permissions_item.py | 3 + ..._keys_api_key_id_patch_permissions_item.py | 3 + src/elevenlabs/speech_to_text/client.py | 4 +- src/elevenlabs/speech_to_text/raw_client.py | 4 +- src/elevenlabs/text_to_dialogue/client.py | 8 +- src/elevenlabs/text_to_dialogue/raw_client.py | 8 +- .../text_to_sound_effects/client.py | 4 +- .../text_to_sound_effects/raw_client.py | 4 +- src/elevenlabs/types/__init__.py | 80 + ..._config_override_for_test_request_model.py | 31 + .../types/agent_failure_response_example.py | 21 + .../agent_successful_response_example.py | 21 + .../types/agent_testing_settings.py | 3 +- src/elevenlabs/types/attached_test_model.py | 20 + ..._system_tool_result_common_model_result.py | 16 + ...it_test_request_dynamic_variables_value.py | 5 + .../types/create_unit_test_response_model.py | 20 + .../types/detailed_music_response.py | 34 + .../exact_parameter_evaluation_strategy.py | 23 + ...scription_response_model_pending_change.py | 10 + .../types/features_usage_common_model.py | 2 + ...et_test_suite_invocation_response_model.py | 34 + .../types/get_tests_page_response_model.py | 23 + ...t_tests_summaries_by_ids_response_model.py | 24 + .../types/get_unit_test_response_model.py | 65 + ..._response_model_dynamic_variables_value.py | 5 + src/elevenlabs/types/llm.py | 4 +- .../llm_parameter_evaluation_strategy.py | 23 + .../types/multipart_music_response.py | 33 + .../pending_cancellation_response_model.py | 24 + ...ding_subscription_switch_response_model.py | 30 + ...ription_switch_response_model_next_tier.py | 19 + .../types/referenced_tool_common_model.py | 33 + .../regex_parameter_evaluation_strategy.py | 23 + .../types/single_test_run_request_model.py | 23 + src/elevenlabs/types/song_metadata.py | 43 + src/elevenlabs/types/subscription.py | 6 + .../test_condition_rationale_common_model.py | 32 + .../test_condition_result_common_model.py | 23 + src/elevenlabs/types/test_run_status.py | 5 + .../types/test_tool_result_model.py | 21 + .../types/unit_test_run_response_model.py | 40 + .../types/unit_test_summary_response_model.py | 44 + ...t_test_tool_call_evaluation_model_input.py | 30 + ..._test_tool_call_evaluation_model_output.py | 30 + .../types/unit_test_tool_call_parameter.py | 22 + .../unit_test_tool_call_parameter_eval.py | 60 + ...it_test_request_dynamic_variables_value.py | 5 + .../types/webhook_auth_method_type.py | 2 +- .../workflow_features_usage_common_model.py | 22 + ...api_key_response_model_permissions_item.py | 3 + .../types/workspace_resource_type.py | 1 - 64 files changed, 4802 insertions(+), 169 deletions(-) create mode 100644 src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py create mode 100644 src/elevenlabs/types/agent_failure_response_example.py create mode 100644 src/elevenlabs/types/agent_successful_response_example.py create mode 100644 src/elevenlabs/types/attached_test_model.py create mode 100644 src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py create mode 100644 src/elevenlabs/types/create_unit_test_response_model.py create mode 100644 src/elevenlabs/types/detailed_music_response.py create mode 100644 src/elevenlabs/types/exact_parameter_evaluation_strategy.py create mode 100644 src/elevenlabs/types/extended_subscription_response_model_pending_change.py create mode 100644 src/elevenlabs/types/get_test_suite_invocation_response_model.py create mode 100644 src/elevenlabs/types/get_tests_page_response_model.py create mode 100644 src/elevenlabs/types/get_tests_summaries_by_ids_response_model.py create mode 100644 src/elevenlabs/types/get_unit_test_response_model.py create mode 100644 src/elevenlabs/types/get_unit_test_response_model_dynamic_variables_value.py create mode 100644 src/elevenlabs/types/llm_parameter_evaluation_strategy.py create mode 100644 src/elevenlabs/types/multipart_music_response.py create mode 100644 src/elevenlabs/types/pending_cancellation_response_model.py create mode 100644 src/elevenlabs/types/pending_subscription_switch_response_model.py create mode 100644 src/elevenlabs/types/pending_subscription_switch_response_model_next_tier.py create mode 100644 src/elevenlabs/types/referenced_tool_common_model.py create mode 100644 src/elevenlabs/types/regex_parameter_evaluation_strategy.py create mode 100644 src/elevenlabs/types/single_test_run_request_model.py create mode 100644 src/elevenlabs/types/song_metadata.py create mode 100644 src/elevenlabs/types/test_condition_rationale_common_model.py create mode 100644 src/elevenlabs/types/test_condition_result_common_model.py create mode 100644 src/elevenlabs/types/test_run_status.py create mode 100644 src/elevenlabs/types/test_tool_result_model.py create mode 100644 src/elevenlabs/types/unit_test_run_response_model.py create mode 100644 src/elevenlabs/types/unit_test_summary_response_model.py create mode 100644 src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py create mode 100644 src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py create mode 100644 src/elevenlabs/types/unit_test_tool_call_parameter.py create mode 100644 src/elevenlabs/types/unit_test_tool_call_parameter_eval.py create mode 100644 src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py create mode 100644 src/elevenlabs/types/workflow_features_usage_common_model.py diff --git a/pyproject.toml b/pyproject.toml index ddf90ee0..b43643b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.11.0" +version = "v2.12.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index c945b2a0..d81be1e2 100644 --- a/reference.md +++ b/reference.md @@ -1,4 +1,852 @@ # Reference +
client.create_agent_response_test_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new agent response test. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, +) + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.create_agent_response_test_route( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]` + +
+
+ +
+
+ +**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False. + +
+
+ +
+
+ +**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful + +
+
+ +
+
+ +**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + +
+
+ +
+
+ +**dynamic_variables:** `typing.Optional[ + typing.Dict[ + str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue] + ] +]` — Dynamic variables to replace in the agent config during testing + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.get_agent_response_test_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.get_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.update_agent_response_test_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, +) + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.update_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]` + +
+
+ +
+
+ +**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False. + +
+
+ +
+
+ +**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful + +
+
+ +
+
+ +**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + +
+
+ +
+
+ +**dynamic_variables:** `typing.Optional[ + typing.Dict[ + str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue] + ] +]` — Dynamic variables to replace in the agent config during testing + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.delete_chat_response_test_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.delete_chat_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.get_agent_response_tests_summaries_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.get_agent_response_tests_summaries_route( + test_ids=["test_id_1", "test_id_2"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_ids:** `typing.Sequence[str]` — List of test IDs to fetch. No duplicates allowed. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.list_chat_response_tests_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists all agent response tests with pagination support and optional search filtering. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.list_chat_response_tests_route() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search query to filter tests by name. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.run_agent_test_suite_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, SingleTestRunRequestModel + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.run_agent_test_suite_route( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**tests:** `typing.Sequence[SingleTestRunRequestModel]` — List of tests to run on the agent + +
+
+ +
+
+ +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.get_test_invocation_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a test invocation by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.get_test_invocation_route( + test_invocation_id="test_invocation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.resubmit_tests_route(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resubmits specific test runs from a test invocation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.resubmit_tests_route( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**test_run_ids:** `typing.Sequence[str]` — List of test run IDs to resubmit + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to resubmit tests for + +
+
+ +
+
+ +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+
client.save_a_voice_preview()
@@ -367,7 +1215,7 @@ client.text_to_sound_effects.convert(
-**duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None. +**duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None.
@@ -1336,7 +2184,7 @@ Defaults to None.
-Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. +Converts a list of text and voice ID pairs into speech (dialogue) and returns audio.
@@ -1455,7 +2303,7 @@ client.text_to_dialogue.convert(
-Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. +Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream.
@@ -4677,6 +5525,92 @@ client.pronunciation_dictionaries.get(
+ +
+ + +
client.pronunciation_dictionaries.update(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Partially update the pronunciation dictionary without changing the version +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.pronunciation_dictionaries.update( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**archived:** `typing.Optional[bool]` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -5046,7 +5980,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**cloud_storage_url:** `typing.Optional[str]` — The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. +**cloud_storage_url:** `typing.Optional[str]` — The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters.
@@ -7401,7 +8335,7 @@ client.conversational_ai.knowledge_base.list()
-Get all available tools available in the workspace. +Get all available tools in the workspace.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index d09a9e8a..73171f97 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -16,15 +16,18 @@ AddWorkspaceInviteResponseModel, AdditionalFormatResponseModel, AdditionalFormats, + AdhocAgentConfigOverrideForTestRequestModel, Age, AgentCallLimits, AgentConfig, AgentConfigOverride, AgentConfigOverrideConfig, + AgentFailureResponseExample, AgentMetadataResponseModel, AgentPlatformSettingsRequestModel, AgentPlatformSettingsResponseModel, AgentSimulatedChatTestResponseModel, + AgentSuccessfulResponseExample, AgentSummaryResponseModel, AgentTestingSettings, AgentTransfer, @@ -40,6 +43,7 @@ AsrInputFormat, AsrProvider, AsrQuality, + AttachedTestModel, AudioNativeCreateProjectResponseModel, AudioNativeEditContentResponseModel, AudioNativeProjectSettingsResponseModel, @@ -158,6 +162,7 @@ ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, @@ -208,6 +213,8 @@ CreateSipTrunkPhoneNumberRequest, CreateTranscriptRequest, CreateTwilioPhoneNumberRequest, + CreateUnitTestRequestDynamicVariablesValue, + CreateUnitTestResponseModel, CustomLlm, CustomLlmRequestHeadersValue, DashboardCallSuccessChartModel, @@ -233,6 +240,7 @@ DependentPhoneNumberIdentifier, DependentUnknownAgentIdentifier, DependentUnknownToolIdentifier, + DetailedMusicResponse, DialogueInput, DialogueInputResponseModel, DoDubbingResponse, @@ -260,6 +268,7 @@ EndCallToolResultModel, EvaluationSettings, EvaluationSuccessResult, + ExactParameterEvaluationStrategy, ExportOptions, ExportOptions_Docx, ExportOptions_Html, @@ -270,6 +279,7 @@ ExtendedSubscriptionResponseModelBillingPeriod, ExtendedSubscriptionResponseModelCharacterRefreshPeriod, ExtendedSubscriptionResponseModelCurrency, + ExtendedSubscriptionResponseModelPendingChange, FeatureStatusCommonModel, FeaturesUsageCommonModel, FeedbackItem, @@ -345,10 +355,15 @@ GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, GetPronunciationDictionaryResponse, GetSpeechHistoryResponse, + GetTestSuiteInvocationResponseModel, + GetTestsPageResponseModel, + GetTestsSummariesByIdsResponseModel, GetToolDependentAgentsResponseModel, GetToolDependentAgentsResponseModelAgentsItem, GetToolDependentAgentsResponseModelAgentsItem_Available, GetToolDependentAgentsResponseModelAgentsItem_Unknown, + GetUnitTestResponseModel, + GetUnitTestResponseModelDynamicVariablesValue, GetVoicesResponse, GetVoicesV2Response, GetWorkspaceSecretsResponseModel, @@ -385,6 +400,7 @@ Llm, LlmCategoryUsage, LlmInputOutputTokensUsage, + LlmParameterEvaluationStrategy, LlmTokensCategoryUsage, LlmUsageCalculatorLlmResponseModel, LlmUsageCalculatorResponseModel, @@ -420,6 +436,7 @@ ModerationStatusResponseModelSafetyStatus, ModerationStatusResponseModelWarningStatus, MultichannelSpeechToTextResponseModel, + MultipartMusicResponse, MusicPrompt, NormalizedAlignment, ObjectJsonSchemaPropertyInput, @@ -432,6 +449,9 @@ OutboundSipTrunkConfigRequestModel, OutputFormat, PdfExportOptions, + PendingCancellationResponseModel, + PendingSubscriptionSwitchResponseModel, + PendingSubscriptionSwitchResponseModelNextTier, PhoneNumberAgentInfo, PhoneNumberTransfer, PhoneNumberTransferDestination, @@ -510,6 +530,8 @@ ReaderResourceResponseModelResourceType, RealtimeVoiceSettings, RecordingResponse, + ReferencedToolCommonModel, + RegexParameterEvaluationStrategy, RemoveMemberFromGroupRequest, Render, RenderStatus, @@ -540,6 +562,7 @@ SimilarVoice, SimilarVoiceCategory, SimilarVoicesForSpeakerResponse, + SingleTestRunRequestModel, SipMediaEncryptionEnum, SipTrunkCredentialsRequestModel, SipTrunkOutboundCallResponse, @@ -547,6 +570,7 @@ SipUriTransferDestination, SkipTurnToolConfig, SkipTurnToolResponseModel, + SongMetadata, SongSection, SpeakerAudioResponseModel, SpeakerResponseModel, @@ -595,6 +619,10 @@ SystemToolConfigOutputParams_TransferToNumber, SystemToolConfigOutputParams_VoicemailDetection, TelephonyProvider, + TestConditionRationaleCommonModel, + TestConditionResultCommonModel, + TestRunStatus, + TestToolResultModel, TextToSpeechApplyTextNormalizationEnum, TextToSpeechOutputFormatEnum, TextToSpeechStreamRequest, @@ -638,10 +666,20 @@ TurnMode, TwilioOutboundCallResponse, TxtExportOptions, + UnitTestRunResponseModel, + UnitTestSummaryResponseModel, + UnitTestToolCallEvaluationModelInput, + UnitTestToolCallEvaluationModelOutput, + UnitTestToolCallParameter, + UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Exact, + UnitTestToolCallParameterEval_Llm, + UnitTestToolCallParameterEval_Regex, UpdateAudioNativeProjectRequest, UpdateChapterRequest, UpdateProjectRequest, UpdatePronunciationDictionariesRequest, + UpdateUnitTestRequestDynamicVariablesValue, UpdateWorkspaceMemberResponseModel, UrlAvatar, UsageAggregationInterval, @@ -706,6 +744,7 @@ WidgetPlacement, WidgetStyles, WidgetTextContents, + WorkflowFeaturesUsageCommonModel, WorkflowToolEdgeStepModel, WorkflowToolMaxIterationsExceededStepModel, WorkflowToolNestedToolsStepModelInput, @@ -841,15 +880,18 @@ "AddWorkspaceInviteResponseModel", "AdditionalFormatResponseModel", "AdditionalFormats", + "AdhocAgentConfigOverrideForTestRequestModel", "Age", "AgentCallLimits", "AgentConfig", "AgentConfigOverride", "AgentConfigOverrideConfig", + "AgentFailureResponseExample", "AgentMetadataResponseModel", "AgentPlatformSettingsRequestModel", "AgentPlatformSettingsResponseModel", "AgentSimulatedChatTestResponseModel", + "AgentSuccessfulResponseExample", "AgentSummaryResponseModel", "AgentTestingSettings", "AgentTransfer", @@ -866,6 +908,7 @@ "AsrProvider", "AsrQuality", "AsyncElevenLabs", + "AttachedTestModel", "AudioIsolationConvertRequestFileFormat", "AudioIsolationStreamRequestFileFormat", "AudioNativeCreateProjectResponseModel", @@ -1004,6 +1047,7 @@ "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", @@ -1054,6 +1098,8 @@ "CreateSipTrunkPhoneNumberRequest", "CreateTranscriptRequest", "CreateTwilioPhoneNumberRequest", + "CreateUnitTestRequestDynamicVariablesValue", + "CreateUnitTestResponseModel", "CustomLlm", "CustomLlmRequestHeadersValue", "DashboardCallSuccessChartModel", @@ -1079,6 +1125,7 @@ "DependentPhoneNumberIdentifier", "DependentUnknownAgentIdentifier", "DependentUnknownToolIdentifier", + "DetailedMusicResponse", "DialogueInput", "DialogueInputResponseModel", "DoDubbingResponse", @@ -1110,6 +1157,7 @@ "EndCallToolResultModel", "EvaluationSettings", "EvaluationSuccessResult", + "ExactParameterEvaluationStrategy", "ExportOptions", "ExportOptions_Docx", "ExportOptions_Html", @@ -1120,6 +1168,7 @@ "ExtendedSubscriptionResponseModelBillingPeriod", "ExtendedSubscriptionResponseModelCharacterRefreshPeriod", "ExtendedSubscriptionResponseModelCurrency", + "ExtendedSubscriptionResponseModelPendingChange", "FeatureStatusCommonModel", "FeaturesUsageCommonModel", "FeedbackItem", @@ -1196,10 +1245,15 @@ "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", "GetSpeechHistoryResponse", + "GetTestSuiteInvocationResponseModel", + "GetTestsPageResponseModel", + "GetTestsSummariesByIdsResponseModel", "GetToolDependentAgentsResponseModel", "GetToolDependentAgentsResponseModelAgentsItem", "GetToolDependentAgentsResponseModelAgentsItem_Available", "GetToolDependentAgentsResponseModelAgentsItem_Unknown", + "GetUnitTestResponseModel", + "GetUnitTestResponseModelDynamicVariablesValue", "GetVoicesResponse", "GetVoicesV2Response", "GetWorkspaceSecretsResponseModel", @@ -1237,6 +1291,7 @@ "Llm", "LlmCategoryUsage", "LlmInputOutputTokensUsage", + "LlmParameterEvaluationStrategy", "LlmTokensCategoryUsage", "LlmUsageCalculatorLlmResponseModel", "LlmUsageCalculatorResponseModel", @@ -1272,6 +1327,7 @@ "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", + "MultipartMusicResponse", "MusicComposeDetailedRequestOutputFormat", "MusicComposeRequestOutputFormat", "MusicPrompt", @@ -1288,6 +1344,9 @@ "OutboundSipTrunkConfigRequestModel", "OutputFormat", "PdfExportOptions", + "PendingCancellationResponseModel", + "PendingSubscriptionSwitchResponseModel", + "PendingSubscriptionSwitchResponseModelNextTier", "PhoneNumberAgentInfo", "PhoneNumberTransfer", "PhoneNumberTransferDestination", @@ -1370,6 +1429,8 @@ "ReceiveMessage", "ReceiveMessageMulti", "RecordingResponse", + "ReferencedToolCommonModel", + "RegexParameterEvaluationStrategy", "RemoveMemberFromGroupRequest", "Render", "RenderStatus", @@ -1402,6 +1463,7 @@ "SimilarVoice", "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", + "SingleTestRunRequestModel", "SipMediaEncryptionEnum", "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", @@ -1409,6 +1471,7 @@ "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", + "SongMetadata", "SongSection", "SpeakerAudioResponseModel", "SpeakerResponseModel", @@ -1465,6 +1528,10 @@ "SystemToolConfigOutputParams_TransferToNumber", "SystemToolConfigOutputParams_VoicemailDetection", "TelephonyProvider", + "TestConditionRationaleCommonModel", + "TestConditionResultCommonModel", + "TestRunStatus", + "TestToolResultModel", "TextToDialogueConvertRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", "TextToSoundEffectsConvertRequestOutputFormat", @@ -1518,11 +1585,21 @@ "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", + "UnitTestRunResponseModel", + "UnitTestSummaryResponseModel", + "UnitTestToolCallEvaluationModelInput", + "UnitTestToolCallEvaluationModelOutput", + "UnitTestToolCallParameter", + "UnitTestToolCallParameterEval", + "UnitTestToolCallParameterEval_Exact", + "UnitTestToolCallParameterEval_Llm", + "UnitTestToolCallParameterEval_Regex", "UnprocessableEntityError", "UpdateAudioNativeProjectRequest", "UpdateChapterRequest", "UpdateProjectRequest", "UpdatePronunciationDictionariesRequest", + "UpdateUnitTestRequestDynamicVariablesValue", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", "UsageAggregationInterval", @@ -1589,6 +1666,7 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowFeaturesUsageCommonModel", "WorkflowToolEdgeStepModel", "WorkflowToolMaxIterationsExceededStepModel", "WorkflowToolNestedToolsStepModelInput", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index 54d9566a..87c75ebc 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -25,12 +25,28 @@ from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient from .text_to_voice.client import AsyncTextToVoiceClient, TextToVoiceClient +from .types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from .types.agent_failure_response_example import AgentFailureResponseExample +from .types.agent_successful_response_example import AgentSuccessfulResponseExample +from .types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput +from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .types.create_unit_test_response_model import CreateUnitTestResponseModel +from .types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel +from .types.get_tests_page_response_model import GetTestsPageResponseModel +from .types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel +from .types.get_unit_test_response_model import GetUnitTestResponseModel +from .types.single_test_run_request_model import SingleTestRunRequestModel +from .types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput +from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue from .usage.client import AsyncUsageClient, UsageClient from .user.client import AsyncUserClient, UserClient from .voices.client import AsyncVoicesClient, VoicesClient from .webhooks.client import AsyncWebhooksClient, WebhooksClient from .workspace.client import AsyncWorkspaceClient, WorkspaceClient +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + class BaseElevenLabs: """ @@ -128,6 +144,479 @@ def with_raw_response(self) -> RawBaseElevenLabs: """ return self._raw_client + def create_agent_response_test_route( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateUnitTestResponseModel: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, + ) + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.create_agent_response_test_route( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + """ + _response = self._raw_client.create_agent_response_test_route( + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + def get_agent_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetUnitTestResponseModel: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.get_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + """ + _response = self._raw_client.get_agent_response_test_route(test_id, request_options=request_options) + return _response.data + + def update_agent_response_test_route( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetUnitTestResponseModel: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, + ) + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.update_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + """ + _response = self._raw_client.update_agent_response_test_route( + test_id, + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + def delete_chat_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.delete_chat_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + """ + _response = self._raw_client.delete_chat_response_test_route(test_id, request_options=request_options) + return _response.data + + def get_agent_response_tests_summaries_route( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> GetTestsSummariesByIdsResponseModel: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsSummariesByIdsResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.get_agent_response_tests_summaries_route( + test_ids=["test_id_1", "test_id_2"], + ) + """ + _response = self._raw_client.get_agent_response_tests_summaries_route( + test_ids=test_ids, request_options=request_options + ) + return _response.data + + def list_chat_response_tests_route( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestsPageResponseModel: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsPageResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.list_chat_response_tests_route() + """ + _response = self._raw_client.list_chat_response_tests_route( + cursor=cursor, page_size=page_size, search=search, request_options=request_options + ) + return _response.data + + def run_agent_test_suite_route( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestSuiteInvocationResponseModel: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs, SingleTestRunRequestModel + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.run_agent_test_suite_route( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], + ) + """ + _response = self._raw_client.run_agent_test_suite_route( + agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options + ) + return _response.data + + def get_test_invocation_route( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetTestSuiteInvocationResponseModel: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.get_test_invocation_route( + test_invocation_id="test_invocation_id", + ) + """ + _response = self._raw_client.get_test_invocation_route(test_invocation_id, request_options=request_options) + return _response.data + + def resubmit_tests_route( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.resubmit_tests_route( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", + ) + """ + _response = self._raw_client.resubmit_tests_route( + test_invocation_id, + test_run_ids=test_run_ids, + agent_id=agent_id, + agent_config_override=agent_config_override, + request_options=request_options, + ) + return _response.data + def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Add a generated voice to the voice library. @@ -250,6 +739,553 @@ def with_raw_response(self) -> AsyncRawBaseElevenLabs: """ return self._raw_client + async def create_agent_response_test_route( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateUnitTestResponseModel: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + AsyncElevenLabs, + ConversationHistoryTranscriptCommonModelInput, + ) + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.create_agent_response_test_route( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create_agent_response_test_route( + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + async def get_agent_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetUnitTestResponseModel: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.get_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_agent_response_test_route(test_id, request_options=request_options) + return _response.data + + async def update_agent_response_test_route( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetUnitTestResponseModel: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + AsyncElevenLabs, + ConversationHistoryTranscriptCommonModelInput, + ) + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.update_agent_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update_agent_response_test_route( + test_id, + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + async def delete_chat_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.delete_chat_response_test_route( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete_chat_response_test_route(test_id, request_options=request_options) + return _response.data + + async def get_agent_response_tests_summaries_route( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> GetTestsSummariesByIdsResponseModel: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsSummariesByIdsResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.get_agent_response_tests_summaries_route( + test_ids=["test_id_1", "test_id_2"], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_agent_response_tests_summaries_route( + test_ids=test_ids, request_options=request_options + ) + return _response.data + + async def list_chat_response_tests_route( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestsPageResponseModel: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsPageResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.list_chat_response_tests_route() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_chat_response_tests_route( + cursor=cursor, page_size=page_size, search=search, request_options=request_options + ) + return _response.data + + async def run_agent_test_suite_route( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestSuiteInvocationResponseModel: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs, SingleTestRunRequestModel + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.run_agent_test_suite_route( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.run_agent_test_suite_route( + agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options + ) + return _response.data + + async def get_test_invocation_route( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetTestSuiteInvocationResponseModel: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.get_test_invocation_route( + test_invocation_id="test_invocation_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_test_invocation_route( + test_invocation_id, request_options=request_options + ) + return _response.data + + async def resubmit_tests_route( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.resubmit_tests_route( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.resubmit_tests_route( + test_invocation_id, + test_run_ids=test_run_ids, + agent_id=agent_id, + agent_config_override=agent_config_override, + request_options=request_options, + ) + return _response.data + async def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Add a generated voice to the voice library. diff --git a/src/elevenlabs/conversational_ai/tools/client.py b/src/elevenlabs/conversational_ai/tools/client.py index 4cff2d39..6e3dc905 100644 --- a/src/elevenlabs/conversational_ai/tools/client.py +++ b/src/elevenlabs/conversational_ai/tools/client.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> RawToolsClient: def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsResponseModel: """ - Get all available tools available in the workspace. + Get all available tools in the workspace. Parameters ---------- @@ -271,7 +271,7 @@ def with_raw_response(self) -> AsyncRawToolsClient: async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsResponseModel: """ - Get all available tools available in the workspace. + Get all available tools in the workspace. Parameters ---------- diff --git a/src/elevenlabs/conversational_ai/tools/raw_client.py b/src/elevenlabs/conversational_ai/tools/raw_client.py index e8c6d4e4..5b1c1f12 100644 --- a/src/elevenlabs/conversational_ai/tools/raw_client.py +++ b/src/elevenlabs/conversational_ai/tools/raw_client.py @@ -27,7 +27,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[ToolsResponseModel]: """ - Get all available tools available in the workspace. + Get all available tools in the workspace. Parameters ---------- @@ -361,7 +361,7 @@ async def list( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[ToolsResponseModel]: """ - Get all available tools available in the workspace. + Get all available tools in the workspace. Parameters ---------- diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 76f445e9..74ba0faa 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.11.0", + "User-Agent": "elevenlabs/v2.12.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.11.0", + "X-Fern-SDK-Version": "v2.12.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 975d1ab5..3d9e52b1 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -124,7 +124,7 @@ def compose_detailed( Returns ------- typing.Iterator[bytes] - Successful Response + Multipart/mixed response with JSON metadata and binary audio file """ with self._raw_client.compose_detailed( output_format=output_format, @@ -301,7 +301,7 @@ async def compose_detailed( Returns ------- typing.AsyncIterator[bytes] - Successful Response + Multipart/mixed response with JSON metadata and binary audio file """ async with self._raw_client.compose_detailed( output_format=output_format, diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index 0a0c38b4..19a60699 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -161,7 +161,7 @@ def compose_detailed( Returns ------- typing.Iterator[HttpResponse[typing.Iterator[bytes]]] - Successful Response + Multipart/mixed response with JSON metadata and binary audio file """ with self._client_wrapper.httpx_client.stream( "v1/music/detailed", @@ -452,7 +452,7 @@ async def compose_detailed( Returns ------- typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] - Successful Response + Multipart/mixed response with JSON metadata and binary audio file """ async with self._client_wrapper.httpx_client.stream( "v1/music/detailed", diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index c4e56a11..6de2f15a 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -164,42 +164,61 @@ def create_from_rules( ) return _response.data - def download( - self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Iterator[bytes]: + def get( + self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetPronunciationDictionaryMetadataResponse: """ - Get a PLS file with a pronunciation dictionary version rules + Get metadata for a pronunciation dictionary Parameters ---------- - dictionary_id : str + pronunciation_dictionary_id : str The id of the pronunciation dictionary - version_id : str - The id of the version of the pronunciation dictionary - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + Request-specific configuration. Returns ------- - typing.Iterator[bytes] - The PLS file containing pronunciation dictionary rules + GetPronunciationDictionaryMetadataResponse + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.pronunciation_dictionaries.get( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", + ) """ - with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: - yield from r.data + _response = self._raw_client.get(pronunciation_dictionary_id, request_options=request_options) + return _response.data - def get( - self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + def update( + self, + pronunciation_dictionary_id: str, + *, + archived: typing.Optional[bool] = OMIT, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> GetPronunciationDictionaryMetadataResponse: """ - Get metadata for a pronunciation dictionary + Partially update the pronunciation dictionary without changing the version Parameters ---------- pronunciation_dictionary_id : str The id of the pronunciation dictionary + archived : typing.Optional[bool] + The name of the pronunciation dictionary, used for identification only. + + name : typing.Optional[str] + The name of the pronunciation dictionary, used for identification only. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -215,13 +234,40 @@ def get( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.pronunciation_dictionaries.get( + client.pronunciation_dictionaries.update( pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", ) """ - _response = self._raw_client.get(pronunciation_dictionary_id, request_options=request_options) + _response = self._raw_client.update( + pronunciation_dictionary_id, archived=archived, name=name, request_options=request_options + ) return _response.data + def download( + self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Iterator[bytes]: + """ + Get a PLS file with a pronunciation dictionary version rules + + Parameters + ---------- + dictionary_id : str + The id of the pronunciation dictionary + + version_id : str + The id of the version of the pronunciation dictionary + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + The PLS file containing pronunciation dictionary rules + """ + with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: + yield from r.data + def list( self, *, @@ -428,43 +474,69 @@ async def main() -> None: ) return _response.data - async def download( - self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.AsyncIterator[bytes]: + async def get( + self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetPronunciationDictionaryMetadataResponse: """ - Get a PLS file with a pronunciation dictionary version rules + Get metadata for a pronunciation dictionary Parameters ---------- - dictionary_id : str + pronunciation_dictionary_id : str The id of the pronunciation dictionary - version_id : str - The id of the version of the pronunciation dictionary - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + Request-specific configuration. Returns ------- - typing.AsyncIterator[bytes] - The PLS file containing pronunciation dictionary rules + GetPronunciationDictionaryMetadataResponse + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.pronunciation_dictionaries.get( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", + ) + + + asyncio.run(main()) """ - async with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: - async for _chunk in r.data: - yield _chunk + _response = await self._raw_client.get(pronunciation_dictionary_id, request_options=request_options) + return _response.data - async def get( - self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + async def update( + self, + pronunciation_dictionary_id: str, + *, + archived: typing.Optional[bool] = OMIT, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> GetPronunciationDictionaryMetadataResponse: """ - Get metadata for a pronunciation dictionary + Partially update the pronunciation dictionary without changing the version Parameters ---------- pronunciation_dictionary_id : str The id of the pronunciation dictionary + archived : typing.Optional[bool] + The name of the pronunciation dictionary, used for identification only. + + name : typing.Optional[str] + The name of the pronunciation dictionary, used for identification only. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -485,16 +557,44 @@ async def get( async def main() -> None: - await client.pronunciation_dictionaries.get( + await client.pronunciation_dictionaries.update( pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", ) asyncio.run(main()) """ - _response = await self._raw_client.get(pronunciation_dictionary_id, request_options=request_options) + _response = await self._raw_client.update( + pronunciation_dictionary_id, archived=archived, name=name, request_options=request_options + ) return _response.data + async def download( + self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.AsyncIterator[bytes]: + """ + Get a PLS file with a pronunciation dictionary version rules + + Parameters + ---------- + dictionary_id : str + The id of the pronunciation dictionary + + version_id : str + The id of the version of the pronunciation dictionary + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + The PLS file containing pronunciation dictionary rules + """ + async with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: + async for _chunk in r.data: + yield _chunk + async def list( self, *, diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py index 50528508..bfe1a099 100644 --- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py @@ -198,74 +198,78 @@ def create_from_rules( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - @contextlib.contextmanager - def download( - self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + def get( + self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetPronunciationDictionaryMetadataResponse]: """ - Get a PLS file with a pronunciation dictionary version rules + Get metadata for a pronunciation dictionary Parameters ---------- - dictionary_id : str + pronunciation_dictionary_id : str The id of the pronunciation dictionary - version_id : str - The id of the version of the pronunciation dictionary - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + Request-specific configuration. Returns ------- - typing.Iterator[HttpResponse[typing.Iterator[bytes]]] - The PLS file containing pronunciation dictionary rules + HttpResponse[GetPronunciationDictionaryMetadataResponse] + Successful Response """ - with self._client_wrapper.httpx_client.stream( - f"v1/pronunciation-dictionaries/{jsonable_encoder(dictionary_id)}/{jsonable_encoder(version_id)}/download", + _response = self._client_wrapper.httpx_client.request( + f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}", method="GET", request_options=request_options, - ) as _response: - - def _stream() -> HttpResponse[typing.Iterator[bytes]]: - try: - if 200 <= _response.status_code < 300: - _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 - return HttpResponse( - response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) - ) - _response.read() - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.text - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - yield _stream() + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPronunciationDictionaryMetadataResponse, + construct_type( + type_=GetPronunciationDictionaryMetadataResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def get( - self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + def update( + self, + pronunciation_dictionary_id: str, + *, + archived: typing.Optional[bool] = OMIT, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetPronunciationDictionaryMetadataResponse]: """ - Get metadata for a pronunciation dictionary + Partially update the pronunciation dictionary without changing the version Parameters ---------- pronunciation_dictionary_id : str The id of the pronunciation dictionary + archived : typing.Optional[bool] + The name of the pronunciation dictionary, used for identification only. + + name : typing.Optional[str] + The name of the pronunciation dictionary, used for identification only. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -276,8 +280,16 @@ def get( """ _response = self._client_wrapper.httpx_client.request( f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}", - method="GET", + method="PATCH", + json={ + "archived": archived, + "name": name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -305,6 +317,63 @@ def get( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + @contextlib.contextmanager + def download( + self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Get a PLS file with a pronunciation dictionary version rules + + Parameters + ---------- + dictionary_id : str + The id of the pronunciation dictionary + + version_id : str + The id of the version of the pronunciation dictionary + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + The PLS file containing pronunciation dictionary rules + """ + with self._client_wrapper.httpx_client.stream( + f"v1/pronunciation-dictionaries/{jsonable_encoder(dictionary_id)}/{jsonable_encoder(version_id)}/download", + method="GET", + request_options=request_options, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + def list( self, *, @@ -541,75 +610,78 @@ async def create_from_rules( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - @contextlib.asynccontextmanager - async def download( - self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + async def get( + self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetPronunciationDictionaryMetadataResponse]: """ - Get a PLS file with a pronunciation dictionary version rules + Get metadata for a pronunciation dictionary Parameters ---------- - dictionary_id : str + pronunciation_dictionary_id : str The id of the pronunciation dictionary - version_id : str - The id of the version of the pronunciation dictionary - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + Request-specific configuration. Returns ------- - typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] - The PLS file containing pronunciation dictionary rules + AsyncHttpResponse[GetPronunciationDictionaryMetadataResponse] + Successful Response """ - async with self._client_wrapper.httpx_client.stream( - f"v1/pronunciation-dictionaries/{jsonable_encoder(dictionary_id)}/{jsonable_encoder(version_id)}/download", + _response = await self._client_wrapper.httpx_client.request( + f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}", method="GET", request_options=request_options, - ) as _response: - - async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: - try: - if 200 <= _response.status_code < 300: - _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 - return AsyncHttpResponse( - response=_response, - data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), - ) - await _response.aread() - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.text - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - yield await _stream() + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPronunciationDictionaryMetadataResponse, + construct_type( + type_=GetPronunciationDictionaryMetadataResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def get( - self, pronunciation_dictionary_id: str, *, request_options: typing.Optional[RequestOptions] = None + async def update( + self, + pronunciation_dictionary_id: str, + *, + archived: typing.Optional[bool] = OMIT, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetPronunciationDictionaryMetadataResponse]: """ - Get metadata for a pronunciation dictionary + Partially update the pronunciation dictionary without changing the version Parameters ---------- pronunciation_dictionary_id : str The id of the pronunciation dictionary + archived : typing.Optional[bool] + The name of the pronunciation dictionary, used for identification only. + + name : typing.Optional[str] + The name of the pronunciation dictionary, used for identification only. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -620,8 +692,16 @@ async def get( """ _response = await self._client_wrapper.httpx_client.request( f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}", - method="GET", + method="PATCH", + json={ + "archived": archived, + "name": name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -649,6 +729,64 @@ async def get( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + @contextlib.asynccontextmanager + async def download( + self, dictionary_id: str, version_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Get a PLS file with a pronunciation dictionary version rules + + Parameters + ---------- + dictionary_id : str + The id of the pronunciation dictionary + + version_id : str + The id of the version of the pronunciation dictionary + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + The PLS file containing pronunciation dictionary rules + """ + async with self._client_wrapper.httpx_client.stream( + f"v1/pronunciation-dictionaries/{jsonable_encoder(dictionary_id)}/{jsonable_encoder(version_id)}/download", + method="GET", + request_options=request_options, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() + async def list( self, *, diff --git a/src/elevenlabs/raw_base_client.py b/src/elevenlabs/raw_base_client.py index 0cdebbe0..806eaa3b 100644 --- a/src/elevenlabs/raw_base_client.py +++ b/src/elevenlabs/raw_base_client.py @@ -6,13 +6,680 @@ from .core.api_error import ApiError from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.http_response import AsyncHttpResponse, HttpResponse +from .core.jsonable_encoder import jsonable_encoder from .core.request_options import RequestOptions +from .core.serialization import convert_and_respect_annotation_metadata +from .core.unchecked_base_model import construct_type +from .errors.unprocessable_entity_error import UnprocessableEntityError +from .types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from .types.agent_failure_response_example import AgentFailureResponseExample +from .types.agent_successful_response_example import AgentSuccessfulResponseExample +from .types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput +from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .types.create_unit_test_response_model import CreateUnitTestResponseModel +from .types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel +from .types.get_tests_page_response_model import GetTestsPageResponseModel +from .types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel +from .types.get_unit_test_response_model import GetUnitTestResponseModel +from .types.http_validation_error import HttpValidationError +from .types.single_test_run_request_model import SingleTestRunRequestModel +from .types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput +from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) class RawBaseElevenLabs: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + def create_agent_response_test_route( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateUnitTestResponseModel]: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/create", + method="POST", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateUnitTestResponseModel, + construct_type( + type_=CreateUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_agent_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetUnitTestResponseModel]: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update_agent_response_test_route( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetUnitTestResponseModel]: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="PUT", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete_chat_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_agent_response_tests_summaries_route( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetTestsSummariesByIdsResponseModel]: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestsSummariesByIdsResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/summaries", + method="POST", + json={ + "test_ids": test_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsSummariesByIdsResponseModel, + construct_type( + type_=GetTestsSummariesByIdsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def list_chat_response_tests_route( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetTestsPageResponseModel]: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestsPageResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + "search": search, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsPageResponseModel, + construct_type( + type_=GetTestsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def run_agent_test_suite_route( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", + method="POST", + json={ + "tests": convert_and_respect_annotation_metadata( + object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" + ), + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_test_invocation_route( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def resubmit_tests_route( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", + method="POST", + json={ + "test_run_ids": test_run_ids, + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + "agent_id": agent_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ Add a generated voice to the voice library. @@ -44,6 +711,652 @@ class AsyncRawBaseElevenLabs: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + async def create_agent_response_test_route( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateUnitTestResponseModel]: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/create", + method="POST", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateUnitTestResponseModel, + construct_type( + type_=CreateUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_agent_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetUnitTestResponseModel]: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update_agent_response_test_route( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetUnitTestResponseModel]: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="PUT", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete_chat_response_test_route( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_agent_response_tests_summaries_route( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetTestsSummariesByIdsResponseModel]: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestsSummariesByIdsResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/summaries", + method="POST", + json={ + "test_ids": test_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsSummariesByIdsResponseModel, + construct_type( + type_=GetTestsSummariesByIdsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def list_chat_response_tests_route( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetTestsPageResponseModel]: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestsPageResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + "search": search, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsPageResponseModel, + construct_type( + type_=GetTestsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def run_agent_test_suite_route( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", + method="POST", + json={ + "tests": convert_and_respect_annotation_metadata( + object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" + ), + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_test_invocation_route( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def resubmit_tests_route( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", + method="POST", + json={ + "test_run_ids": test_run_ids, + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + "agent_id": agent_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def save_a_voice_preview( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py index 031a3011..07786af8 100644 --- a/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py +++ b/src/elevenlabs/service_accounts/api_keys/types/body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item.py @@ -29,6 +29,9 @@ "workspace_read", "workspace_write", "forced_alignment", + "convai_read", + "convai_write", + "music_generation", ], typing.Any, ] diff --git a/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py index 6e06ebef..0aa48bd5 100644 --- a/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py +++ b/src/elevenlabs/service_accounts/api_keys/types/body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item.py @@ -29,6 +29,9 @@ "workspace_read", "workspace_write", "forced_alignment", + "convai_read", + "convai_write", + "music_generation", ], typing.Any, ] diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index 177d5c37..89c59429 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -93,7 +93,7 @@ def convert( The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. cloud_storage_url : typing.Optional[str] - The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. + The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. webhook : typing.Optional[bool] Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. @@ -233,7 +233,7 @@ async def convert( The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. cloud_storage_url : typing.Optional[str] - The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. + The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. webhook : typing.Optional[bool] Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index fc590fd6..308c5d6b 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -89,7 +89,7 @@ def convert( The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. cloud_storage_url : typing.Optional[str] - The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. + The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. webhook : typing.Optional[bool] Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. @@ -245,7 +245,7 @@ async def convert( The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. cloud_storage_url : typing.Optional[str] - The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. + The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. webhook : typing.Optional[bool] Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. diff --git a/src/elevenlabs/text_to_dialogue/client.py b/src/elevenlabs/text_to_dialogue/client.py index 88399fda..2ab69caf 100644 --- a/src/elevenlabs/text_to_dialogue/client.py +++ b/src/elevenlabs/text_to_dialogue/client.py @@ -44,7 +44,7 @@ def convert( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. + Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. Parameters ---------- @@ -119,7 +119,7 @@ def stream( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. + Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. Parameters ---------- @@ -210,7 +210,7 @@ async def convert( request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. + Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. Parameters ---------- @@ -294,7 +294,7 @@ async def stream( request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. + Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. Parameters ---------- diff --git a/src/elevenlabs/text_to_dialogue/raw_client.py b/src/elevenlabs/text_to_dialogue/raw_client.py index e53e5a5e..f6d6315a 100644 --- a/src/elevenlabs/text_to_dialogue/raw_client.py +++ b/src/elevenlabs/text_to_dialogue/raw_client.py @@ -41,7 +41,7 @@ def convert( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. + Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. Parameters ---------- @@ -142,7 +142,7 @@ def stream( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. + Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. Parameters ---------- @@ -248,7 +248,7 @@ async def convert( request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. + Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. Parameters ---------- @@ -350,7 +350,7 @@ async def stream( request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ - Eleven v3 API access is currently not publicly available, but will be soon.
Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. + Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. Parameters ---------- diff --git a/src/elevenlabs/text_to_sound_effects/client.py b/src/elevenlabs/text_to_sound_effects/client.py index 73aa41b2..1a9185a7 100644 --- a/src/elevenlabs/text_to_sound_effects/client.py +++ b/src/elevenlabs/text_to_sound_effects/client.py @@ -47,7 +47,7 @@ def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. duration_seconds : typing.Optional[float] - The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None. + The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. @@ -117,7 +117,7 @@ async def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. duration_seconds : typing.Optional[float] - The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None. + The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. diff --git a/src/elevenlabs/text_to_sound_effects/raw_client.py b/src/elevenlabs/text_to_sound_effects/raw_client.py index 40ad7fbb..a05388f5 100644 --- a/src/elevenlabs/text_to_sound_effects/raw_client.py +++ b/src/elevenlabs/text_to_sound_effects/raw_client.py @@ -43,7 +43,7 @@ def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. duration_seconds : typing.Optional[float] - The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None. + The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. @@ -129,7 +129,7 @@ async def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. duration_seconds : typing.Optional[float] - The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None. + The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 0d348598..262a77b6 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -17,15 +17,18 @@ from .add_workspace_invite_response_model import AddWorkspaceInviteResponseModel from .additional_format_response_model import AdditionalFormatResponseModel from .additional_formats import AdditionalFormats +from .adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel from .age import Age from .agent_call_limits import AgentCallLimits from .agent_config import AgentConfig from .agent_config_override import AgentConfigOverride from .agent_config_override_config import AgentConfigOverrideConfig +from .agent_failure_response_example import AgentFailureResponseExample from .agent_metadata_response_model import AgentMetadataResponseModel from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel from .agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel +from .agent_successful_response_example import AgentSuccessfulResponseExample from .agent_summary_response_model import AgentSummaryResponseModel from .agent_testing_settings import AgentTestingSettings from .agent_transfer import AgentTransfer @@ -41,6 +44,7 @@ from .asr_input_format import AsrInputFormat from .asr_provider import AsrProvider from .asr_quality import AsrQuality +from .attached_test_model import AttachedTestModel from .audio_native_create_project_response_model import AudioNativeCreateProjectResponseModel from .audio_native_edit_content_response_model import AudioNativeEditContentResponseModel from .audio_native_project_settings_response_model import AudioNativeProjectSettingsResponseModel @@ -190,6 +194,7 @@ ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, @@ -259,6 +264,8 @@ from .create_sip_trunk_phone_number_request import CreateSipTrunkPhoneNumberRequest from .create_transcript_request import CreateTranscriptRequest from .create_twilio_phone_number_request import CreateTwilioPhoneNumberRequest +from .create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .create_unit_test_response_model import CreateUnitTestResponseModel from .custom_llm import CustomLlm from .custom_llm_request_headers_value import CustomLlmRequestHeadersValue from .dashboard_call_success_chart_model import DashboardCallSuccessChartModel @@ -284,6 +291,7 @@ from .dependent_phone_number_identifier import DependentPhoneNumberIdentifier from .dependent_unknown_agent_identifier import DependentUnknownAgentIdentifier from .dependent_unknown_tool_identifier import DependentUnknownToolIdentifier +from .detailed_music_response import DetailedMusicResponse from .dialogue_input import DialogueInput from .dialogue_input_response_model import DialogueInputResponseModel from .do_dubbing_response import DoDubbingResponse @@ -313,6 +321,7 @@ from .end_call_tool_result_model import EndCallToolResultModel from .evaluation_settings import EvaluationSettings from .evaluation_success_result import EvaluationSuccessResult +from .exact_parameter_evaluation_strategy import ExactParameterEvaluationStrategy from .export_options import ( ExportOptions, ExportOptions_Docx, @@ -327,6 +336,7 @@ ExtendedSubscriptionResponseModelCharacterRefreshPeriod, ) from .extended_subscription_response_model_currency import ExtendedSubscriptionResponseModelCurrency +from .extended_subscription_response_model_pending_change import ExtendedSubscriptionResponseModelPendingChange from .feature_status_common_model import FeatureStatusCommonModel from .features_usage_common_model import FeaturesUsageCommonModel from .feedback_item import FeedbackItem @@ -418,12 +428,17 @@ ) from .get_pronunciation_dictionary_response import GetPronunciationDictionaryResponse from .get_speech_history_response import GetSpeechHistoryResponse +from .get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel +from .get_tests_page_response_model import GetTestsPageResponseModel +from .get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from .get_tool_dependent_agents_response_model import GetToolDependentAgentsResponseModel from .get_tool_dependent_agents_response_model_agents_item import ( GetToolDependentAgentsResponseModelAgentsItem, GetToolDependentAgentsResponseModelAgentsItem_Available, GetToolDependentAgentsResponseModelAgentsItem_Unknown, ) +from .get_unit_test_response_model import GetUnitTestResponseModel +from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue from .get_voices_response import GetVoicesResponse from .get_voices_v_2_response import GetVoicesV2Response from .get_workspace_secrets_response_model import GetWorkspaceSecretsResponseModel @@ -460,6 +475,7 @@ from .llm import Llm from .llm_category_usage import LlmCategoryUsage from .llm_input_output_tokens_usage import LlmInputOutputTokensUsage +from .llm_parameter_evaluation_strategy import LlmParameterEvaluationStrategy from .llm_tokens_category_usage import LlmTokensCategoryUsage from .llm_usage_calculator_llm_response_model import LlmUsageCalculatorLlmResponseModel from .llm_usage_calculator_response_model import LlmUsageCalculatorResponseModel @@ -497,6 +513,7 @@ from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel +from .multipart_music_response import MultipartMusicResponse from .music_prompt import MusicPrompt from .normalized_alignment import NormalizedAlignment from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput @@ -509,6 +526,9 @@ from .outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel from .output_format import OutputFormat from .pdf_export_options import PdfExportOptions +from .pending_cancellation_response_model import PendingCancellationResponseModel +from .pending_subscription_switch_response_model import PendingSubscriptionSwitchResponseModel +from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier from .phone_number_agent_info import PhoneNumberAgentInfo from .phone_number_transfer import PhoneNumberTransfer from .phone_number_transfer_destination import PhoneNumberTransferDestination @@ -595,6 +615,8 @@ from .reader_resource_response_model_resource_type import ReaderResourceResponseModelResourceType from .realtime_voice_settings import RealtimeVoiceSettings from .recording_response import RecordingResponse +from .referenced_tool_common_model import ReferencedToolCommonModel +from .regex_parameter_evaluation_strategy import RegexParameterEvaluationStrategy from .remove_member_from_group_request import RemoveMemberFromGroupRequest from .render import Render from .render_status import RenderStatus @@ -625,6 +647,7 @@ from .similar_voice import SimilarVoice from .similar_voice_category import SimilarVoiceCategory from .similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse +from .single_test_run_request_model import SingleTestRunRequestModel from .sip_media_encryption_enum import SipMediaEncryptionEnum from .sip_trunk_credentials_request_model import SipTrunkCredentialsRequestModel from .sip_trunk_outbound_call_response import SipTrunkOutboundCallResponse @@ -632,6 +655,7 @@ from .sip_uri_transfer_destination import SipUriTransferDestination from .skip_turn_tool_config import SkipTurnToolConfig from .skip_turn_tool_response_model import SkipTurnToolResponseModel +from .song_metadata import SongMetadata from .song_section import SongSection from .speaker_audio_response_model import SpeakerAudioResponseModel from .speaker_response_model import SpeakerResponseModel @@ -684,6 +708,10 @@ SystemToolConfigOutputParams_VoicemailDetection, ) from .telephony_provider import TelephonyProvider +from .test_condition_rationale_common_model import TestConditionRationaleCommonModel +from .test_condition_result_common_model import TestConditionResultCommonModel +from .test_run_status import TestRunStatus +from .test_tool_result_model import TestToolResultModel from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum from .text_to_speech_stream_request import TextToSpeechStreamRequest @@ -731,10 +759,22 @@ from .turn_mode import TurnMode from .twilio_outbound_call_response import TwilioOutboundCallResponse from .txt_export_options import TxtExportOptions +from .unit_test_run_response_model import UnitTestRunResponseModel +from .unit_test_summary_response_model import UnitTestSummaryResponseModel +from .unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput +from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput +from .unit_test_tool_call_parameter import UnitTestToolCallParameter +from .unit_test_tool_call_parameter_eval import ( + UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Exact, + UnitTestToolCallParameterEval_Llm, + UnitTestToolCallParameterEval_Regex, +) from .update_audio_native_project_request import UpdateAudioNativeProjectRequest from .update_chapter_request import UpdateChapterRequest from .update_project_request import UpdateProjectRequest from .update_pronunciation_dictionaries_request import UpdatePronunciationDictionariesRequest +from .update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue from .update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel from .url_avatar import UrlAvatar from .usage_aggregation_interval import UsageAggregationInterval @@ -809,6 +849,7 @@ from .widget_placement import WidgetPlacement from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents +from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput @@ -856,15 +897,18 @@ "AddWorkspaceInviteResponseModel", "AdditionalFormatResponseModel", "AdditionalFormats", + "AdhocAgentConfigOverrideForTestRequestModel", "Age", "AgentCallLimits", "AgentConfig", "AgentConfigOverride", "AgentConfigOverrideConfig", + "AgentFailureResponseExample", "AgentMetadataResponseModel", "AgentPlatformSettingsRequestModel", "AgentPlatformSettingsResponseModel", "AgentSimulatedChatTestResponseModel", + "AgentSuccessfulResponseExample", "AgentSummaryResponseModel", "AgentTestingSettings", "AgentTransfer", @@ -880,6 +924,7 @@ "AsrInputFormat", "AsrProvider", "AsrQuality", + "AttachedTestModel", "AudioNativeCreateProjectResponseModel", "AudioNativeEditContentResponseModel", "AudioNativeProjectSettingsResponseModel", @@ -998,6 +1043,7 @@ "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess", "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError", @@ -1048,6 +1094,8 @@ "CreateSipTrunkPhoneNumberRequest", "CreateTranscriptRequest", "CreateTwilioPhoneNumberRequest", + "CreateUnitTestRequestDynamicVariablesValue", + "CreateUnitTestResponseModel", "CustomLlm", "CustomLlmRequestHeadersValue", "DashboardCallSuccessChartModel", @@ -1073,6 +1121,7 @@ "DependentPhoneNumberIdentifier", "DependentUnknownAgentIdentifier", "DependentUnknownToolIdentifier", + "DetailedMusicResponse", "DialogueInput", "DialogueInputResponseModel", "DoDubbingResponse", @@ -1100,6 +1149,7 @@ "EndCallToolResultModel", "EvaluationSettings", "EvaluationSuccessResult", + "ExactParameterEvaluationStrategy", "ExportOptions", "ExportOptions_Docx", "ExportOptions_Html", @@ -1110,6 +1160,7 @@ "ExtendedSubscriptionResponseModelBillingPeriod", "ExtendedSubscriptionResponseModelCharacterRefreshPeriod", "ExtendedSubscriptionResponseModelCurrency", + "ExtendedSubscriptionResponseModelPendingChange", "FeatureStatusCommonModel", "FeaturesUsageCommonModel", "FeedbackItem", @@ -1185,10 +1236,15 @@ "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", "GetSpeechHistoryResponse", + "GetTestSuiteInvocationResponseModel", + "GetTestsPageResponseModel", + "GetTestsSummariesByIdsResponseModel", "GetToolDependentAgentsResponseModel", "GetToolDependentAgentsResponseModelAgentsItem", "GetToolDependentAgentsResponseModelAgentsItem_Available", "GetToolDependentAgentsResponseModelAgentsItem_Unknown", + "GetUnitTestResponseModel", + "GetUnitTestResponseModelDynamicVariablesValue", "GetVoicesResponse", "GetVoicesV2Response", "GetWorkspaceSecretsResponseModel", @@ -1225,6 +1281,7 @@ "Llm", "LlmCategoryUsage", "LlmInputOutputTokensUsage", + "LlmParameterEvaluationStrategy", "LlmTokensCategoryUsage", "LlmUsageCalculatorLlmResponseModel", "LlmUsageCalculatorResponseModel", @@ -1260,6 +1317,7 @@ "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", + "MultipartMusicResponse", "MusicPrompt", "NormalizedAlignment", "ObjectJsonSchemaPropertyInput", @@ -1272,6 +1330,9 @@ "OutboundSipTrunkConfigRequestModel", "OutputFormat", "PdfExportOptions", + "PendingCancellationResponseModel", + "PendingSubscriptionSwitchResponseModel", + "PendingSubscriptionSwitchResponseModelNextTier", "PhoneNumberAgentInfo", "PhoneNumberTransfer", "PhoneNumberTransferDestination", @@ -1350,6 +1411,8 @@ "ReaderResourceResponseModelResourceType", "RealtimeVoiceSettings", "RecordingResponse", + "ReferencedToolCommonModel", + "RegexParameterEvaluationStrategy", "RemoveMemberFromGroupRequest", "Render", "RenderStatus", @@ -1380,6 +1443,7 @@ "SimilarVoice", "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", + "SingleTestRunRequestModel", "SipMediaEncryptionEnum", "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", @@ -1387,6 +1451,7 @@ "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", + "SongMetadata", "SongSection", "SpeakerAudioResponseModel", "SpeakerResponseModel", @@ -1435,6 +1500,10 @@ "SystemToolConfigOutputParams_TransferToNumber", "SystemToolConfigOutputParams_VoicemailDetection", "TelephonyProvider", + "TestConditionRationaleCommonModel", + "TestConditionResultCommonModel", + "TestRunStatus", + "TestToolResultModel", "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechOutputFormatEnum", "TextToSpeechStreamRequest", @@ -1478,10 +1547,20 @@ "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", + "UnitTestRunResponseModel", + "UnitTestSummaryResponseModel", + "UnitTestToolCallEvaluationModelInput", + "UnitTestToolCallEvaluationModelOutput", + "UnitTestToolCallParameter", + "UnitTestToolCallParameterEval", + "UnitTestToolCallParameterEval_Exact", + "UnitTestToolCallParameterEval_Llm", + "UnitTestToolCallParameterEval_Regex", "UpdateAudioNativeProjectRequest", "UpdateChapterRequest", "UpdateProjectRequest", "UpdatePronunciationDictionariesRequest", + "UpdateUnitTestRequestDynamicVariablesValue", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", "UsageAggregationInterval", @@ -1546,6 +1625,7 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowFeaturesUsageCommonModel", "WorkflowToolEdgeStepModel", "WorkflowToolMaxIterationsExceededStepModel", "WorkflowToolNestedToolsStepModelInput", diff --git a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py new file mode 100644 index 00000000..033ae20d --- /dev/null +++ b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel +from .conversational_config import ConversationalConfig + + +class AdhocAgentConfigOverrideForTestRequestModel(UncheckedBaseModel): + conversation_config: ConversationalConfig + platform_settings: AgentPlatformSettingsRequestModel + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(AdhocAgentConfigOverrideForTestRequestModel) diff --git a/src/elevenlabs/types/agent_failure_response_example.py b/src/elevenlabs/types/agent_failure_response_example.py new file mode 100644 index 00000000..2229e81c --- /dev/null +++ b/src/elevenlabs/types/agent_failure_response_example.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AgentFailureResponseExample(UncheckedBaseModel): + response: str + type: typing.Literal["failure"] = "failure" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/agent_successful_response_example.py b/src/elevenlabs/types/agent_successful_response_example.py new file mode 100644 index 00000000..4dd5da04 --- /dev/null +++ b/src/elevenlabs/types/agent_successful_response_example.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AgentSuccessfulResponseExample(UncheckedBaseModel): + response: str + type: typing.Literal["success"] = "success" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/agent_testing_settings.py b/src/elevenlabs/types/agent_testing_settings.py index 8e2fc8d2..6427a475 100644 --- a/src/elevenlabs/types/agent_testing_settings.py +++ b/src/elevenlabs/types/agent_testing_settings.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .attached_test_model import AttachedTestModel class AgentTestingSettings(UncheckedBaseModel): @@ -12,7 +13,7 @@ class AgentTestingSettings(UncheckedBaseModel): Settings for agent testing configuration. """ - test_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + attached_tests: typing.Optional[typing.List[AttachedTestModel]] = pydantic.Field(default=None) """ List of test IDs that should be run for this agent """ diff --git a/src/elevenlabs/types/attached_test_model.py b/src/elevenlabs/types/attached_test_model.py new file mode 100644 index 00000000..23403ffe --- /dev/null +++ b/src/elevenlabs/types/attached_test_model.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AttachedTestModel(UncheckedBaseModel): + test_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py index 1e28a5ee..a9b8260d 100644 --- a/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py +++ b/src/elevenlabs/types/conversation_history_transcript_system_tool_result_common_model_result.py @@ -89,6 +89,21 @@ class Config: extra = pydantic.Extra.allow +class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult(UncheckedBaseModel): + result_type: typing.Literal["testing_tool_result"] = "testing_tool_result" + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError(UncheckedBaseModel): result_type: typing.Literal["transfer_to_agent_error"] = "transfer_to_agent_error" status: typing.Optional[typing.Literal["error"]] = None @@ -201,6 +216,7 @@ class Config: ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, diff --git a/src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py b/src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py new file mode 100644 index 00000000..9cde714f --- /dev/null +++ b/src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateUnitTestRequestDynamicVariablesValue = typing.Union[str, float, int, bool] diff --git a/src/elevenlabs/types/create_unit_test_response_model.py b/src/elevenlabs/types/create_unit_test_response_model.py new file mode 100644 index 00000000..f3606b7a --- /dev/null +++ b/src/elevenlabs/types/create_unit_test_response_model.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateUnitTestResponseModel(UncheckedBaseModel): + id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/detailed_music_response.py b/src/elevenlabs/types/detailed_music_response.py new file mode 100644 index 00000000..3c80d5ca --- /dev/null +++ b/src/elevenlabs/types/detailed_music_response.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .music_prompt import MusicPrompt +from .song_metadata import SongMetadata + + +class DetailedMusicResponse(UncheckedBaseModel): + """ + Response model for structured music generation endpoint + """ + + composition_plan: MusicPrompt = pydantic.Field() + """ + The composition plan used to generate the song + """ + + song_metadata: SongMetadata = pydantic.Field() + """ + The metadata of the generated song + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/exact_parameter_evaluation_strategy.py b/src/elevenlabs/types/exact_parameter_evaluation_strategy.py new file mode 100644 index 00000000..7f49438b --- /dev/null +++ b/src/elevenlabs/types/exact_parameter_evaluation_strategy.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ExactParameterEvaluationStrategy(UncheckedBaseModel): + expected_value: str = pydantic.Field() + """ + The exact string value that the parameter must match. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/extended_subscription_response_model_pending_change.py b/src/elevenlabs/types/extended_subscription_response_model_pending_change.py new file mode 100644 index 00000000..248a3f35 --- /dev/null +++ b/src/elevenlabs/types/extended_subscription_response_model_pending_change.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .pending_cancellation_response_model import PendingCancellationResponseModel +from .pending_subscription_switch_response_model import PendingSubscriptionSwitchResponseModel + +ExtendedSubscriptionResponseModelPendingChange = typing.Union[ + PendingSubscriptionSwitchResponseModel, PendingCancellationResponseModel +] diff --git a/src/elevenlabs/types/features_usage_common_model.py b/src/elevenlabs/types/features_usage_common_model.py index c642719a..06b4f7dd 100644 --- a/src/elevenlabs/types/features_usage_common_model.py +++ b/src/elevenlabs/types/features_usage_common_model.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .feature_status_common_model import FeatureStatusCommonModel +from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel class FeaturesUsageCommonModel(UncheckedBaseModel): @@ -20,6 +21,7 @@ class FeaturesUsageCommonModel(UncheckedBaseModel): tool_dynamic_variable_updates: typing.Optional[FeatureStatusCommonModel] = None is_livekit: typing.Optional[bool] = None voicemail_detection: typing.Optional[FeatureStatusCommonModel] = None + workflow: typing.Optional[WorkflowFeaturesUsageCommonModel] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/get_test_suite_invocation_response_model.py b/src/elevenlabs/types/get_test_suite_invocation_response_model.py new file mode 100644 index 00000000..5f79cef3 --- /dev/null +++ b/src/elevenlabs/types/get_test_suite_invocation_response_model.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .unit_test_run_response_model import UnitTestRunResponseModel + + +class GetTestSuiteInvocationResponseModel(UncheckedBaseModel): + id: str + created_at: typing.Optional[int] = None + test_runs: typing.List[UnitTestRunResponseModel] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(GetTestSuiteInvocationResponseModel) diff --git a/src/elevenlabs/types/get_tests_page_response_model.py b/src/elevenlabs/types/get_tests_page_response_model.py new file mode 100644 index 00000000..1a750dde --- /dev/null +++ b/src/elevenlabs/types/get_tests_page_response_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .unit_test_summary_response_model import UnitTestSummaryResponseModel + + +class GetTestsPageResponseModel(UncheckedBaseModel): + tests: typing.List[UnitTestSummaryResponseModel] + next_cursor: typing.Optional[str] = None + has_more: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/get_tests_summaries_by_ids_response_model.py b/src/elevenlabs/types/get_tests_summaries_by_ids_response_model.py new file mode 100644 index 00000000..b395fcd2 --- /dev/null +++ b/src/elevenlabs/types/get_tests_summaries_by_ids_response_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .unit_test_summary_response_model import UnitTestSummaryResponseModel + + +class GetTestsSummariesByIdsResponseModel(UncheckedBaseModel): + tests: typing.Dict[str, UnitTestSummaryResponseModel] = pydantic.Field() + """ + Dictionary mapping test IDs to their summary information + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/get_unit_test_response_model.py b/src/elevenlabs/types/get_unit_test_response_model.py new file mode 100644 index 00000000..5b86b4da --- /dev/null +++ b/src/elevenlabs/types/get_unit_test_response_model.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_failure_response_example import AgentFailureResponseExample +from .agent_successful_response_example import AgentSuccessfulResponseExample +from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput +from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue +from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput + + +class GetUnitTestResponseModel(UncheckedBaseModel): + chat_history: typing.List[ConversationHistoryTranscriptCommonModelOutput] + success_condition: str = pydantic.Field() + """ + A prompt that evaluates whether the agent's response is successful. Should return True or False. + """ + + success_examples: typing.List[AgentSuccessfulResponseExample] = pydantic.Field() + """ + Non-empty list of example responses that should be considered successful + """ + + failure_examples: typing.List[AgentFailureResponseExample] = pydantic.Field() + """ + Non-empty list of example responses that should be considered failures + """ + + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelOutput] = pydantic.Field(default=None) + """ + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + """ + + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[GetUnitTestResponseModelDynamicVariablesValue]] + ] = pydantic.Field(default=None) + """ + Dynamic variables to replace in the agent config during testing + """ + + id: str + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(GetUnitTestResponseModel) diff --git a/src/elevenlabs/types/get_unit_test_response_model_dynamic_variables_value.py b/src/elevenlabs/types/get_unit_test_response_model_dynamic_variables_value.py new file mode 100644 index 00000000..4704ded3 --- /dev/null +++ b/src/elevenlabs/types/get_unit_test_response_model_dynamic_variables_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetUnitTestResponseModelDynamicVariablesValue = typing.Union[str, float, int, bool] diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index 9a27ef1e..f20f70ee 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -30,8 +30,8 @@ "custom-llm", "qwen3-4b", "qwen3-30b-a3b", - "watt-tool-8b", - "watt-tool-70b", + "gpt-oss-20b", + "gpt-oss-120b", "gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-flash-lite-preview-06-17", diff --git a/src/elevenlabs/types/llm_parameter_evaluation_strategy.py b/src/elevenlabs/types/llm_parameter_evaluation_strategy.py new file mode 100644 index 00000000..707d5356 --- /dev/null +++ b/src/elevenlabs/types/llm_parameter_evaluation_strategy.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LlmParameterEvaluationStrategy(UncheckedBaseModel): + description: str = pydantic.Field() + """ + A description of the evaluation strategy to use for the test. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/multipart_music_response.py b/src/elevenlabs/types/multipart_music_response.py new file mode 100644 index 00000000..dcbe8d11 --- /dev/null +++ b/src/elevenlabs/types/multipart_music_response.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .detailed_music_response import DetailedMusicResponse + + +class MultipartMusicResponse(UncheckedBaseModel): + """ + Multipart response structure with JSON metadata and binary audio + """ + + metadata: DetailedMusicResponse = pydantic.Field() + """ + JSON metadata containing composition plan and song metadata + """ + + audio: str = pydantic.Field() + """ + Binary audio data in the requested format + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/pending_cancellation_response_model.py b/src/elevenlabs/types/pending_cancellation_response_model.py new file mode 100644 index 00000000..f73194f5 --- /dev/null +++ b/src/elevenlabs/types/pending_cancellation_response_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class PendingCancellationResponseModel(UncheckedBaseModel): + kind: typing.Optional[typing.Literal["cancellation"]] = None + timestamp_seconds: int = pydantic.Field() + """ + The timestamp of the cancellation. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/pending_subscription_switch_response_model.py b/src/elevenlabs/types/pending_subscription_switch_response_model.py new file mode 100644 index 00000000..c7b14c12 --- /dev/null +++ b/src/elevenlabs/types/pending_subscription_switch_response_model.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier + + +class PendingSubscriptionSwitchResponseModel(UncheckedBaseModel): + kind: typing.Optional[typing.Literal["change"]] = None + next_tier: PendingSubscriptionSwitchResponseModelNextTier = pydantic.Field() + """ + The tier to change to. + """ + + timestamp_seconds: int = pydantic.Field() + """ + The timestamp of the change. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/pending_subscription_switch_response_model_next_tier.py b/src/elevenlabs/types/pending_subscription_switch_response_model_next_tier.py new file mode 100644 index 00000000..b7c7b6f0 --- /dev/null +++ b/src/elevenlabs/types/pending_subscription_switch_response_model_next_tier.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PendingSubscriptionSwitchResponseModelNextTier = typing.Union[ + typing.Literal[ + "free", + "starter", + "creator", + "pro", + "growing_business", + "scale_2024_08_10", + "grant_tier_1_2025_07_23", + "grant_tier_2_2025_07_23", + "trial", + "enterprise", + ], + typing.Any, +] diff --git a/src/elevenlabs/types/referenced_tool_common_model.py b/src/elevenlabs/types/referenced_tool_common_model.py new file mode 100644 index 00000000..2b12ce47 --- /dev/null +++ b/src/elevenlabs/types/referenced_tool_common_model.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_type import ToolType + + +class ReferencedToolCommonModel(UncheckedBaseModel): + """ + Reference to a tool for unit test evaluation. + """ + + id: str = pydantic.Field() + """ + The ID of the tool + """ + + type: ToolType = pydantic.Field() + """ + The type of the tool + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/regex_parameter_evaluation_strategy.py b/src/elevenlabs/types/regex_parameter_evaluation_strategy.py new file mode 100644 index 00000000..da0cf374 --- /dev/null +++ b/src/elevenlabs/types/regex_parameter_evaluation_strategy.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RegexParameterEvaluationStrategy(UncheckedBaseModel): + pattern: str = pydantic.Field() + """ + A regex pattern to match the agent's response against. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/single_test_run_request_model.py b/src/elevenlabs/types/single_test_run_request_model.py new file mode 100644 index 00000000..086a24ef --- /dev/null +++ b/src/elevenlabs/types/single_test_run_request_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SingleTestRunRequestModel(UncheckedBaseModel): + test_id: str = pydantic.Field() + """ + ID of the test to run + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/song_metadata.py b/src/elevenlabs/types/song_metadata.py new file mode 100644 index 00000000..a1fee8ae --- /dev/null +++ b/src/elevenlabs/types/song_metadata.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SongMetadata(UncheckedBaseModel): + title: typing.Optional[str] = pydantic.Field(default=None) + """ + The title of the song + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + The description of the song + """ + + genres: typing.List[str] = pydantic.Field() + """ + The genres of the song + """ + + languages: typing.List[str] = pydantic.Field() + """ + The languages of the song + """ + + is_explicit: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the song is explicit + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/subscription.py b/src/elevenlabs/types/subscription.py index 85cb3d37..d2b6dca4 100644 --- a/src/elevenlabs/types/subscription.py +++ b/src/elevenlabs/types/subscription.py @@ -10,6 +10,7 @@ ExtendedSubscriptionResponseModelCharacterRefreshPeriod, ) from .extended_subscription_response_model_currency import ExtendedSubscriptionResponseModelCurrency +from .extended_subscription_response_model_pending_change import ExtendedSubscriptionResponseModelPendingChange from .invoice_response import InvoiceResponse from .subscription_status_type import SubscriptionStatusType @@ -127,6 +128,11 @@ class Subscription(UncheckedBaseModel): Whether the user has open invoices. """ + pending_change: typing.Optional[ExtendedSubscriptionResponseModelPendingChange] = pydantic.Field(default=None) + """ + The pending change for the user. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/test_condition_rationale_common_model.py b/src/elevenlabs/types/test_condition_rationale_common_model.py new file mode 100644 index 00000000..d26e58b3 --- /dev/null +++ b/src/elevenlabs/types/test_condition_rationale_common_model.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TestConditionRationaleCommonModel(UncheckedBaseModel): + """ + Structured rationale for test condition results containing individual failure/success reasons. + """ + + messages: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + List of individual parameter evaluation messages or reasons + """ + + summary: typing.Optional[str] = pydantic.Field(default=None) + """ + High-level summary of the evaluation result + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/test_condition_result_common_model.py b/src/elevenlabs/types/test_condition_result_common_model.py new file mode 100644 index 00000000..24175a44 --- /dev/null +++ b/src/elevenlabs/types/test_condition_result_common_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .evaluation_success_result import EvaluationSuccessResult +from .test_condition_rationale_common_model import TestConditionRationaleCommonModel + + +class TestConditionResultCommonModel(UncheckedBaseModel): + result: EvaluationSuccessResult + rationale: typing.Optional[TestConditionRationaleCommonModel] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/test_run_status.py b/src/elevenlabs/types/test_run_status.py new file mode 100644 index 00000000..25037cd7 --- /dev/null +++ b/src/elevenlabs/types/test_run_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestRunStatus = typing.Union[typing.Literal["pending", "passed", "failed"], typing.Any] diff --git a/src/elevenlabs/types/test_tool_result_model.py b/src/elevenlabs/types/test_tool_result_model.py new file mode 100644 index 00000000..1512d5e3 --- /dev/null +++ b/src/elevenlabs/types/test_tool_result_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TestToolResultModel(UncheckedBaseModel): + status: typing.Optional[typing.Literal["success"]] = None + reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py new file mode 100644 index 00000000..bc1ecde5 --- /dev/null +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput +from .test_condition_result_common_model import TestConditionResultCommonModel +from .test_run_status import TestRunStatus + + +class UnitTestRunResponseModel(UncheckedBaseModel): + test_run_id: str + test_invocation_id: str + agent_id: str + status: TestRunStatus + agent_responses: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutput]] = None + test_id: str + condition_result: typing.Optional[TestConditionResultCommonModel] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(UnitTestRunResponseModel) diff --git a/src/elevenlabs/types/unit_test_summary_response_model.py b/src/elevenlabs/types/unit_test_summary_response_model.py new file mode 100644 index 00000000..9b9d9b43 --- /dev/null +++ b/src/elevenlabs/types/unit_test_summary_response_model.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .resource_access_info import ResourceAccessInfo + + +class UnitTestSummaryResponseModel(UncheckedBaseModel): + id: str = pydantic.Field() + """ + The ID of the test + """ + + name: str = pydantic.Field() + """ + Name of the test + """ + + access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None) + """ + The access information of the test + """ + + created_at_unix_secs: int = pydantic.Field() + """ + Creation time of the test in unix seconds + """ + + last_updated_at_unix_secs: int = pydantic.Field() + """ + Last update time of the test in unix seconds + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py new file mode 100644 index 00000000..4ad13ec6 --- /dev/null +++ b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .referenced_tool_common_model import ReferencedToolCommonModel +from .unit_test_tool_call_parameter import UnitTestToolCallParameter + + +class UnitTestToolCallEvaluationModelInput(UncheckedBaseModel): + parameters: typing.Optional[typing.List[UnitTestToolCallParameter]] = pydantic.Field(default=None) + """ + Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated. + """ + + referenced_tool: ReferencedToolCommonModel = pydantic.Field() + """ + The tool to evaluate a call against. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py new file mode 100644 index 00000000..c8c08dfa --- /dev/null +++ b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .referenced_tool_common_model import ReferencedToolCommonModel +from .unit_test_tool_call_parameter import UnitTestToolCallParameter + + +class UnitTestToolCallEvaluationModelOutput(UncheckedBaseModel): + parameters: typing.Optional[typing.List[UnitTestToolCallParameter]] = pydantic.Field(default=None) + """ + Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated. + """ + + referenced_tool: ReferencedToolCommonModel = pydantic.Field() + """ + The tool to evaluate a call against. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_tool_call_parameter.py b/src/elevenlabs/types/unit_test_tool_call_parameter.py new file mode 100644 index 00000000..c82fe8ed --- /dev/null +++ b/src/elevenlabs/types/unit_test_tool_call_parameter.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .unit_test_tool_call_parameter_eval import UnitTestToolCallParameterEval + + +class UnitTestToolCallParameter(UncheckedBaseModel): + eval: UnitTestToolCallParameterEval + path: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py b/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py new file mode 100644 index 00000000..bc2d3090 --- /dev/null +++ b/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class UnitTestToolCallParameterEval_Exact(UncheckedBaseModel): + type: typing.Literal["exact"] = "exact" + expected_value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UnitTestToolCallParameterEval_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + description: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UnitTestToolCallParameterEval_Regex(UncheckedBaseModel): + type: typing.Literal["regex"] = "regex" + pattern: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UnitTestToolCallParameterEval = typing_extensions.Annotated[ + typing.Union[ + UnitTestToolCallParameterEval_Exact, UnitTestToolCallParameterEval_Llm, UnitTestToolCallParameterEval_Regex + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py b/src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py new file mode 100644 index 00000000..9c740e3b --- /dev/null +++ b/src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateUnitTestRequestDynamicVariablesValue = typing.Union[str, float, int, bool] diff --git a/src/elevenlabs/types/webhook_auth_method_type.py b/src/elevenlabs/types/webhook_auth_method_type.py index 17b85e30..c28d655d 100644 --- a/src/elevenlabs/types/webhook_auth_method_type.py +++ b/src/elevenlabs/types/webhook_auth_method_type.py @@ -2,4 +2,4 @@ import typing -WebhookAuthMethodType = typing.Union[typing.Literal["hmac", "oauth2"], typing.Any] +WebhookAuthMethodType = typing.Union[typing.Literal["hmac", "oauth2", "mtls"], typing.Any] diff --git a/src/elevenlabs/types/workflow_features_usage_common_model.py b/src/elevenlabs/types/workflow_features_usage_common_model.py new file mode 100644 index 00000000..82553a23 --- /dev/null +++ b/src/elevenlabs/types/workflow_features_usage_common_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .feature_status_common_model import FeatureStatusCommonModel + + +class WorkflowFeaturesUsageCommonModel(UncheckedBaseModel): + enabled: typing.Optional[bool] = None + tool_node: typing.Optional[FeatureStatusCommonModel] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py b/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py index dc2809b3..906ea5f3 100644 --- a/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py +++ b/src/elevenlabs/types/workspace_api_key_response_model_permissions_item.py @@ -29,6 +29,9 @@ "workspace_read", "workspace_write", "forced_alignment", + "convai_read", + "convai_write", + "music_generation", ], typing.Any, ] diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 3e1c9c53..0522972c 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -15,7 +15,6 @@ "convai_settings", "convai_secrets", "workspace_auth_connections", - "music_latent", "convai_phone_numbers", "convai_mcp_servers", "convai_batch_calls", From 92c8e9e883e6c52447d26068d5d8a9c311ccc61f Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:06:13 -0700 Subject: [PATCH 10/34] SDK regeneration (#615) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 4414 +++++++++-------- src/elevenlabs/__init__.py | 6 +- src/elevenlabs/base_client.py | 1036 ---- src/elevenlabs/conversational_ai/__init__.py | 5 + .../conversational_ai/agents/client.py | 113 + .../conversational_ai/agents/raw_client.py | 153 + src/elevenlabs/conversational_ai/client.py | 5 + .../conversational_ai/tests/__init__.py | 8 + .../conversational_ai/tests/client.py | 763 +++ .../tests/invocations/__init__.py | 4 + .../tests/invocations/client.py | 238 + .../tests/invocations/raw_client.py | 289 ++ .../conversational_ai/tests/raw_client.py | 919 ++++ .../conversational_ai/tests/types/__init__.py | 8 + ...it_test_request_dynamic_variables_value.py | 0 ...it_test_request_dynamic_variables_value.py | 0 src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/raw_base_client.py | 1313 ----- src/elevenlabs/types/__init__.py | 6 +- src/elevenlabs/types/client_event.py | 1 + .../types/features_usage_common_model.py | 2 + .../types/tests_feature_usage_common_model.py | 22 + .../types/unit_test_run_response_model.py | 1 + 24 files changed, 4746 insertions(+), 4566 deletions(-) create mode 100644 src/elevenlabs/conversational_ai/tests/__init__.py create mode 100644 src/elevenlabs/conversational_ai/tests/client.py create mode 100644 src/elevenlabs/conversational_ai/tests/invocations/__init__.py create mode 100644 src/elevenlabs/conversational_ai/tests/invocations/client.py create mode 100644 src/elevenlabs/conversational_ai/tests/invocations/raw_client.py create mode 100644 src/elevenlabs/conversational_ai/tests/raw_client.py create mode 100644 src/elevenlabs/conversational_ai/tests/types/__init__.py rename src/elevenlabs/{ => conversational_ai/tests}/types/create_unit_test_request_dynamic_variables_value.py (100%) rename src/elevenlabs/{ => conversational_ai/tests}/types/update_unit_test_request_dynamic_variables_value.py (100%) create mode 100644 src/elevenlabs/types/tests_feature_usage_common_model.py diff --git a/pyproject.toml b/pyproject.toml index b43643b6..13440487 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.12.0" +version = "v2.12.1" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index d81be1e2..5868a149 100644 --- a/reference.md +++ b/reference.md @@ -1,5 +1,5 @@ # Reference -
client.create_agent_response_test_route(...) +
client.save_a_voice_preview()
@@ -11,7 +11,7 @@
-Creates a new agent response test. +Add a generated voice to the voice library.
@@ -26,36 +26,12 @@ Creates a new agent response test.
```python -from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - ConversationHistoryTranscriptCommonModelInput, - ElevenLabs, -) +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.create_agent_response_test_route( - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", -) +client.save_a_voice_preview() ```
@@ -71,23 +47,68 @@ client.create_agent_response_test_route(
-**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + +
+ + +## History +
client.history.list(...) +
+
+ +#### 📝 Description
-**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False. - +
+
+ +Returns a list of your generated audio.
+
+
+ +#### 🔌 Usage
-**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.history.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many history items to return at maximum. Can not exceed 1000, defaults to 100.
@@ -95,7 +116,7 @@ client.create_agent_response_test_route(
-**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures +**start_after_history_item_id:** `typing.Optional[str]` — After which ID to start fetching, use this parameter to paginate across a large collection of history items. In case this parameter is not provided history items will be fetched starting from the most recently created one ordered descending by their creation date.
@@ -103,7 +124,7 @@ client.create_agent_response_test_route(
-**name:** `str` +**voice_id:** `typing.Optional[str]` — ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -111,7 +132,7 @@ client.create_agent_response_test_route(
-**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. +**search:** `typing.Optional[str]` — Search term used for filtering history items. If provided, source becomes required.
@@ -119,11 +140,7 @@ client.create_agent_response_test_route(
-**dynamic_variables:** `typing.Optional[ - typing.Dict[ - str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue] - ] -]` — Dynamic variables to replace in the agent config during testing +**source:** `typing.Optional[HistoryListRequestSource]` — Source of the generated history item
@@ -143,7 +160,7 @@ client.create_agent_response_test_route(
-
client.get_agent_response_test_route(...) +
client.history.get(...)
@@ -155,7 +172,7 @@ client.create_agent_response_test_route(
-Gets an agent response test by ID. +Retrieves a history item.
@@ -175,8 +192,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.get_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", +client.history.get( + history_item_id="VW7YKqPnjY4h39yTbx2L", ) ``` @@ -193,7 +210,7 @@ client.get_agent_response_test_route(
-**test_id:** `str` — The id of a chat response test. This is returned on test creation. +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
@@ -213,7 +230,7 @@ client.get_agent_response_test_route(
-
client.update_agent_response_test_route(...) +
client.history.delete(...)
@@ -225,7 +242,7 @@ client.get_agent_response_test_route(
-Updates an agent response test by ID. +Delete a history item by its ID
@@ -240,36 +257,13 @@ Updates an agent response test by ID.
```python -from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - ConversationHistoryTranscriptCommonModelInput, - ElevenLabs, -) +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.update_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", +client.history.delete( + history_item_id="VW7YKqPnjY4h39yTbx2L", ) ``` @@ -286,7 +280,7 @@ client.update_agent_response_test_route(
-**test_id:** `str` — The id of a chat response test. This is returned on test creation. +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
@@ -294,31 +288,70 @@ client.update_agent_response_test_route(
-**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+## TextToSoundEffects +
client.text_to_sound_effects.convert(...)
-**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False. - +#### 📝 Description + +
+
+ +
+
+ +Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. +
+
+#### 🔌 Usage +
-**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful - +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_sound_effects.convert( + text="Spacious braam suitable for high-impact movie trailer moments", +) + +``` +
+
+#### ⚙️ Parameters +
-**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures +
+
+ +**text:** `str` — The text that will get converted into a sound effect.
@@ -326,7 +359,7 @@ client.update_agent_response_test_route(
-**name:** `str` +**output_format:** `typing.Optional[TextToSoundEffectsConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -334,7 +367,7 @@ client.update_agent_response_test_route(
-**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. +**duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None.
@@ -342,11 +375,7 @@ client.update_agent_response_test_route(
-**dynamic_variables:** `typing.Optional[ - typing.Dict[ - str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue] - ] -]` — Dynamic variables to replace in the agent config during testing +**prompt_influence:** `typing.Optional[float]` — A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3.
@@ -354,7 +383,7 @@ client.update_agent_response_test_route(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -366,7 +395,9 @@ client.update_agent_response_test_route(
-
client.delete_chat_response_test_route(...) +## AudioIsolation +## Samples +
client.samples.delete(...)
@@ -378,7 +409,7 @@ client.update_agent_response_test_route(
-Deletes an agent response test by ID. +Removes a sample by its ID.
@@ -398,8 +429,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.delete_chat_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", +client.samples.delete( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", ) ``` @@ -416,7 +448,15 @@ client.delete_chat_response_test_route(
-**test_id:** `str` — The id of a chat response test. This is returned on test creation. +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice.
@@ -436,7 +476,8 @@ client.delete_chat_response_test_route(
-
client.get_agent_response_tests_summaries_route(...) +## TextToSpeech +
client.text_to_speech.convert(...)
@@ -448,7 +489,7 @@ client.delete_chat_response_test_route(
-Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. +Converts text into speech using a voice of your choice and returns audio.
@@ -468,8 +509,11 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.get_agent_response_tests_summaries_route( - test_ids=["test_id_1", "test_id_2"], +client.text_to_speech.convert( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", ) ``` @@ -486,7 +530,7 @@ client.get_agent_response_tests_summaries_route(
-**test_ids:** `typing.Sequence[str]` — List of test IDs to fetch. No duplicates allowed. +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -494,67 +538,56 @@ client.get_agent_response_tests_summaries_route(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**text:** `str` — The text that will get converted into speech.
- -
+
+
+**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +
-
-
client.list_chat_response_tests_route(...)
-#### 📝 Description +**optimize_streaming_latency:** `typing.Optional[int]` -
-
+You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
-Lists all agent response tests with pagination support and optional search filtering. -
-
+**output_format:** `typing.Optional[TextToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +
-#### 🔌 Usage - -
-
-
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.list_chat_response_tests_route() - -``` -
-
+**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +
-#### ⚙️ Parameters - -
-
-
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided.
@@ -562,7 +595,7 @@ client.list_chat_response_tests_route()
-**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30. +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request.
@@ -570,7 +603,7 @@ client.list_chat_response_tests_route()
-**search:** `typing.Optional[str]` — Search query to filter tests by name. +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request
@@ -578,74 +611,47 @@ client.list_chat_response_tests_route()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
-
-
+
+
+**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
-
-
client.run_agent_test_suite_route(...)
-#### 📝 Description - -
-
+**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
-Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. -
-
+**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. +
-#### 🔌 Usage - -
-
-
-```python -from elevenlabs import ElevenLabs, SingleTestRunRequestModel - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.run_agent_test_suite_route( - agent_id="21m00Tcm4TlvDq8ikWAM", - tests=[ - SingleTestRunRequestModel( - test_id="test_id", - ) - ], -) - -``` -
-
+**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +
-#### ⚙️ Parameters - -
-
-
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. +**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.
@@ -653,7 +659,7 @@ client.run_agent_test_suite_route(
-**tests:** `typing.Sequence[SingleTestRunRequestModel]` — List of tests to run on the agent +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -661,7 +667,7 @@ client.run_agent_test_suite_route(
-**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.
@@ -669,7 +675,7 @@ client.run_agent_test_suite_route(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -681,7 +687,7 @@ client.run_agent_test_suite_route(
-
client.get_test_invocation_route(...) +
client.text_to_speech.convert_with_timestamps(...)
@@ -693,7 +699,7 @@ client.run_agent_test_suite_route(
-Gets a test invocation by ID. +Generate speech from text with precise character-level timing information for audio-text synchronization.
@@ -713,8 +719,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.get_test_invocation_route( - test_invocation_id="test_invocation_id", +client.text_to_speech.convert_with_timestamps( + voice_id="21m00Tcm4TlvDq8ikWAM", + text="This is a test for the API of ElevenLabs.", ) ``` @@ -731,7 +738,7 @@ client.get_test_invocation_route(
-**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
@@ -739,71 +746,48 @@ client.get_test_invocation_route(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**text:** `str` — The text that will get converted into speech.
- -
+
+
+**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +
-
-
client.resubmit_tests_route(...)
-#### 📝 Description - -
-
+**optimize_streaming_latency:** `typing.Optional[int]` -
-
+You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). -Resubmits specific test runs from a test invocation. -
-
+Defaults to None. +
-#### 🔌 Usage -
-
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.resubmit_tests_route( - test_invocation_id="test_invocation_id", - test_run_ids=["test_run_ids"], - agent_id="agent_id", -) - -``` -
-
+**output_format:** `typing.Optional[TextToSpeechConvertWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +
-#### ⚙️ Parameters - -
-
-
-**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.
@@ -811,7 +795,7 @@ client.resubmit_tests_route(
-**test_run_ids:** `typing.Sequence[str]` — List of test run IDs to resubmit +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided.
@@ -819,7 +803,7 @@ client.resubmit_tests_route(
-**agent_id:** `str` — Agent ID to resubmit tests for +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request.
@@ -827,7 +811,7 @@ client.resubmit_tests_route(
-**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request
@@ -835,63 +819,69 @@ client.resubmit_tests_route(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
-
-
+
+
+**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
-
-
client.save_a_voice_preview()
-#### 📝 Description +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+
-Add a generated voice to the voice library. -
-
+**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. + -#### 🔌 Usage -
+**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. + +
+
+
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.save_a_voice_preview() - -``` -
-
+**apply_text_normalization:** `typing.Optional[ + BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + -#### ⚙️ Parameters -
+**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + +
+
+
@@ -907,8 +897,7 @@ client.save_a_voice_preview()
-## History -
client.history.list(...) +
client.text_to_speech.stream(...)
@@ -920,7 +909,7 @@ client.save_a_voice_preview()
-Returns a list of your generated audio. +Converts text into speech using a voice of your choice and returns audio as an audio stream.
@@ -940,7 +929,12 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.history.list() +client.text_to_speech.stream( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", +) ``` @@ -956,7 +950,7 @@ client.history.list()
-**page_size:** `typing.Optional[int]` — How many history items to return at maximum. Can not exceed 1000, defaults to 100. +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -964,7 +958,7 @@ client.history.list()
-**start_after_history_item_id:** `typing.Optional[str]` — After which ID to start fetching, use this parameter to paginate across a large collection of history items. In case this parameter is not provided history items will be fetched starting from the most recently created one ordered descending by their creation date. +**text:** `str` — The text that will get converted into speech.
@@ -972,7 +966,7 @@ client.history.list()
-**voice_id:** `typing.Optional[str]` — ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
@@ -980,7 +974,16 @@ client.history.list()
-**search:** `typing.Optional[str]` — Search term used for filtering history items. If provided, source becomes required. +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None.
@@ -988,7 +991,7 @@ client.history.list()
-**source:** `typing.Optional[HistoryListRequestSource]` — Source of the generated history item +**output_format:** `typing.Optional[TextToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -996,69 +999,97 @@ client.history.list()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.
- -
+
+
+**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +
-
-
client.history.get(...)
-#### 📝 Description +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. + +
+
+**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+
-Retrieves a history item. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
-#### 🔌 Usage -
+**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+
-```python -from elevenlabs import ElevenLabs +**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
-client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.history.get( - history_item_id="VW7YKqPnjY4h39yTbx2L", -) +
+
-``` +**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. +
-#### ⚙️ Parameters -
+**apply_text_normalization:** `typing.Optional[ + BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + +
+
+
-**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items. +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.
@@ -1066,7 +1097,7 @@ client.history.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1078,7 +1109,7 @@ client.history.get(
-
client.history.delete(...) +
client.text_to_speech.stream_with_timestamps(...)
@@ -1090,7 +1121,7 @@ client.history.get(
-Delete a history item by its ID +Converts text into speech using a voice of your choice and returns a stream of JSONs containing audio as a base64 encoded string together with information on when which character was spoken.
@@ -1110,9 +1141,14 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.history.delete( - history_item_id="VW7YKqPnjY4h39yTbx2L", +response = client.text_to_speech.stream_with_timestamps( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", ) +for chunk in response.data: + yield chunk ``` @@ -1128,7 +1164,7 @@ client.history.delete(
-**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items. +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -1136,70 +1172,112 @@ client.history.delete(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**text:** `str` — The text that will get converted into speech.
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +
+
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). +Defaults to None. +
-
-## TextToSoundEffects -
client.text_to_sound_effects.convert(...)
-#### 📝 Description +**output_format:** `typing.Optional[TextToSpeechStreamWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+
-Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. +
-#### 🔌 Usage -
+**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+
-```python -from elevenlabs import ElevenLabs +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
-client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.text_to_sound_effects.convert( - text="Spacious braam suitable for high-impact movie trailer moments", -) +
+
-``` +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
+ +
+
+ +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
-#### ⚙️ Parameters -
+**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+
-**text:** `str` — The text that will get converted into a sound effect. +**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.
@@ -1207,7 +1285,7 @@ client.text_to_sound_effects.convert(
-**output_format:** `typing.Optional[TextToSoundEffectsConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.
@@ -1215,7 +1293,9 @@ client.text_to_sound_effects.convert(
-**duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. +**apply_text_normalization:** `typing.Optional[ + BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -1223,7 +1303,7 @@ client.text_to_sound_effects.convert(
-**prompt_influence:** `typing.Optional[float]` — A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.
@@ -1231,7 +1311,7 @@ client.text_to_sound_effects.convert(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1243,9 +1323,8 @@ client.text_to_sound_effects.convert(
-## AudioIsolation -## Samples -
client.samples.delete(...) +## TextToDialogue +
client.text_to_dialogue.convert(...)
@@ -1257,7 +1336,7 @@ client.text_to_sound_effects.convert(
-Removes a sample by its ID. +Converts a list of text and voice ID pairs into speech (dialogue) and returns audio.
@@ -1272,14 +1351,22 @@ Removes a sample by its ID.
```python -from elevenlabs import ElevenLabs +from elevenlabs import DialogueInput, ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.samples.delete( - voice_id="21m00Tcm4TlvDq8ikWAM", - sample_id="VW7YKqPnjY4h39yTbx2L", +client.text_to_dialogue.convert( + inputs=[ + DialogueInput( + text="Knock knock", + voice_id="JBFqnCBsd6RMkjVDRZzb", + ), + DialogueInput( + text="Who is there?", + voice_id="Aw4FAjKCGjjNkVhN1Xmq", + ), + ], ) ``` @@ -1296,7 +1383,7 @@ client.samples.delete(
-**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech.
@@ -1304,7 +1391,7 @@ client.samples.delete(
-**sample_id:** `str` — ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice. +**output_format:** `typing.Optional[TextToDialogueConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -1312,7 +1399,39 @@ client.samples.delete(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1324,8 +1443,7 @@ client.samples.delete(
-## TextToSpeech -
client.text_to_speech.convert(...) +
client.text_to_dialogue.stream(...)
@@ -1337,7 +1455,7 @@ client.samples.delete(
-Converts text into speech using a voice of your choice and returns audio. +Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream.
@@ -1352,16 +1470,22 @@ Converts text into speech using a voice of your choice and returns audio.
```python -from elevenlabs import ElevenLabs +from elevenlabs import DialogueInput, ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_speech.convert( - voice_id="JBFqnCBsd6RMkjVDRZzb", - output_format="mp3_44100_128", - text="The first move is what sets everything in motion.", - model_id="eleven_multilingual_v2", +client.text_to_dialogue.stream( + inputs=[ + DialogueInput( + text="Knock knock", + voice_id="JBFqnCBsd6RMkjVDRZzb", + ), + DialogueInput( + text="Who is there?", + voice_id="Aw4FAjKCGjjNkVhN1Xmq", + ), + ], ) ``` @@ -1378,7 +1502,7 @@ client.text_to_speech.convert(
-**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech.
@@ -1386,7 +1510,7 @@ client.text_to_speech.convert(
-**text:** `str` — The text that will get converted into speech. +**output_format:** `typing.Optional[TextToDialogueStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -1394,7 +1518,7 @@ client.text_to_speech.convert(
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.
@@ -1402,16 +1526,15 @@ client.text_to_speech.convert(
-**optimize_streaming_latency:** `typing.Optional[int]` +**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
-You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: -0 - default mode (no latency optimizations) -1 - normal latency optimizations (about 50% of possible latency improvement of option 3) -2 - strong latency optimizations (about 75% of possible latency improvement of option 3) -3 - max latency optimizations -4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). +
+
-Defaults to None. +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request
@@ -1419,7 +1542,7 @@ Defaults to None.
-**output_format:** `typing.Optional[TextToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
@@ -1427,23 +1550,72 @@ Defaults to None.
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
+
+
+ + + + +
+## SpeechToSpeech +
client.speech_to_speech.convert(...)
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. - +#### 📝 Description + +
+
+ +
+
+ +Transform audio from one voice to another. Maintain full control over emotion, timing and delivery. +
+
+#### 🔌 Usage +
-**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.speech_to_speech.convert( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + model_id="eleven_multilingual_sts_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -1451,7 +1623,9 @@ Defaults to None.
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request +**audio:** `from __future__ import annotations + +core.File` — See core.File for more documentation
@@ -1459,7 +1633,7 @@ Defaults to None.
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
@@ -1467,7 +1641,16 @@ Defaults to None.
-**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None.
@@ -1475,7 +1658,7 @@ Defaults to None.
-**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**output_format:** `typing.Optional[SpeechToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -1483,7 +1666,7 @@ Defaults to None.
-**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.
@@ -1491,7 +1674,7 @@ Defaults to None.
-**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string.
@@ -1499,7 +1682,7 @@ Defaults to None.
-**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
@@ -1507,7 +1690,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer.
@@ -1515,7 +1698,7 @@ Defaults to None.
-**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. +**file_format:** `typing.Optional[SpeechToSpeechConvertRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.
@@ -1535,7 +1718,7 @@ Defaults to None.
-
client.text_to_speech.convert_with_timestamps(...) +
client.speech_to_speech.stream(...)
@@ -1547,7 +1730,7 @@ Defaults to None.
-Generate speech from text with precise character-level timing information for audio-text synchronization. +Stream audio from one voice to another. Maintain full control over emotion, timing and delivery.
@@ -1567,9 +1750,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_speech.convert_with_timestamps( - voice_id="21m00Tcm4TlvDq8ikWAM", - text="This is a test for the API of ElevenLabs.", +client.speech_to_speech.stream( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + model_id="eleven_multilingual_sts_v2", ) ``` @@ -1586,7 +1770,7 @@ client.text_to_speech.convert_with_timestamps(
-**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -1594,7 +1778,9 @@ client.text_to_speech.convert_with_timestamps(
-**text:** `str` — The text that will get converted into speech. +**audio:** `from __future__ import annotations + +core.File` — See core.File for more documentation
@@ -1627,7 +1813,7 @@ Defaults to None.
-**output_format:** `typing.Optional[TextToSpeechConvertWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**output_format:** `typing.Optional[SpeechToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -1635,7 +1821,7 @@ Defaults to None.
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.
@@ -1643,7 +1829,7 @@ Defaults to None.
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string.
@@ -1651,7 +1837,7 @@ Defaults to None.
-**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
@@ -1659,7 +1845,7 @@ Defaults to None.
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request +**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer.
@@ -1667,7 +1853,7 @@ Defaults to None.
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**file_format:** `typing.Optional[SpeechToSpeechStreamRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.
@@ -1675,15 +1861,70 @@ Defaults to None.
-**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
+ +
+ + + + +
+ +## TextToVoice +
client.text_to_voice.create_previews(...) +
+
+ +#### 📝 Description
-**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +
+
+ +Create a voice from a text prompt. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_voice.create_previews( + voice_description="A sassy squeaky mouse", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_description:** `str` — Description to use for the created voice.
@@ -1691,7 +1932,7 @@ Defaults to None.
-**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. +**output_format:** `typing.Optional[TextToVoiceCreatePreviewsRequestOutputFormat]` — The output format of the generated audio.
@@ -1699,7 +1940,7 @@ Defaults to None.
-**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000.
@@ -1707,7 +1948,7 @@ Defaults to None.
-**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description.
@@ -1715,9 +1956,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.
@@ -1725,7 +1964,23 @@ Defaults to None.
-**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. +**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. + +
+
+ +
+
+ +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
@@ -1745,7 +2000,7 @@ Defaults to None.
-
client.text_to_speech.stream(...) +
client.text_to_voice.create(...)
@@ -1757,7 +2012,7 @@ Defaults to None.
-Converts text into speech using a voice of your choice and returns audio as an audio stream. +Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using POST /v1/text-to-voice/design or POST /v1/text-to-voice/:voice_id/remix.
@@ -1777,11 +2032,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_speech.stream( - voice_id="JBFqnCBsd6RMkjVDRZzb", - output_format="mp3_44100_128", - text="The first move is what sets everything in motion.", - model_id="eleven_multilingual_v2", +client.text_to_voice.create( + voice_name="Sassy squeaky mouse", + voice_description="A sassy squeaky mouse", + generated_voice_id="37HceQefKmEi3bGovXjL", ) ``` @@ -1798,7 +2052,7 @@ client.text_to_speech.stream(
-**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**voice_name:** `str` — Name to use for the created voice.
@@ -1806,7 +2060,7 @@ client.text_to_speech.stream(
-**text:** `str` — The text that will get converted into speech. +**voice_description:** `str` — Description to use for the created voice.
@@ -1814,7 +2068,7 @@ client.text_to_speech.stream(
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +**generated_voice_id:** `str` — The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet.
@@ -1822,16 +2076,7 @@ client.text_to_speech.stream(
-**optimize_streaming_latency:** `typing.Optional[int]` - -You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: -0 - default mode (no latency optimizations) -1 - normal latency optimizations (about 50% of possible latency improvement of option 3) -2 - strong latency optimizations (about 75% of possible latency improvement of option 3) -3 - max latency optimizations -4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). - -Defaults to None. +**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Optional, metadata to add to the created voice. Defaults to None.
@@ -1839,7 +2084,7 @@ Defaults to None.
-**output_format:** `typing.Optional[TextToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**played_not_selected_voice_ids:** `typing.Optional[typing.Sequence[str]]` — List of voice ids that the user has played but not selected. Used for RLHF.
@@ -1847,15 +2092,69 @@ Defaults to None.
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- + +
+ + + + +
+ +
client.text_to_voice.design(...)
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +#### 📝 Description + +
+
+ +
+
+ +Design a voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_voice.design( + voice_description="A sassy squeaky mouse", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_description:** `str` — Description to use for the created voice.
@@ -1863,7 +2162,7 @@ Defaults to None.
-**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. +**output_format:** `typing.Optional[TextToVoiceDesignRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
@@ -1871,7 +2170,7 @@ Defaults to None.
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request +**model_id:** `typing.Optional[VoiceDesignRequestModelModelId]` — Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3.
@@ -1879,7 +2178,7 @@ Defaults to None.
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000.
@@ -1887,7 +2186,7 @@ Defaults to None.
-**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description.
@@ -1895,7 +2194,7 @@ Defaults to None.
-**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.
@@ -1903,7 +2202,7 @@ Defaults to None.
-**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice.
@@ -1911,7 +2210,7 @@ Defaults to None.
-**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
@@ -1919,7 +2218,7 @@ Defaults to None.
-**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. +**stream_previews:** `typing.Optional[bool]` — Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
@@ -1927,9 +2226,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**remixing_session_id:** `typing.Optional[str]` — The remixing session id.
@@ -1937,7 +2234,7 @@ Defaults to None.
-**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. +**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created.
@@ -1945,7 +2242,31 @@ Defaults to None.
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. + +
+
+ +
+
+ +**reference_audio_base_64:** `typing.Optional[str]` — Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. + +
+
+ +
+
+ +**prompt_strength:** `typing.Optional[float]` — Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1957,7 +2278,8 @@ Defaults to None.
-
client.text_to_speech.stream_with_timestamps(...) +## user +
client.user.get()
@@ -1969,7 +2291,7 @@ Defaults to None.
-Converts text into speech using a voice of your choice and returns a stream of JSONs containing audio as a base64 encoded string together with information on when which character was spoken. +Gets information about the user
@@ -1989,14 +2311,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -response = client.text_to_speech.stream_with_timestamps( - voice_id="JBFqnCBsd6RMkjVDRZzb", - output_format="mp3_44100_128", - text="The first move is what sets everything in motion.", - model_id="eleven_multilingual_v2", -) -for chunk in response.data: - yield chunk +client.user.get() ``` @@ -2012,23 +2327,68 @@ for chunk in response.data:
-**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+ +## Voices +
client.voices.get_all(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of all available voices for a user. +
+
+
+
+ +#### 🔌 Usage
-**text:** `str` — The text that will get converted into speech. - +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.voices.get_all() + +``` +
+
+#### ⚙️ Parameters +
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +
+
+ +**show_legacy:** `typing.Optional[bool]` — If set to true, legacy premade voices will be included in responses from /v1/voices
@@ -2036,40 +2396,69 @@ for chunk in response.data:
-**optimize_streaming_latency:** `typing.Optional[int]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
-You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: -0 - default mode (no latency optimizations) -1 - normal latency optimizations (about 50% of possible latency improvement of option 3) -2 - strong latency optimizations (about 75% of possible latency improvement of option 3) -3 - max latency optimizations -4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). -Defaults to None. -
+
+
client.voices.search(...)
-**output_format:** `typing.Optional[TextToSpeechStreamWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - +#### 📝 Description + +
+
+ +
+
+ +Gets a list of all available voices for a user with search, filtering and pagination.
+
+
+ +#### 🔌 Usage
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. - +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.voices.search( + include_total_count=True, +) + +```
+
+
+ +#### ⚙️ Parameters
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +
+
+ +**next_page_token:** `typing.Optional[str]` — The next page token to use for pagination. Returned from the previous request.
@@ -2077,7 +2466,7 @@ Defaults to None.
-**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. +**page_size:** `typing.Optional[int]` — How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included.
@@ -2085,7 +2474,7 @@ Defaults to None.
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request +**search:** `typing.Optional[str]` — Search term to filter voices by. Searches in name, description, labels, category.
@@ -2093,7 +2482,7 @@ Defaults to None.
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**sort:** `typing.Optional[str]` — Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices.
@@ -2101,7 +2490,7 @@ Defaults to None.
-**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'asc' or 'desc'.
@@ -2109,7 +2498,7 @@ Defaults to None.
-**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. +**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
@@ -2117,7 +2506,7 @@ Defaults to None.
-**previous_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. +**category:** `typing.Optional[str]` — Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'
@@ -2125,7 +2514,7 @@ Defaults to None.
-**next_request_ids:** `typing.Optional[typing.Sequence[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. +**fine_tuning_state:** `typing.Optional[str]` — State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'
@@ -2133,7 +2522,7 @@ Defaults to None.
-**use_pvc_as_ivc:** `typing.Optional[bool]` — If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. +**collection_id:** `typing.Optional[str]` — Collection ID to filter voices by.
@@ -2141,9 +2530,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**include_total_count:** `typing.Optional[bool]` — Whether to include the total count of voices found in the response. Incurs a performance cost.
@@ -2151,7 +2538,7 @@ Defaults to None.
-**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. +**voice_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Voice IDs to lookup by. Maximum 100 voice IDs.
@@ -2171,8 +2558,7 @@ Defaults to None.
-## TextToDialogue -
client.text_to_dialogue.convert(...) +
client.voices.get(...)
@@ -2184,7 +2570,7 @@ Defaults to None.
-Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. +Returns metadata about a specific voice.
@@ -2199,22 +2585,13 @@ Converts a list of text and voice ID pairs into speech (dialogue) and returns au
```python -from elevenlabs import DialogueInput, ElevenLabs +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_dialogue.convert( - inputs=[ - DialogueInput( - text="Knock knock", - voice_id="JBFqnCBsd6RMkjVDRZzb", - ), - DialogueInput( - text="Who is there?", - voice_id="Aw4FAjKCGjjNkVhN1Xmq", - ), - ], +client.voices.get( + voice_id="21m00Tcm4TlvDq8ikWAM", ) ``` @@ -2231,7 +2608,7 @@ client.text_to_dialogue.convert(
-**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -2239,7 +2616,7 @@ client.text_to_dialogue.convert(
-**output_format:** `typing.Optional[TextToDialogueConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**with_settings:** `typing.Optional[bool]` — This parameter is now deprecated. It is ignored and will be removed in a future version.
@@ -2247,31 +2624,69 @@ client.text_to_dialogue.convert(
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+
client.voices.delete(...)
-**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. - +#### 📝 Description + +
+
+ +
+
+ +Deletes a voice by its ID.
+
+
+ +#### 🔌 Usage
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request - +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.voices.delete( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +```
+
+
+ +#### ⚙️ Parameters
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -2279,7 +2694,7 @@ client.text_to_dialogue.convert(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2291,7 +2706,7 @@ client.text_to_dialogue.convert(
-
client.text_to_dialogue.stream(...) +
client.voices.update(...)
@@ -2303,7 +2718,7 @@ client.text_to_dialogue.convert(
-Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. +Edit a voice created by you.
@@ -2318,22 +2733,14 @@ Converts a list of text and voice ID pairs into speech (dialogue) and returns an
```python -from elevenlabs import DialogueInput, ElevenLabs +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_dialogue.stream( - inputs=[ - DialogueInput( - text="Knock knock", - voice_id="JBFqnCBsd6RMkjVDRZzb", - ), - DialogueInput( - text="Who is there?", - voice_id="Aw4FAjKCGjjNkVhN1Xmq", - ), - ], +client.voices.update( + voice_id="21m00Tcm4TlvDq8ikWAM", + name="name", ) ``` @@ -2350,7 +2757,7 @@ client.text_to_dialogue.stream(
-**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -2358,7 +2765,7 @@ client.text_to_dialogue.stream(
-**output_format:** `typing.Optional[TextToDialogueStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website.
@@ -2366,7 +2773,9 @@ client.text_to_dialogue.stream(
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. +**files:** `from __future__ import annotations + +typing.Optional[typing.List[core.File]]` — See core.File for more documentation
@@ -2374,7 +2783,7 @@ client.text_to_dialogue.stream(
-**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
@@ -2382,7 +2791,7 @@ client.text_to_dialogue.stream(
-**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request +**description:** `typing.Optional[str]` — A description of the voice.
@@ -2390,7 +2799,7 @@ client.text_to_dialogue.stream(
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**labels:** `typing.Optional[str]` — Serialized labels dictionary for the voice.
@@ -2398,7 +2807,7 @@ client.text_to_dialogue.stream(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2410,8 +2819,7 @@ client.text_to_dialogue.stream(
-## SpeechToSpeech -
client.speech_to_speech.convert(...) +
client.voices.share(...)
@@ -2423,7 +2831,7 @@ client.text_to_dialogue.stream(
-Transform audio from one voice to another. Maintain full control over emotion, timing and delivery. +Add a shared voice to your collection of Voices
@@ -2443,10 +2851,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.speech_to_speech.convert( - voice_id="JBFqnCBsd6RMkjVDRZzb", - output_format="mp3_44100_128", - model_id="eleven_multilingual_sts_v2", +client.voices.share( + public_user_id="63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca", + voice_id="21m00Tcm4TlvDq8ikWAM", + new_name="John Smith", ) ``` @@ -2463,74 +2871,7 @@ client.speech_to_speech.convert(
-**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - -
-
- -
-
- -**audio:** `from __future__ import annotations - -core.File` — See core.File for more documentation - -
-
- -
-
- -**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. - -
-
- -
-
- -**optimize_streaming_latency:** `typing.Optional[int]` - -You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: -0 - default mode (no latency optimizations) -1 - normal latency optimizations (about 50% of possible latency improvement of option 3) -2 - strong latency optimizations (about 75% of possible latency improvement of option 3) -3 - max latency optimizations -4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). - -Defaults to None. - -
-
- -
-
- -**output_format:** `typing.Optional[SpeechToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - -
-
- -
-
- -**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. - -
-
- -
-
- -**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. - -
-
- -
-
- -**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**public_user_id:** `str` — Public user ID used to publicly identify ElevenLabs users.
@@ -2538,7 +2879,7 @@ Defaults to None.
-**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.
@@ -2546,7 +2887,7 @@ Defaults to None.
-**file_format:** `typing.Optional[SpeechToSpeechConvertRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. +**new_name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website.
@@ -2554,7 +2895,7 @@ Defaults to None.
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2566,7 +2907,7 @@ Defaults to None.
-
client.speech_to_speech.stream(...) +
client.voices.get_shared(...)
@@ -2578,7 +2919,7 @@ Defaults to None.
-Stream audio from one voice to another. Maintain full control over emotion, timing and delivery. +Retrieves a list of shared voices.
@@ -2598,10 +2939,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.speech_to_speech.stream( - voice_id="JBFqnCBsd6RMkjVDRZzb", - output_format="mp3_44100_128", - model_id="eleven_multilingual_sts_v2", +client.voices.get_shared( + featured=True, + reader_app_enabled=True, ) ``` @@ -2618,7 +2958,7 @@ client.speech_to_speech.stream(
-**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**page_size:** `typing.Optional[int]` — How many shared voices to return at maximum. Can not exceed 100, defaults to 30.
@@ -2626,9 +2966,7 @@ client.speech_to_speech.stream(
-**audio:** `from __future__ import annotations - -core.File` — See core.File for more documentation +**category:** `typing.Optional[VoicesGetSharedRequestCategory]` — Voice category used for filtering
@@ -2636,7 +2974,7 @@ core.File` — See core.File for more documentation
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +**gender:** `typing.Optional[str]` — Gender used for filtering
@@ -2644,16 +2982,7 @@ core.File` — See core.File for more documentation
-**optimize_streaming_latency:** `typing.Optional[int]` - -You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: -0 - default mode (no latency optimizations) -1 - normal latency optimizations (about 50% of possible latency improvement of option 3) -2 - strong latency optimizations (about 75% of possible latency improvement of option 3) -3 - max latency optimizations -4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). - -Defaults to None. +**age:** `typing.Optional[str]` — Age used for filtering
@@ -2661,7 +2990,7 @@ Defaults to None.
-**output_format:** `typing.Optional[SpeechToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**accent:** `typing.Optional[str]` — Accent used for filtering
@@ -2669,7 +2998,7 @@ Defaults to None.
-**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. +**language:** `typing.Optional[str]` — Language used for filtering
@@ -2677,7 +3006,7 @@ Defaults to None.
-**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. +**locale:** `typing.Optional[str]` — Locale used for filtering
@@ -2685,7 +3014,7 @@ Defaults to None.
-**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. +**search:** `typing.Optional[str]` — Search term used for filtering
@@ -2693,7 +3022,7 @@ Defaults to None.
-**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. +**use_cases:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Use-case used for filtering
@@ -2701,7 +3030,7 @@ Defaults to None.
-**file_format:** `typing.Optional[SpeechToSpeechStreamRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. +**descriptives:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Search term used for filtering
@@ -2709,94 +3038,31 @@ Defaults to None.
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**featured:** `typing.Optional[bool]` — Filter featured voices
- -
+
+
+**min_notice_period_days:** `typing.Optional[int]` — Filter voices with a minimum notice period of the given number of days. +
-
-## TextToVoice -
client.text_to_voice.create_previews(...)
-#### 📝 Description - -
-
+**include_custom_rates:** `typing.Optional[bool]` — Include/exclude voices with custom rates + +
+
-Create a voice from a text prompt. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.text_to_voice.create_previews( - voice_description="A sassy squeaky mouse", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**voice_description:** `str` — Description to use for the created voice. - -
-
- -
-
- -**output_format:** `typing.Optional[TextToVoiceCreatePreviewsRequestOutputFormat]` — The output format of the generated audio. - -
-
- -
-
- -**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. - -
-
- -
-
- -**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. +**include_live_moderated:** `typing.Optional[bool]` — Include/exclude voices that are live moderated
@@ -2804,7 +3070,7 @@ client.text_to_voice.create_previews(
-**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. +**reader_app_enabled:** `typing.Optional[bool]` — Filter voices that are enabled for the reader app
@@ -2812,7 +3078,7 @@ client.text_to_voice.create_previews(
-**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. +**owner_id:** `typing.Optional[str]` — Filter voices by public owner ID
@@ -2820,7 +3086,7 @@ client.text_to_voice.create_previews(
-**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. +**sort:** `typing.Optional[str]` — Sort criteria
@@ -2828,7 +3094,7 @@ client.text_to_voice.create_previews(
-**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. +**page:** `typing.Optional[int]`
@@ -2848,7 +3114,7 @@ client.text_to_voice.create_previews(
-
client.text_to_voice.create(...) +
client.voices.find_similar_voices(...)
@@ -2860,7 +3126,7 @@ client.text_to_voice.create_previews(
-Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using POST /v1/text-to-voice/design or POST /v1/text-to-voice/:voice_id/remix. +Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values.
@@ -2880,11 +3146,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_voice.create( - voice_name="Sassy squeaky mouse", - voice_description="A sassy squeaky mouse", - generated_voice_id="37HceQefKmEi3bGovXjL", -) +client.voices.find_similar_voices() ``` @@ -2900,23 +3162,9 @@ client.text_to_voice.create(
-**voice_name:** `str` — Name to use for the created voice. - -
-
- -
-
- -**voice_description:** `str` — Description to use for the created voice. - -
-
- -
-
+**audio_file:** `from __future__ import annotations -**generated_voice_id:** `str` — The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. +typing.Optional[core.File]` — See core.File for more documentation
@@ -2924,7 +3172,7 @@ client.text_to_voice.create(
-**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Optional, metadata to add to the created voice. Defaults to None. +**similarity_threshold:** `typing.Optional[float]` — Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned.
@@ -2932,7 +3180,7 @@ client.text_to_voice.create(
-**played_not_selected_voice_ids:** `typing.Optional[typing.Sequence[str]]` — List of voice ids that the user has played but not selected. Used for RLHF. +**top_k:** `typing.Optional[int]` — Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100.
@@ -2952,7 +3200,8 @@ client.text_to_voice.create(
-
client.text_to_voice.design(...) +## Studio +
client.studio.create_podcast(...)
@@ -2964,7 +3213,7 @@ client.text_to_voice.create(
-Design a voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. +Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs.
@@ -2979,13 +3228,29 @@ Design a voice via a prompt. This method returns a list of voice previews. Each
```python -from elevenlabs import ElevenLabs +from elevenlabs import ( + ElevenLabs, + PodcastConversationModeData, + PodcastTextSource, +) +from elevenlabs.studio import ( + BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, +) client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.text_to_voice.design( - voice_description="A sassy squeaky mouse", +client.studio.create_podcast( + model_id="eleven_multilingual_v2", + mode=BodyCreatePodcastV1StudioPodcastsPostMode_Conversation( + conversation=PodcastConversationModeData( + host_voice_id="aw1NgEzBg83R7vgmiJt6", + guest_voice_id="aw1NgEzBg83R7vgmiJt7", + ), + ), + source=PodcastTextSource( + text="This is a test podcast.", + ), ) ``` @@ -3002,7 +3267,7 @@ client.text_to_voice.design(
-**voice_description:** `str` — Description to use for the created voice. +**model_id:** `str` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.
@@ -3010,7 +3275,7 @@ client.text_to_voice.design(
-**output_format:** `typing.Optional[TextToVoiceDesignRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. +**mode:** `BodyCreatePodcastV1StudioPodcastsPostMode` — The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue.
@@ -3018,7 +3283,7 @@ client.text_to_voice.design(
-**model_id:** `typing.Optional[VoiceDesignRequestModelModelId]` — Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3. +**source:** `BodyCreatePodcastV1StudioPodcastsPostSource` — The source content for the Podcast.
@@ -3026,15 +3291,13 @@ client.text_to_voice.design(
-**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. - -
-
- -
-
+**quality_preset:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]` -**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. +Output quality of the generated audio. Must be one of: +standard - standard output format, 128kbps with 44.1kHz sample rate. +high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%. +ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%. +ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
@@ -3042,15 +3305,12 @@ client.text_to_voice.design(
-**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. - -
-
- -
-
+**duration_scale:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]` -**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. +Duration of the generated podcast. Must be one of: +short - produces podcasts shorter than 3 minutes. +default - produces podcasts roughly between 3-7 minutes. +long - produces podcasts longer than 7 minutes.
@@ -3058,7 +3318,7 @@ client.text_to_voice.design(
-**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. +**language:** `typing.Optional[str]` — An optional language of the Studio project. Two-letter language code (ISO 639-1).
@@ -3066,7 +3326,7 @@ client.text_to_voice.design(
-**stream_previews:** `typing.Optional[bool]` — Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. +**intro:** `typing.Optional[str]` — The intro text that will always be added to the beginning of the podcast.
@@ -3074,7 +3334,7 @@ client.text_to_voice.design(
-**remixing_session_id:** `typing.Optional[str]` — The remixing session id. +**outro:** `typing.Optional[str]` — The outro text that will always be added to the end of the podcast.
@@ -3082,7 +3342,7 @@ client.text_to_voice.design(
-**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. +**instructions_prompt:** `typing.Optional[str]` — Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone.
@@ -3090,7 +3350,7 @@ client.text_to_voice.design(
-**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. +**highlights:** `typing.Optional[typing.Sequence[str]]` — A brief summary or highlights of the Studio project's content, providing key points or themes. This should be between 10 and 70 characters.
@@ -3098,15 +3358,63 @@ client.text_to_voice.design(
-**reference_audio_base_64:** `typing.Optional[str]` — Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. - -
-
+**callback_url:** `typing.Optional[str]` -
-
-**prompt_strength:** `typing.Optional[float]` — Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion + Messages: + 1. When project was converted successfully: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "success", + project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", + error_details: None, + } + } + 2. When project conversion failed: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "error", + project_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } + + 3. When chapter was converted successfully: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "success", + chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", + error_details: None, + } + } + 4. When chapter conversion failed: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "error", + chapter_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } +
@@ -3126,8 +3434,8 @@ client.text_to_voice.design(
-## user -
client.user.get() +## Dubbing +
client.dubbing.list(...)
@@ -3139,7 +3447,7 @@ client.text_to_voice.design(
-Gets information about the user +List the dubs you have access to.
@@ -3159,7 +3467,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.user.get() +client.dubbing.list() ``` @@ -3175,68 +3483,31 @@ client.user.get()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
- -
+
+
+**page_size:** `typing.Optional[int]` — How many dubs to return at maximum. Can not exceed 200, defaults to 100. +
-
-## Voices -
client.voices.get_all(...)
-#### 📝 Description - -
-
- -
-
- -Returns a list of all available voices for a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.voices.get_all() - -``` -
-
+**dubbing_status:** `typing.Optional[DubbingListRequestDubbingStatus]` — What state the dub is currently in. +
-#### ⚙️ Parameters -
-
-
- -**show_legacy:** `typing.Optional[bool]` — If set to true, legacy premade voices will be included in responses from /v1/voices +**filter_by_creator:** `typing.Optional[DubbingListRequestFilterByCreator]` — Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them.
@@ -3256,7 +3527,7 @@ client.voices.get_all()
-
client.voices.search(...) +
client.dubbing.create(...)
@@ -3268,7 +3539,7 @@ client.voices.get_all()
-Gets a list of all available voices for a user with search, filtering and pagination. +Dubs a provided audio or video file into given language.
@@ -3288,9 +3559,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.voices.search( - include_total_count=True, -) +client.dubbing.create() ``` @@ -3306,7 +3575,9 @@ client.voices.search(
-**next_page_token:** `typing.Optional[str]` — The next page token to use for pagination. Returned from the previous request. +**file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -3314,7 +3585,9 @@ client.voices.search(
-**page_size:** `typing.Optional[int]` — How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included. +**csv_file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -3322,7 +3595,9 @@ client.voices.search(
-**search:** `typing.Optional[str]` — Search term to filter voices by. Searches in name, description, labels, category. +**foreground_audio_file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -3330,7 +3605,9 @@ client.voices.search(
-**sort:** `typing.Optional[str]` — Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices. +**background_audio_file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -3338,7 +3615,7 @@ client.voices.search(
-**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'asc' or 'desc'. +**name:** `typing.Optional[str]` — Name of the dubbing project.
@@ -3346,7 +3623,7 @@ client.voices.search(
-**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'. +**source_url:** `typing.Optional[str]` — URL of the source video/audio file.
@@ -3354,7 +3631,7 @@ client.voices.search(
-**category:** `typing.Optional[str]` — Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' +**source_lang:** `typing.Optional[str]` — Source language.
@@ -3362,7 +3639,7 @@ client.voices.search(
-**fine_tuning_state:** `typing.Optional[str]` — State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed' +**target_lang:** `typing.Optional[str]` — The Target language to dub the content into.
@@ -3370,7 +3647,7 @@ client.voices.search(
-**collection_id:** `typing.Optional[str]` — Collection ID to filter voices by. +**target_accent:** `typing.Optional[str]` — [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer.
@@ -3378,7 +3655,7 @@ client.voices.search(
-**include_total_count:** `typing.Optional[bool]` — Whether to include the total count of voices found in the response. Incurs a performance cost. +**num_speakers:** `typing.Optional[int]` — Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers
@@ -3386,7 +3663,7 @@ client.voices.search(
-**voice_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Voice IDs to lookup by. Maximum 100 voice IDs. +**watermark:** `typing.Optional[bool]` — Whether to apply watermark to the output video.
@@ -3394,69 +3671,31 @@ client.voices.search(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**start_time:** `typing.Optional[int]` — Start time of the source video/audio file.
- -
- - - - -
- -
client.voices.get(...) -
-
- -#### 📝 Description - -
-
-Returns metadata about a specific voice. -
-
+**end_time:** `typing.Optional[int]` — End time of the source video/audio file. +
-#### 🔌 Usage -
-
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.voices.get( - voice_id="21m00Tcm4TlvDq8ikWAM", -) - -``` -
-
+**highest_resolution:** `typing.Optional[bool]` — Whether to use the highest resolution available. +
-#### ⚙️ Parameters -
-
-
- -**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**drop_background_audio:** `typing.Optional[bool]` — An advanced setting. Whether to drop background audio from the final dub. This can improve dub quality where it's known that audio shouldn't have a background track such as for speeches or monologues.
@@ -3464,7 +3703,7 @@ client.voices.get(
-**with_settings:** `typing.Optional[bool]` — This parameter is now deprecated. It is ignored and will be removed in a future version. +**use_profanity_filter:** `typing.Optional[bool]` — [BETA] Whether transcripts should have profanities censored with the words '[censored]'
@@ -3472,69 +3711,31 @@ client.voices.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**dubbing_studio:** `typing.Optional[bool]` — Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource.
-
-
- - -
-
-
- -
client.voices.delete(...) -
-
- -#### 📝 Description - -
-
-Deletes a voice by its ID. -
-
+**disable_voice_cloning:** `typing.Optional[bool]` — [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. +
-#### 🔌 Usage -
-
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.voices.delete( - voice_id="21m00Tcm4TlvDq8ikWAM", -) - -``` -
-
+**mode:** `typing.Optional[str]` — automatic or manual. Manual mode is only supported when creating a dubbing studio project +
-#### ⚙️ Parameters -
-
-
- -**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. +**csv_fps:** `typing.Optional[float]` — Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes.
@@ -3554,7 +3755,7 @@ client.voices.delete(
-
client.voices.update(...) +
client.dubbing.get(...)
@@ -3566,7 +3767,7 @@ client.voices.delete(
-Edit a voice created by you. +Returns metadata about a dubbing project, including whether it's still in progress or not
@@ -3586,9 +3787,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.voices.update( - voice_id="21m00Tcm4TlvDq8ikWAM", - name="name", +client.dubbing.get( + dubbing_id="dubbing_id", ) ``` @@ -3605,49 +3805,7 @@ client.voices.update(
-**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - -
-
- -
-
- -**name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. - -
-
- -
-
- -**files:** `from __future__ import annotations - -typing.Optional[typing.List[core.File]]` — See core.File for more documentation - -
-
- -
-
- -**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. - -
-
- -
-
- -**description:** `typing.Optional[str]` — A description of the voice. - -
-
- -
-
- -**labels:** `typing.Optional[str]` — Serialized labels dictionary for the voice. +**dubbing_id:** `str` — ID of the dubbing project.
@@ -3667,7 +3825,7 @@ typing.Optional[typing.List[core.File]]` — See core.File for more documentatio
-
client.voices.share(...) +
client.dubbing.delete(...)
@@ -3679,7 +3837,7 @@ typing.Optional[typing.List[core.File]]` — See core.File for more documentatio
-Add a shared voice to your collection of Voices +Deletes a dubbing project.
@@ -3699,10 +3857,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.voices.share( - public_user_id="63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca", - voice_id="21m00Tcm4TlvDq8ikWAM", - new_name="John Smith", +client.dubbing.delete( + dubbing_id="dubbing_id", ) ``` @@ -3715,554 +3871,11 @@ client.voices.share(
- -
-
- -**public_user_id:** `str` — Public user ID used to publicly identify ElevenLabs users. - -
-
- -
-
- -**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - -
-
- -
-
- -**new_name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - - -
-
- -
client.voices.get_shared(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a list of shared voices. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.voices.get_shared( - featured=True, - reader_app_enabled=True, -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — How many shared voices to return at maximum. Can not exceed 100, defaults to 30. - -
-
- -
-
- -**category:** `typing.Optional[VoicesGetSharedRequestCategory]` — Voice category used for filtering - -
-
- -
-
- -**gender:** `typing.Optional[str]` — Gender used for filtering - -
-
- -
-
- -**age:** `typing.Optional[str]` — Age used for filtering - -
-
- -
-
- -**accent:** `typing.Optional[str]` — Accent used for filtering - -
-
- -
-
- -**language:** `typing.Optional[str]` — Language used for filtering - -
-
- -
-
- -**locale:** `typing.Optional[str]` — Locale used for filtering - -
-
- -
-
- -**search:** `typing.Optional[str]` — Search term used for filtering - -
-
- -
-
- -**use_cases:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Use-case used for filtering - -
-
- -
-
- -**descriptives:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Search term used for filtering - -
-
- -
-
- -**featured:** `typing.Optional[bool]` — Filter featured voices - -
-
- -
-
- -**min_notice_period_days:** `typing.Optional[int]` — Filter voices with a minimum notice period of the given number of days. - -
-
- -
-
- -**include_custom_rates:** `typing.Optional[bool]` — Include/exclude voices with custom rates - -
-
- -
-
- -**include_live_moderated:** `typing.Optional[bool]` — Include/exclude voices that are live moderated - -
-
- -
-
- -**reader_app_enabled:** `typing.Optional[bool]` — Filter voices that are enabled for the reader app - -
-
- -
-
- -**owner_id:** `typing.Optional[str]` — Filter voices by public owner ID - -
-
- -
-
- -**sort:** `typing.Optional[str]` — Sort criteria - -
-
- -
-
- -**page:** `typing.Optional[int]` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.voices.find_similar_voices(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.voices.find_similar_voices() - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**audio_file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation - -
-
- -
-
- -**similarity_threshold:** `typing.Optional[float]` — Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned. - -
-
- -
-
- -**top_k:** `typing.Optional[int]` — Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -## Studio -
client.studio.create_podcast(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ( - ElevenLabs, - PodcastConversationModeData, - PodcastTextSource, -) -from elevenlabs.studio import ( - BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, -) - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.studio.create_podcast( - model_id="eleven_multilingual_v2", - mode=BodyCreatePodcastV1StudioPodcastsPostMode_Conversation( - conversation=PodcastConversationModeData( - host_voice_id="aw1NgEzBg83R7vgmiJt6", - guest_voice_id="aw1NgEzBg83R7vgmiJt7", - ), - ), - source=PodcastTextSource( - text="This is a test podcast.", - ), -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**model_id:** `str` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. - -
-
- -
-
- -**mode:** `BodyCreatePodcastV1StudioPodcastsPostMode` — The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. - -
-
- -
-
- -**source:** `BodyCreatePodcastV1StudioPodcastsPostSource` — The source content for the Podcast. - -
-
- -
-
- -**quality_preset:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]` - -Output quality of the generated audio. Must be one of: -standard - standard output format, 128kbps with 44.1kHz sample rate. -high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%. -ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%. -ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%. - -
-
- -
-
- -**duration_scale:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]` - -Duration of the generated podcast. Must be one of: -short - produces podcasts shorter than 3 minutes. -default - produces podcasts roughly between 3-7 minutes. -long - produces podcasts longer than 7 minutes. - -
-
- -
-
- -**language:** `typing.Optional[str]` — An optional language of the Studio project. Two-letter language code (ISO 639-1). - -
-
- -
-
- -**intro:** `typing.Optional[str]` — The intro text that will always be added to the beginning of the podcast. - -
-
- -
-
- -**outro:** `typing.Optional[str]` — The outro text that will always be added to the end of the podcast. - -
-
- -
-
- -**instructions_prompt:** `typing.Optional[str]` — Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone. - -
-
- -
-
- -**highlights:** `typing.Optional[typing.Sequence[str]]` — A brief summary or highlights of the Studio project's content, providing key points or themes. This should be between 10 and 70 characters. - -
-
- -
-
- -**callback_url:** `typing.Optional[str]` - - - A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion - Messages: - 1. When project was converted successfully: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "success", - project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", - error_details: None, - } - } - 2. When project conversion failed: - { - type: "project_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - conversion_status: "error", - project_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - - 3. When chapter was converted successfully: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "success", - chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", - error_details: None, - } - } - 4. When chapter conversion failed: - { - type: "chapter_conversion_status", - event_timestamp: 1234567890, - data: { - request_id: "1234567890", - project_id: "21m00Tcm4TlvDq8ikWAM", - chapter_id: "22m00Tcm4TlvDq8ikMAT", - conversion_status: "error", - chapter_snapshot_id: None, - error_details: "Error details if conversion failed" - } - } - + +
+
+ +**dubbing_id:** `str` — ID of the dubbing project.
@@ -4282,8 +3895,8 @@ long - produces podcasts longer than 7 minutes.
-## Dubbing -
client.dubbing.list(...) +## Models +
client.models.list()
@@ -4295,7 +3908,7 @@ long - produces podcasts longer than 7 minutes.
-List the dubs you have access to. +Gets a list of available models.
@@ -4315,7 +3928,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.dubbing.list() +client.models.list() ``` @@ -4331,38 +3944,6 @@ client.dubbing.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — How many dubs to return at maximum. Can not exceed 200, defaults to 100. - -
-
- -
-
- -**dubbing_status:** `typing.Optional[DubbingListRequestDubbingStatus]` — What state the dub is currently in. - -
-
- -
-
- -**filter_by_creator:** `typing.Optional[DubbingListRequestFilterByCreator]` — Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4375,7 +3956,8 @@ client.dubbing.list()
-
client.dubbing.create(...) +## AudioNative +
client.audio_native.create(...)
@@ -4387,7 +3969,7 @@ client.dubbing.list()
-Dubs a provided audio or video file into given language. +Creates Audio Native enabled project, optionally starts conversion and returns project ID and embeddable HTML snippet.
@@ -4407,7 +3989,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.dubbing.create() +client.audio_native.create( + name="name", +) ``` @@ -4423,9 +4007,7 @@ client.dubbing.create()
-**file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**name:** `str` — Project name.
@@ -4433,9 +4015,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**csv_file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**image:** `typing.Optional[str]` — (Deprecated) Image URL used in the player. If not provided, default image set in the Player settings is used.
@@ -4443,9 +4023,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**foreground_audio_file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**author:** `typing.Optional[str]` — Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used.
@@ -4453,9 +4031,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**background_audio_file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**title:** `typing.Optional[str]` — Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used.
@@ -4463,7 +4039,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**name:** `typing.Optional[str]` — Name of the dubbing project. +**small:** `typing.Optional[bool]` — (Deprecated) Whether to use small player or not. If not provided, default value set in the Player settings is used.
@@ -4471,7 +4047,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**source_url:** `typing.Optional[str]` — URL of the source video/audio file. +**text_color:** `typing.Optional[str]` — Text color used in the player. If not provided, default text color set in the Player settings is used.
@@ -4479,7 +4055,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**source_lang:** `typing.Optional[str]` — Source language. +**background_color:** `typing.Optional[str]` — Background color used in the player. If not provided, default background color set in the Player settings is used.
@@ -4487,7 +4063,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**target_lang:** `typing.Optional[str]` — The Target language to dub the content into. +**sessionization:** `typing.Optional[int]` — (Deprecated) Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.
@@ -4495,7 +4071,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**target_accent:** `typing.Optional[str]` — [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. +**voice_id:** `typing.Optional[str]` — Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used.
@@ -4503,7 +4079,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**num_speakers:** `typing.Optional[int]` — Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers +**model_id:** `typing.Optional[str]` — TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used.
@@ -4511,7 +4087,9 @@ typing.Optional[core.File]` — See core.File for more documentation
-**watermark:** `typing.Optional[bool]` — Whether to apply watermark to the output video. +**file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -4519,7 +4097,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**start_time:** `typing.Optional[int]` — Start time of the source video/audio file. +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not.
@@ -4527,23 +4105,69 @@ typing.Optional[core.File]` — See core.File for more documentation
-**end_time:** `typing.Optional[int]` — End time of the source video/audio file. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.audio_native.get_settings(...)
-**highest_resolution:** `typing.Optional[bool]` — Whether to use the highest resolution available. - +#### 📝 Description + +
+
+ +
+
+ +Get player settings for the specific project. +
+
+#### 🔌 Usage +
-**drop_background_audio:** `typing.Optional[bool]` — An advanced setting. Whether to drop background audio from the final dub. This can improve dub quality where it's known that audio shouldn't have a background track such as for speeches or monologues. +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.audio_native.get_settings( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project.
@@ -4551,15 +4175,69 @@ typing.Optional[core.File]` — See core.File for more documentation
-**use_profanity_filter:** `typing.Optional[bool]` — [BETA] Whether transcripts should have profanities censored with the words '[censored]' +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+ +
client.audio_native.update(...) +
+
+ +#### 📝 Description
-**dubbing_studio:** `typing.Optional[bool]` — Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. +
+
+ +Updates content for the specific AudioNative Project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.audio_native.update( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.
@@ -4567,7 +4245,9 @@ typing.Optional[core.File]` — See core.File for more documentation
-**disable_voice_cloning:** `typing.Optional[bool]` — [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. +**file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -4575,7 +4255,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**mode:** `typing.Optional[str]` — automatic or manual. Manual mode is only supported when creating a dubbing studio project +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not.
@@ -4583,7 +4263,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**csv_fps:** `typing.Optional[float]` — Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. +**auto_publish:** `typing.Optional[bool]` — Whether to auto publish the new project snapshot after it's converted.
@@ -4603,7 +4283,8 @@ typing.Optional[core.File]` — See core.File for more documentation
-
client.dubbing.get(...) +## usage +
client.usage.get(...)
@@ -4615,7 +4296,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-Returns metadata about a dubbing project, including whether it's still in progress or not +Returns the usage metrics for the current user or the entire workspace they are part of. The response provides a time axis based on the specified aggregation interval (default: day), with usage values for each interval along that axis. Usage is broken down by the selected breakdown type. For example, breakdown type "voice" will return the usage of each voice for each interval along the time axis.
@@ -4635,25 +4316,74 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.dubbing.get( - dubbing_id="dubbing_id", +client.usage.get( + start_unix=1, + end_unix=1, ) -``` +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**start_unix:** `int` — UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day. + +
+
+ +
+
+ +**end_unix:** `int` — UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day. + +
+
+ +
+
+ +**include_workspace_metrics:** `typing.Optional[bool]` — Whether or not to include the statistics of the entire workspace. + +
+
+ +
+
+ +**breakdown_type:** `typing.Optional[BreakdownTypes]` — How to break down the information. Cannot be "user" if include_workspace_metrics is False. +
+ +
+
+ +**aggregation_interval:** `typing.Optional[UsageAggregationInterval]` — How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". +
-#### ⚙️ Parameters -
+**aggregation_bucket_size:** `typing.Optional[int]` — Aggregation bucket size in seconds. Overrides the aggregation interval. + +
+
+
-**dubbing_id:** `str` — ID of the dubbing project. +**metric:** `typing.Optional[MetricType]` — Which metric to aggregate.
@@ -4673,7 +4403,8 @@ client.dubbing.get(
-
client.dubbing.delete(...) +## PronunciationDictionaries +
client.pronunciation_dictionaries.create_from_file(...)
@@ -4685,7 +4416,7 @@ client.dubbing.get(
-Deletes a dubbing project. +Creates a new pronunciation dictionary from a lexicon .PLS file
@@ -4705,8 +4436,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.dubbing.delete( - dubbing_id="dubbing_id", +client.pronunciation_dictionaries.create_from_file( + name="name", ) ``` @@ -4723,7 +4454,7 @@ client.dubbing.delete(
-**dubbing_id:** `str` — ID of the dubbing project. +**name:** `str` — The name of the pronunciation dictionary, used for identification only.
@@ -4731,64 +4462,29 @@ client.dubbing.delete(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
- +**file:** `from __future__ import annotations +typing.Optional[core.File]` — See core.File for more documentation + -
- -## Models -
client.models.list() -
-
- -#### 📝 Description - -
-
-Gets a list of available models. -
-
+**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only. +
-#### 🔌 Usage - -
-
-
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.models.list() - -``` -
-
+**workspace_access:** `typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. +
-#### ⚙️ Parameters - -
-
-
@@ -4804,8 +4500,7 @@ client.models.list()
-## AudioNative -
client.audio_native.create(...) +
client.pronunciation_dictionaries.create_from_rules(...)
@@ -4817,7 +4512,7 @@ client.models.list()
-Creates Audio Native enabled project, optionally starts conversion and returns project ID and embeddable HTML snippet. +Creates a new pronunciation dictionary from provided rules.
@@ -4833,12 +4528,21 @@ Creates Audio Native enabled project, optionally starts conversion and returns p ```python from elevenlabs import ElevenLabs +from elevenlabs.pronunciation_dictionaries import ( + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, +) client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.audio_native.create( - name="name", +client.pronunciation_dictionaries.create_from_rules( + rules=[ + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias( + string_to_replace="Thailand", + alias="tie-land", + ) + ], + name="My Dictionary", ) ``` @@ -4855,7 +4559,13 @@ client.audio_native.create(
-**name:** `str` — Project name. +**rules:** `typing.Sequence[ + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem +]` + +List of pronunciation rules. Rule can be either: + an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } + or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }
@@ -4863,7 +4573,7 @@ client.audio_native.create(
-**image:** `typing.Optional[str]` — (Deprecated) Image URL used in the player. If not provided, default image set in the Player settings is used. +**name:** `str` — The name of the pronunciation dictionary, used for identification only.
@@ -4871,7 +4581,7 @@ client.audio_native.create(
-**author:** `typing.Optional[str]` — Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used. +**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only.
@@ -4879,7 +4589,9 @@ client.audio_native.create(
-**title:** `typing.Optional[str]` — Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used. +**workspace_access:** `typing.Optional[ + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess +]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.
@@ -4887,65 +4599,69 @@ client.audio_native.create(
-**small:** `typing.Optional[bool]` — (Deprecated) Whether to use small player or not. If not provided, default value set in the Player settings is used. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**text_color:** `typing.Optional[str]` — Text color used in the player. If not provided, default text color set in the Player settings is used. -
+
+
client.pronunciation_dictionaries.get(...)
-**background_color:** `typing.Optional[str]` — Background color used in the player. If not provided, default background color set in the Player settings is used. - -
-
+#### 📝 Description
-**sessionization:** `typing.Optional[int]` — (Deprecated) Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used. - -
-
-
-**voice_id:** `typing.Optional[str]` — Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used. - +Get metadata for a pronunciation dictionary +
+
+#### 🔌 Usage +
-**model_id:** `typing.Optional[str]` — TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used. - -
-
-
-**file:** `from __future__ import annotations +```python +from elevenlabs import ElevenLabs -typing.Optional[core.File]` — See core.File for more documentation - +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.pronunciation_dictionaries.get( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+#### ⚙️ Parameters +
-**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not. +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary
@@ -4965,7 +4681,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-
client.audio_native.get_settings(...) +
client.pronunciation_dictionaries.update(...)
@@ -4977,7 +4693,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-Get player settings for the specific project. +Partially update the pronunciation dictionary without changing the version
@@ -4997,8 +4713,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.audio_native.get_settings( - project_id="21m00Tcm4TlvDq8ikWAM", +client.pronunciation_dictionaries.update( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", ) ``` @@ -5015,7 +4731,23 @@ client.audio_native.get_settings(
-**project_id:** `str` — The ID of the Studio project. +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**archived:** `typing.Optional[bool]` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name of the pronunciation dictionary, used for identification only.
@@ -5035,7 +4767,7 @@ client.audio_native.get_settings(
-
client.audio_native.update(...) +
client.pronunciation_dictionaries.list(...)
@@ -5047,7 +4779,7 @@ client.audio_native.get_settings(
-Updates content for the specific AudioNative Project. +Get a list of the pronunciation dictionaries you have access to and their metadata
@@ -5067,9 +4799,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.audio_native.update( - project_id="21m00Tcm4TlvDq8ikWAM", -) +client.pronunciation_dictionaries.list() ``` @@ -5085,7 +4815,7 @@ client.audio_native.update(
-**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
@@ -5093,9 +4823,7 @@ client.audio_native.update(
-**file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**page_size:** `typing.Optional[int]` — How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30.
@@ -5103,7 +4831,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not. +**sort:** `typing.Optional[PronunciationDictionariesListRequestSort]` — Which field to sort by, one of 'created_at_unix' or 'name'.
@@ -5111,7 +4839,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**auto_publish:** `typing.Optional[bool]` — Whether to auto publish the new project snapshot after it's converted. +**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'ascending' or 'descending'.
@@ -5131,8 +4859,8 @@ typing.Optional[core.File]` — See core.File for more documentation
-## usage -
client.usage.get(...) +## ServiceAccounts +
client.service_accounts.list()
@@ -5144,7 +4872,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-Returns the usage metrics for the current user or the entire workspace they are part of. The response provides a time axis based on the specified aggregation interval (default: day), with usage values for each interval along that axis. Usage is broken down by the selected breakdown type. For example, breakdown type "voice" will return the usage of each voice for each interval along the time axis. +List all service accounts in the workspace
@@ -5164,10 +4892,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.usage.get( - start_unix=1, - end_unix=1, -) +client.service_accounts.list() ``` @@ -5183,55 +4908,70 @@ client.usage.get(
-**start_unix:** `int` — UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**end_unix:** `int` — UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day. -
+
+ +## Webhooks +
client.webhooks.list(...) +
+
+ +#### 📝 Description
-**include_workspace_metrics:** `typing.Optional[bool]` — Whether or not to include the statistics of the entire workspace. - +
+
+ +List all webhooks for a workspace +
+
+#### 🔌 Usage + +
+
+
-**breakdown_type:** `typing.Optional[BreakdownTypes]` — How to break down the information. Cannot be "user" if include_workspace_metrics is False. - +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.webhooks.list( + include_usages=False, +) + +```
- -
-
- -**aggregation_interval:** `typing.Optional[UsageAggregationInterval]` — How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". -
+#### ⚙️ Parameters +
-**aggregation_bucket_size:** `typing.Optional[int]` — Aggregation bucket size in seconds. Overrides the aggregation interval. - -
-
-
-**metric:** `typing.Optional[MetricType]` — Which metric to aggregate. +**include_usages:** `typing.Optional[bool]` — Whether to include active usages of the webhook, only usable by admins
@@ -5251,8 +4991,8 @@ client.usage.get(
-## PronunciationDictionaries -
client.pronunciation_dictionaries.create_from_file(...) +## SpeechToText +
client.speech_to_text.convert(...)
@@ -5264,7 +5004,7 @@ client.usage.get(
-Creates a new pronunciation dictionary from a lexicon .PLS file +Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking.
@@ -5284,8 +5024,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.pronunciation_dictionaries.create_from_file( - name="name", +client.speech_to_text.convert( + model_id="model_id", ) ``` @@ -5302,7 +5042,15 @@ client.pronunciation_dictionaries.create_from_file(
-**name:** `str` — The name of the pronunciation dictionary, used for identification only. +**model_id:** `str` — The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
@@ -5320,7 +5068,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only. +**language_code:** `typing.Optional[str]` — An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically.
@@ -5328,7 +5076,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**workspace_access:** `typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. +**tag_audio_events:** `typing.Optional[bool]` — Whether to tag audio events like (laughter), (footsteps), etc. in the transcription.
@@ -5336,84 +5084,79 @@ typing.Optional[core.File]` — See core.File for more documentation
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**num_speakers:** `typing.Optional[int]` — The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32. Defaults to null, in this case the amount of speakers is set to the maximum value the model supports.
- -
+
+
+**timestamps_granularity:** `typing.Optional[SpeechToTextConvertRequestTimestampsGranularity]` — The granularity of the timestamps in the transcription. 'word' provides word-level timestamps and 'character' provides character-level timestamps per word. +
-
-
client.pronunciation_dictionaries.create_from_rules(...)
-#### 📝 Description +**diarize:** `typing.Optional[bool]` — Whether to annotate which speaker is currently talking in the uploaded file. + +
+
+**diarization_threshold:** `typing.Optional[float]` — Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually). + +
+
+
-Creates a new pronunciation dictionary from provided rules. -
-
+**additional_formats:** `typing.Optional[AdditionalFormats]` — A list of additional formats to export the transcript to. + -#### 🔌 Usage -
+**file_format:** `typing.Optional[SpeechToTextConvertRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+
-```python -from elevenlabs import ElevenLabs -from elevenlabs.pronunciation_dictionaries import ( - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, -) - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.pronunciation_dictionaries.create_from_rules( - rules=[ - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias( - string_to_replace="Thailand", - alias="tie-land", - ) - ], - name="My Dictionary", -) - -``` +**cloud_storage_url:** `typing.Optional[str]` — The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. +
+ +
+
+ +**webhook:** `typing.Optional[bool]` — Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. +
-#### ⚙️ Parameters -
+**webhook_id:** `typing.Optional[str]` — Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks. + +
+
+
-**rules:** `typing.Sequence[ - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem -]` - -List of pronunciation rules. Rule can be either: - an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } - or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' } +**temperature:** `typing.Optional[float]` — Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0.
@@ -5421,7 +5164,7 @@ List of pronunciation rules. Rule can be either:
-**name:** `str` — The name of the pronunciation dictionary, used for identification only. +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647.
@@ -5429,7 +5172,7 @@ List of pronunciation rules. Rule can be either:
-**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only. +**use_multi_channel:** `typing.Optional[bool]` — Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported.
@@ -5437,9 +5180,7 @@ List of pronunciation rules. Rule can be either:
-**workspace_access:** `typing.Optional[ - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess -]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. +**webhook_metadata:** `typing.Optional[SpeechToTextConvertRequestWebhookMetadata]` — Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information.
@@ -5459,7 +5200,8 @@ List of pronunciation rules. Rule can be either:
-
client.pronunciation_dictionaries.get(...) +## ForcedAlignment +
client.forced_alignment.create(...)
@@ -5471,7 +5213,7 @@ List of pronunciation rules. Rule can be either:
-Get metadata for a pronunciation dictionary +Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript.
@@ -5491,8 +5233,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.pronunciation_dictionaries.get( - pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", +client.forced_alignment.create( + text="text", ) ``` @@ -5509,7 +5251,25 @@ client.pronunciation_dictionaries.get(
-**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary +**file:** `from __future__ import annotations + +core.File` — See core.File for more documentation + +
+
+ +
+
+ +**text:** `str` — The text to align with the audio. The input text can be in any format, however diarization is not supported at this time. + +
+
+ +
+
+ +**enabled_spooled_file:** `typing.Optional[bool]` — If true, the file will be streamed to the server and processed in chunks. This is useful for large files that cannot be loaded into memory. The default is false.
@@ -5529,7 +5289,8 @@ client.pronunciation_dictionaries.get(
-
client.pronunciation_dictionaries.update(...) +## ConversationalAi +
client.conversational_ai.add_to_knowledge_base(...)
@@ -5541,7 +5302,7 @@ client.pronunciation_dictionaries.get(
-Partially update the pronunciation dictionary without changing the version +Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update).
@@ -5561,9 +5322,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.pronunciation_dictionaries.update( - pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", -) +client.conversational_ai.add_to_knowledge_base() ``` @@ -5579,7 +5338,7 @@ client.pronunciation_dictionaries.update(
-**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary +**agent_id:** `typing.Optional[str]`
@@ -5587,7 +5346,7 @@ client.pronunciation_dictionaries.update(
-**archived:** `typing.Optional[bool]` — The name of the pronunciation dictionary, used for identification only. +**name:** `typing.Optional[str]` — A custom, human-readable name for the document.
@@ -5595,7 +5354,17 @@ client.pronunciation_dictionaries.update(
-**name:** `typing.Optional[str]` — The name of the pronunciation dictionary, used for identification only. +**url:** `typing.Optional[str]` — URL to a page of documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -5615,7 +5384,7 @@ client.pronunciation_dictionaries.update(
-
client.pronunciation_dictionaries.list(...) +
client.conversational_ai.get_document_rag_indexes(...)
@@ -5627,7 +5396,7 @@ client.pronunciation_dictionaries.update(
-Get a list of the pronunciation dictionaries you have access to and their metadata +Provides information about all RAG indexes of the specified knowledgebase document.
@@ -5647,7 +5416,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.pronunciation_dictionaries.list() +client.conversational_ai.get_document_rag_indexes( + documentation_id="21m00Tcm4TlvDq8ikWAM", +) ``` @@ -5663,31 +5434,7 @@ client.pronunciation_dictionaries.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30. - -
-
- -
-
- -**sort:** `typing.Optional[PronunciationDictionariesListRequestSort]` — Which field to sort by, one of 'created_at_unix' or 'name'. - -
-
- -
-
- -**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'ascending' or 'descending'. +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition.
@@ -5707,8 +5454,7 @@ client.pronunciation_dictionaries.list()
-## ServiceAccounts -
client.service_accounts.list() +
client.conversational_ai.delete_document_rag_index(...)
@@ -5720,7 +5466,7 @@ client.pronunciation_dictionaries.list()
-List all service accounts in the workspace +Delete RAG index for the knowledgebase document.
@@ -5740,7 +5486,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.service_accounts.list() +client.conversational_ai.delete_document_rag_index( + documentation_id="21m00Tcm4TlvDq8ikWAM", + rag_index_id="21m00Tcm4TlvDq8ikWAM", +) ``` @@ -5756,6 +5505,22 @@ client.service_accounts.list()
+**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**rag_index_id:** `str` — The id of RAG index of document from the knowledge base. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -5768,8 +5533,7 @@ client.service_accounts.list()
-## Webhooks -
client.webhooks.list(...) +
client.conversational_ai.rag_index_overview()
@@ -5781,7 +5545,7 @@ client.service_accounts.list()
-List all webhooks for a workspace +Provides total size and other information of RAG indexes used by knowledgebase documents
@@ -5801,9 +5565,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.webhooks.list( - include_usages=False, -) +client.conversational_ai.rag_index_overview() ``` @@ -5811,19 +5573,11 @@ client.webhooks.list(
-#### ⚙️ Parameters - -
-
+#### ⚙️ Parameters
-**include_usages:** `typing.Optional[bool]` — Whether to include active usages of the webhook, only usable by admins - -
-
-
@@ -5839,8 +5593,7 @@ client.webhooks.list(
-## SpeechToText -
client.speech_to_text.convert(...) +
client.conversational_ai.update_secret(...)
@@ -5852,7 +5605,7 @@ client.webhooks.list(
-Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. +Update an existing secret for the workspace
@@ -5872,8 +5625,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.speech_to_text.convert( - model_id="model_id", +client.conversational_ai.update_secret( + secret_id="secret_id", + name="name", + value="value", ) ``` @@ -5890,7 +5645,7 @@ client.speech_to_text.convert(
-**model_id:** `str` — The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. +**secret_id:** `str`
@@ -5898,7 +5653,7 @@ client.speech_to_text.convert(
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +**name:** `str`
@@ -5906,9 +5661,7 @@ client.speech_to_text.convert(
-**file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**value:** `str`
@@ -5916,119 +5669,71 @@ typing.Optional[core.File]` — See core.File for more documentation
-**language_code:** `typing.Optional[str]` — An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**tag_audio_events:** `typing.Optional[bool]` — Whether to tag audio events like (laughter), (footsteps), etc. in the transcription. -
-
-
-**num_speakers:** `typing.Optional[int]` — The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32. Defaults to null, in this case the amount of speakers is set to the maximum value the model supports. -
+
+## Music +## ConversationalAi Conversations +
client.conversational_ai.conversations.get_signed_url(...)
-**timestamps_granularity:** `typing.Optional[SpeechToTextConvertRequestTimestampsGranularity]` — The granularity of the timestamps in the transcription. 'word' provides word-level timestamps and 'character' provides character-level timestamps per word. - -
-
+#### 📝 Description
-**diarize:** `typing.Optional[bool]` — Whether to annotate which speaker is currently talking in the uploaded file. - -
-
-
-**diarization_threshold:** `typing.Optional[float]` — Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually). - +Get a signed url to start a conversation with an agent with an agent that requires authorization
- -
-
- -**additional_formats:** `typing.Optional[AdditionalFormats]` — A list of additional formats to export the transcript to. -
-
-
- -**file_format:** `typing.Optional[SpeechToTextConvertRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. - -
-
+#### 🔌 Usage
-**cloud_storage_url:** `typing.Optional[str]` — The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. - -
-
-
-**webhook:** `typing.Optional[bool]` — Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. - -
-
+```python +from elevenlabs import ElevenLabs -
-
+client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.conversations.get_signed_url( + agent_id="21m00Tcm4TlvDq8ikWAM", +) -**webhook_id:** `typing.Optional[str]` — Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks. - +```
- -
-
- -**temperature:** `typing.Optional[float]` — Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. -
-
-
- -**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. - -
-
+#### ⚙️ Parameters
-**use_multi_channel:** `typing.Optional[bool]` — Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. - -
-
-
-**webhook_metadata:** `typing.Optional[SpeechToTextConvertRequestWebhookMetadata]` — Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. +**agent_id:** `str` — The id of the agent you're taking the action on.
@@ -6048,8 +5753,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-## ForcedAlignment -
client.forced_alignment.create(...) +
client.conversational_ai.conversations.get_webrtc_token(...)
@@ -6061,7 +5765,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript. +Get a WebRTC session token for real-time communication.
@@ -6081,8 +5785,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.forced_alignment.create( - text="text", +client.conversational_ai.conversations.get_webrtc_token( + agent_id="21m00Tcm4TlvDq8ikWAM", ) ``` @@ -6099,17 +5803,7 @@ client.forced_alignment.create(
-**file:** `from __future__ import annotations - -core.File` — See core.File for more documentation - -
-
- -
-
- -**text:** `str` — The text to align with the audio. The input text can be in any format, however diarization is not supported at this time. +**agent_id:** `str` — The id of the agent you're taking the action on.
@@ -6117,7 +5811,7 @@ core.File` — See core.File for more documentation
-**enabled_spooled_file:** `typing.Optional[bool]` — If true, the file will be streamed to the server and processed in chunks. This is useful for large files that cannot be loaded into memory. The default is false. +**participant_name:** `typing.Optional[str]` — Optional custom participant name. If not provided, user ID will be used
@@ -6137,8 +5831,7 @@ core.File` — See core.File for more documentation
-## ConversationalAi -
client.conversational_ai.add_to_knowledge_base(...) +
client.conversational_ai.conversations.list(...)
@@ -6150,7 +5843,7 @@ core.File` — See core.File for more documentation
-Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). +Get all conversations of agents that user owns. With option to restrict to a specific agent.
@@ -6170,7 +5863,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.add_to_knowledge_base() +client.conversational_ai.conversations.list() ``` @@ -6186,7 +5879,7 @@ client.conversational_ai.add_to_knowledge_base()
-**agent_id:** `typing.Optional[str]` +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
@@ -6194,7 +5887,7 @@ client.conversational_ai.add_to_knowledge_base()
-**name:** `typing.Optional[str]` — A custom, human-readable name for the document. +**agent_id:** `typing.Optional[str]` — The id of the agent you're taking the action on.
@@ -6202,7 +5895,7 @@ client.conversational_ai.add_to_knowledge_base()
-**url:** `typing.Optional[str]` — URL to a page of documentation that the agent will have access to in order to interact with users. +**call_successful:** `typing.Optional[EvaluationSuccessResult]` — The result of the success evaluation
@@ -6210,9 +5903,39 @@ client.conversational_ai.add_to_knowledge_base()
-**file:** `from __future__ import annotations +**call_start_before_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations up to this start date. + +
+
-typing.Optional[core.File]` — See core.File for more documentation +
+
+ +**call_start_after_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations after to this start date. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — Filter conversations by the user ID who initiated them. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many conversations to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**summary_mode:** `typing.Optional[ConversationsListRequestSummaryMode]` — Whether to include transcript summaries in the response.
@@ -6232,7 +5955,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-
client.conversational_ai.get_document_rag_indexes(...) +
client.conversational_ai.conversations.get(...)
@@ -6244,7 +5967,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-Provides information about all RAG indexes of the specified knowledgebase document. +Get the details of a particular conversation
@@ -6264,8 +5987,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.get_document_rag_indexes( - documentation_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.conversations.get( + conversation_id="123", ) ``` @@ -6282,7 +6005,7 @@ client.conversational_ai.get_document_rag_indexes(
-**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. +**conversation_id:** `str` — The id of the conversation you're taking the action on.
@@ -6302,7 +6025,7 @@ client.conversational_ai.get_document_rag_indexes(
-
client.conversational_ai.delete_document_rag_index(...) +
client.conversational_ai.conversations.delete(...)
@@ -6314,7 +6037,7 @@ client.conversational_ai.get_document_rag_indexes(
-Delete RAG index for the knowledgebase document. +Delete a particular conversation
@@ -6334,9 +6057,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.delete_document_rag_index( - documentation_id="21m00Tcm4TlvDq8ikWAM", - rag_index_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.conversations.delete( + conversation_id="21m00Tcm4TlvDq8ikWAM", ) ``` @@ -6353,15 +6075,7 @@ client.conversational_ai.delete_document_rag_index(
-**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. - -
-
- -
-
- -**rag_index_id:** `str` — The id of RAG index of document from the knowledge base. +**conversation_id:** `str` — The id of the conversation you're taking the action on.
@@ -6381,7 +6095,8 @@ client.conversational_ai.delete_document_rag_index(
-
client.conversational_ai.rag_index_overview() +## ConversationalAi Twilio +
client.conversational_ai.twilio.outbound_call(...)
@@ -6393,7 +6108,7 @@ client.conversational_ai.delete_document_rag_index(
-Provides total size and other information of RAG indexes used by knowledgebase documents +Handle an outbound call via Twilio
@@ -6407,25 +6122,61 @@ Provides total size and other information of RAG indexes used by knowledgebase d
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.rag_index_overview() - -``` -
-
+```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.twilio.outbound_call( + agent_id="agent_id", + agent_phone_number_id="agent_phone_number_id", + to_number="to_number", +) + +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**agent_phone_number_id:** `str` + +
+
+ +
+
+ +**to_number:** `str` +
-#### ⚙️ Parameters -
+**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+
@@ -6441,7 +6192,8 @@ client.conversational_ai.rag_index_overview()
-
client.conversational_ai.update_secret(...) +## ConversationalAi Agents +
client.conversational_ai.agents.create(...)
@@ -6453,7 +6205,7 @@ client.conversational_ai.rag_index_overview()
-Update an existing secret for the workspace +Create an agent from a config object
@@ -6468,15 +6220,13 @@ Update an existing secret for the workspace
```python -from elevenlabs import ElevenLabs +from elevenlabs import ConversationalConfig, ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.update_secret( - secret_id="secret_id", - name="name", - value="value", +client.conversational_ai.agents.create( + conversation_config=ConversationalConfig(), ) ``` @@ -6493,7 +6243,7 @@ client.conversational_ai.update_secret(
-**secret_id:** `str` +**conversation_config:** `ConversationalConfig` — Conversation configuration for an agent
@@ -6501,7 +6251,7 @@ client.conversational_ai.update_secret(
-**name:** `str` +**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content.
@@ -6509,7 +6259,23 @@ client.conversational_ai.update_secret(
-**value:** `str` +**workflow:** `typing.Optional[typing.Optional[typing.Any]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A name to make the agent easier to find + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.Sequence[str]]` — Tags to help classify and filter the agent
@@ -6529,9 +6295,7 @@ client.conversational_ai.update_secret(
-## Music -## ConversationalAi Conversations -
client.conversational_ai.conversations.get_signed_url(...) +
client.conversational_ai.agents.get(...)
@@ -6543,7 +6307,7 @@ client.conversational_ai.update_secret(
-Get a signed url to start a conversation with an agent with an agent that requires authorization +Retrieve config for an agent
@@ -6563,7 +6327,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.get_signed_url( +client.conversational_ai.agents.get( agent_id="21m00Tcm4TlvDq8ikWAM", ) @@ -6581,7 +6345,7 @@ client.conversational_ai.conversations.get_signed_url(
-**agent_id:** `str` — The id of the agent you're taking the action on. +**agent_id:** `str` — The id of an agent. This is returned on agent creation.
@@ -6601,7 +6365,7 @@ client.conversational_ai.conversations.get_signed_url(
-
client.conversational_ai.conversations.get_webrtc_token(...) +
client.conversational_ai.agents.delete(...)
@@ -6613,7 +6377,7 @@ client.conversational_ai.conversations.get_signed_url(
-Get a WebRTC session token for real-time communication. +Delete an agent
@@ -6633,7 +6397,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.get_webrtc_token( +client.conversational_ai.agents.delete( agent_id="21m00Tcm4TlvDq8ikWAM", ) @@ -6651,15 +6415,7 @@ client.conversational_ai.conversations.get_webrtc_token(
-**agent_id:** `str` — The id of the agent you're taking the action on. - -
-
- -
-
- -**participant_name:** `typing.Optional[str]` — Optional custom participant name. If not provided, user ID will be used +**agent_id:** `str` — The id of an agent. This is returned on agent creation.
@@ -6679,7 +6435,7 @@ client.conversational_ai.conversations.get_webrtc_token(
-
client.conversational_ai.conversations.list(...) +
client.conversational_ai.agents.update(...)
@@ -6691,7 +6447,7 @@ client.conversational_ai.conversations.get_webrtc_token(
-Get all conversations of agents that user owns. With option to restrict to a specific agent. +Patches an Agent settings
@@ -6711,7 +6467,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.list() +client.conversational_ai.agents.update( + agent_id="21m00Tcm4TlvDq8ikWAM", +) ``` @@ -6727,7 +6485,7 @@ client.conversational_ai.conversations.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. +**agent_id:** `str` — The id of an agent. This is returned on agent creation.
@@ -6735,7 +6493,7 @@ client.conversational_ai.conversations.list()
-**agent_id:** `typing.Optional[str]` — The id of the agent you're taking the action on. +**conversation_config:** `typing.Optional[ConversationalConfig]` — Conversation configuration for an agent
@@ -6743,7 +6501,7 @@ client.conversational_ai.conversations.list()
-**call_successful:** `typing.Optional[EvaluationSuccessResult]` — The result of the success evaluation +**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content.
@@ -6751,7 +6509,7 @@ client.conversational_ai.conversations.list()
-**call_start_before_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations up to this start date. +**workflow:** `typing.Optional[typing.Optional[typing.Any]]`
@@ -6759,7 +6517,7 @@ client.conversational_ai.conversations.list()
-**call_start_after_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations after to this start date. +**name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -6767,7 +6525,7 @@ client.conversational_ai.conversations.list()
-**user_id:** `typing.Optional[str]` — Filter conversations by the user ID who initiated them. +**tags:** `typing.Optional[typing.Sequence[str]]` — Tags to help classify and filter the agent
@@ -6775,15 +6533,83 @@ client.conversational_ai.conversations.list()
-**page_size:** `typing.Optional[int]` — How many conversations to return at maximum. Can not exceed 100, defaults to 30. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+ +
client.conversational_ai.agents.list(...) +
+
+ +#### 📝 Description
-**summary_mode:** `typing.Optional[ConversationsListRequestSummaryMode]` — Whether to include transcript summaries in the response. +
+
+ +Returns a list of your agents and their metadata. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.agents.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Agents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search by agents name.
@@ -6803,7 +6629,7 @@ client.conversational_ai.conversations.list()
-
client.conversational_ai.conversations.get(...) +
client.conversational_ai.agents.duplicate(...)
@@ -6815,7 +6641,7 @@ client.conversational_ai.conversations.list()
-Get the details of a particular conversation +Create a new agent by duplicating an existing one
@@ -6835,8 +6661,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.get( - conversation_id="123", +client.conversational_ai.agents.duplicate( + agent_id="21m00Tcm4TlvDq8ikWAM", ) ``` @@ -6853,7 +6679,15 @@ client.conversational_ai.conversations.get(
-**conversation_id:** `str` — The id of the conversation you're taking the action on. +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A name to make the agent easier to find
@@ -6873,7 +6707,7 @@ client.conversational_ai.conversations.get(
-
client.conversational_ai.conversations.delete(...) +
client.conversational_ai.agents.simulate_conversation(...)
@@ -6885,7 +6719,7 @@ client.conversational_ai.conversations.get(
-Delete a particular conversation +Run a conversation between the agent and a simulated user.
@@ -6900,13 +6734,23 @@ Delete a particular conversation
```python -from elevenlabs import ElevenLabs +from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, +) client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.delete( - conversation_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.agents.simulate_conversation( + agent_id="21m00Tcm4TlvDq8ikWAM", + simulation_specification=ConversationSimulationSpecification( + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), + ), ) ``` @@ -6923,7 +6767,31 @@ client.conversational_ai.conversations.delete(
-**conversation_id:** `str` — The id of the conversation you're taking the action on. +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated + +
+
+ +
+
+ +**extra_evaluation_criteria:** `typing.Optional[typing.Sequence[PromptEvaluationCriteria]]` — A list of evaluation criteria to test + +
+
+ +
+
+ +**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation
@@ -6943,8 +6811,7 @@ client.conversational_ai.conversations.delete(
-## ConversationalAi Twilio -
client.conversational_ai.twilio.outbound_call(...) +
client.conversational_ai.agents.simulate_conversation_stream(...)
@@ -6956,7 +6823,7 @@ client.conversational_ai.conversations.delete(
-Handle an outbound call via Twilio +Run a conversation between the agent and a simulated user and stream back the response. Response is streamed back as partial lists of messages that should be concatenated and once the conversation has complete a single final message with the conversation analysis will be sent.
@@ -6971,15 +6838,23 @@ Handle an outbound call via Twilio
```python -from elevenlabs import ElevenLabs +from elevenlabs import ( + AgentConfig, + ConversationSimulationSpecification, + ElevenLabs, +) client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.twilio.outbound_call( - agent_id="agent_id", - agent_phone_number_id="agent_phone_number_id", - to_number="to_number", +client.conversational_ai.agents.simulate_conversation_stream( + agent_id="21m00Tcm4TlvDq8ikWAM", + simulation_specification=ConversationSimulationSpecification( + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + ), + ), ) ``` @@ -6996,7 +6871,7 @@ client.conversational_ai.twilio.outbound_call(
-**agent_id:** `str` +**agent_id:** `str` — The id of an agent. This is returned on agent creation.
@@ -7004,7 +6879,7 @@ client.conversational_ai.twilio.outbound_call(
-**agent_phone_number_id:** `str` +**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated
@@ -7012,7 +6887,7 @@ client.conversational_ai.twilio.outbound_call(
-**to_number:** `str` +**extra_evaluation_criteria:** `typing.Optional[typing.Sequence[PromptEvaluationCriteria]]` — A list of evaluation criteria to test
@@ -7020,7 +6895,7 @@ client.conversational_ai.twilio.outbound_call(
-**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` +**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation
@@ -7040,8 +6915,7 @@ client.conversational_ai.twilio.outbound_call(
-## ConversationalAi Agents -
client.conversational_ai.agents.create(...) +
client.conversational_ai.agents.run_tests(...)
@@ -7053,7 +6927,7 @@ client.conversational_ai.twilio.outbound_call(
-Create an agent from a config object +Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration.
@@ -7068,13 +6942,18 @@ Create an agent from a config object
```python -from elevenlabs import ConversationalConfig, ElevenLabs +from elevenlabs import ElevenLabs, SingleTestRunRequestModel client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.create( - conversation_config=ConversationalConfig(), +client.conversational_ai.agents.run_tests( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], ) ``` @@ -7091,23 +6970,7 @@ client.conversational_ai.agents.create(
-**conversation_config:** `ConversationalConfig` — Conversation configuration for an agent - -
-
- -
-
- -**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - -
-
- -
-
- -**workflow:** `typing.Optional[typing.Optional[typing.Any]]` +**agent_id:** `str` — The id of an agent. This is returned on agent creation.
@@ -7115,7 +6978,7 @@ client.conversational_ai.agents.create(
-**name:** `typing.Optional[str]` — A name to make the agent easier to find +**tests:** `typing.Sequence[SingleTestRunRequestModel]` — List of tests to run on the agent
@@ -7123,7 +6986,7 @@ client.conversational_ai.agents.create(
-**tags:** `typing.Optional[typing.Sequence[str]]` — Tags to help classify and filter the agent +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used.
@@ -7143,7 +7006,8 @@ client.conversational_ai.agents.create(
-
client.conversational_ai.agents.get(...) +## ConversationalAi Tests +
client.conversational_ai.tests.create(...)
@@ -7155,7 +7019,7 @@ client.conversational_ai.agents.create(
-Retrieve config for an agent +Creates a new agent response test.
@@ -7170,13 +7034,35 @@ Retrieve config for an agent
```python -from elevenlabs import ElevenLabs +from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, +) client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.get( - agent_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.tests.create( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", ) ``` @@ -7193,7 +7079,7 @@ client.conversational_ai.agents.get(
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. +**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]`
@@ -7201,69 +7087,51 @@ client.conversational_ai.agents.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False.
-
-
+
+
+**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful +
-
-
client.conversational_ai.agents.delete(...)
-#### 📝 Description - -
-
+**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures + +
+
-Delete an agent -
-
+**name:** `str` +
-#### 🔌 Usage - -
-
-
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.agents.delete( - agent_id="21m00Tcm4TlvDq8ikWAM", -) - -``` -
-
+**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. +
-#### ⚙️ Parameters - -
-
-
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. +**dynamic_variables:** `typing.Optional[ + typing.Dict[ + str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue] + ] +]` — Dynamic variables to replace in the agent config during testing
@@ -7283,7 +7151,7 @@ client.conversational_ai.agents.delete(
-
client.conversational_ai.agents.update(...) +
client.conversational_ai.tests.get(...)
@@ -7295,7 +7163,7 @@ client.conversational_ai.agents.delete(
-Patches an Agent settings +Gets an agent response test by ID.
@@ -7315,8 +7183,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.update( - agent_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.tests.get( + test_id="TeaqRRdTcIfIu2i7BYfT", ) ``` @@ -7333,7 +7201,7 @@ client.conversational_ai.agents.update(
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. +**test_id:** `str` — The id of a chat response test. This is returned on test creation.
@@ -7341,77 +7209,84 @@ client.conversational_ai.agents.update(
-**conversation_config:** `typing.Optional[ConversationalConfig]` — Conversation configuration for an agent +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. -
-
-
-**workflow:** `typing.Optional[typing.Optional[typing.Any]]` -
+
+
client.conversational_ai.tests.update(...)
-**name:** `typing.Optional[str]` — A name to make the agent easier to find - -
-
+#### 📝 Description
-**tags:** `typing.Optional[typing.Sequence[str]]` — Tags to help classify and filter the agent - -
-
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - +Updates an agent response test by ID.
+#### 🔌 Usage - - -
- -
client.conversational_ai.agents.list(...)
-#### 📝 Description -
-
-
+```python +from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, +) -Returns a list of your agents and their metadata. +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.tests.update( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", +) + +```
-#### 🔌 Usage +#### ⚙️ Parameters
@@ -7419,29 +7294,47 @@ Returns a list of your agents and their metadata.
-```python -from elevenlabs import ElevenLabs +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
-client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.agents.list() +
+
-``` +**chat_history:** `typing.Sequence[ConversationHistoryTranscriptCommonModelInput]` +
+ +
+
+ +**success_condition:** `str` — A prompt that evaluates whether the agent's response is successful. Should return True or False. +
-#### ⚙️ Parameters +
+
+ +**success_examples:** `typing.Sequence[AgentSuccessfulResponseExample]` — Non-empty list of example responses that should be considered successful + +
+
+**failure_examples:** `typing.Sequence[AgentFailureResponseExample]` — Non-empty list of example responses that should be considered failures + +
+
+
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. +**name:** `str`
@@ -7449,7 +7342,7 @@ client.conversational_ai.agents.list()
-**page_size:** `typing.Optional[int]` — How many Agents to return at maximum. Can not exceed 100, defaults to 30. +**tool_call_parameters:** `typing.Optional[UnitTestToolCallEvaluationModelInput]` — How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated.
@@ -7457,7 +7350,11 @@ client.conversational_ai.agents.list()
-**search:** `typing.Optional[str]` — Search by agents name. +**dynamic_variables:** `typing.Optional[ + typing.Dict[ + str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue] + ] +]` — Dynamic variables to replace in the agent config during testing
@@ -7477,7 +7374,7 @@ client.conversational_ai.agents.list()
-
client.conversational_ai.agents.duplicate(...) +
client.conversational_ai.tests.delete(...)
@@ -7489,7 +7386,7 @@ client.conversational_ai.agents.list()
-Create a new agent by duplicating an existing one +Deletes an agent response test by ID.
@@ -7509,8 +7406,8 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.duplicate( - agent_id="21m00Tcm4TlvDq8ikWAM", +client.conversational_ai.tests.delete( + test_id="TeaqRRdTcIfIu2i7BYfT", ) ``` @@ -7527,15 +7424,7 @@ client.conversational_ai.agents.duplicate(
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. - -
-
- -
-
- -**name:** `typing.Optional[str]` — A name to make the agent easier to find +**test_id:** `str` — The id of a chat response test. This is returned on test creation.
@@ -7555,7 +7444,7 @@ client.conversational_ai.agents.duplicate(
-
client.conversational_ai.agents.simulate_conversation(...) +
client.conversational_ai.tests.summaries(...)
@@ -7567,7 +7456,7 @@ client.conversational_ai.agents.duplicate(
-Run a conversation between the agent and a simulated user. +Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries.
@@ -7582,23 +7471,13 @@ Run a conversation between the agent and a simulated user.
```python -from elevenlabs import ( - AgentConfig, - ConversationSimulationSpecification, - ElevenLabs, -) +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.simulate_conversation( - agent_id="21m00Tcm4TlvDq8ikWAM", - simulation_specification=ConversationSimulationSpecification( - simulated_user_config=AgentConfig( - first_message="Hello, how can I help you today?", - language="en", - ), - ), +client.conversational_ai.tests.summaries( + test_ids=["test_id_1", "test_id_2"], ) ``` @@ -7615,31 +7494,7 @@ client.conversational_ai.agents.simulate_conversation(
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. - -
-
- -
-
- -**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated - -
-
- -
-
- -**extra_evaluation_criteria:** `typing.Optional[typing.Sequence[PromptEvaluationCriteria]]` — A list of evaluation criteria to test - -
-
- -
-
- -**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation +**test_ids:** `typing.Sequence[str]` — List of test IDs to fetch. No duplicates allowed.
@@ -7659,7 +7514,7 @@ client.conversational_ai.agents.simulate_conversation(
-
client.conversational_ai.agents.simulate_conversation_stream(...) +
client.conversational_ai.tests.list(...)
@@ -7671,7 +7526,7 @@ client.conversational_ai.agents.simulate_conversation(
-Run a conversation between the agent and a simulated user and stream back the response. Response is streamed back as partial lists of messages that should be concatenated and once the conversation has complete a single final message with the conversation analysis will be sent. +Lists all agent response tests with pagination support and optional search filtering.
@@ -7686,24 +7541,12 @@ Run a conversation between the agent and a simulated user and stream back the re
```python -from elevenlabs import ( - AgentConfig, - ConversationSimulationSpecification, - ElevenLabs, -) +from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.simulate_conversation_stream( - agent_id="21m00Tcm4TlvDq8ikWAM", - simulation_specification=ConversationSimulationSpecification( - simulated_user_config=AgentConfig( - first_message="Hello, how can I help you today?", - language="en", - ), - ), -) +client.conversational_ai.tests.list() ```
@@ -7719,15 +7562,7 @@ client.conversational_ai.agents.simulate_conversation_stream(
-**agent_id:** `str` — The id of an agent. This is returned on agent creation. - -
-
- -
-
- -**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
@@ -7735,7 +7570,7 @@ client.conversational_ai.agents.simulate_conversation_stream(
-**extra_evaluation_criteria:** `typing.Optional[typing.Sequence[PromptEvaluationCriteria]]` — A list of evaluation criteria to test +**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30.
@@ -7743,7 +7578,7 @@ client.conversational_ai.agents.simulate_conversation_stream(
-**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation +**search:** `typing.Optional[str]` — Search query to filter tests by name.
@@ -11562,6 +11397,173 @@ client.conversational_ai.mcp_servers.tool_approvals.delete(
+ + +
+ +## ConversationalAi Tests Invocations +
client.conversational_ai.tests.invocations.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a test invocation by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.tests.invocations.get( + test_invocation_id="test_invocation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.invocations.resubmit(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resubmits specific test runs from a test invocation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.tests.invocations.resubmit( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**test_run_ids:** `typing.Sequence[str]` — List of test run IDs to resubmit + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to resubmit tests for + +
+
+ +
+
+ +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 73171f97..a25d3849 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -213,7 +213,6 @@ CreateSipTrunkPhoneNumberRequest, CreateTranscriptRequest, CreateTwilioPhoneNumberRequest, - CreateUnitTestRequestDynamicVariablesValue, CreateUnitTestResponseModel, CustomLlm, CustomLlmRequestHeadersValue, @@ -623,6 +622,7 @@ TestConditionResultCommonModel, TestRunStatus, TestToolResultModel, + TestsFeatureUsageCommonModel, TextToSpeechApplyTextNormalizationEnum, TextToSpeechOutputFormatEnum, TextToSpeechStreamRequest, @@ -679,7 +679,6 @@ UpdateChapterRequest, UpdateProjectRequest, UpdatePronunciationDictionariesRequest, - UpdateUnitTestRequestDynamicVariablesValue, UpdateWorkspaceMemberResponseModel, UrlAvatar, UsageAggregationInterval, @@ -1098,7 +1097,6 @@ "CreateSipTrunkPhoneNumberRequest", "CreateTranscriptRequest", "CreateTwilioPhoneNumberRequest", - "CreateUnitTestRequestDynamicVariablesValue", "CreateUnitTestResponseModel", "CustomLlm", "CustomLlmRequestHeadersValue", @@ -1532,6 +1530,7 @@ "TestConditionResultCommonModel", "TestRunStatus", "TestToolResultModel", + "TestsFeatureUsageCommonModel", "TextToDialogueConvertRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", "TextToSoundEffectsConvertRequestOutputFormat", @@ -1599,7 +1598,6 @@ "UpdateChapterRequest", "UpdateProjectRequest", "UpdatePronunciationDictionariesRequest", - "UpdateUnitTestRequestDynamicVariablesValue", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", "UsageAggregationInterval", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index 87c75ebc..54d9566a 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -25,28 +25,12 @@ from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient from .text_to_voice.client import AsyncTextToVoiceClient, TextToVoiceClient -from .types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel -from .types.agent_failure_response_example import AgentFailureResponseExample -from .types.agent_successful_response_example import AgentSuccessfulResponseExample -from .types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput -from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue -from .types.create_unit_test_response_model import CreateUnitTestResponseModel -from .types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel -from .types.get_tests_page_response_model import GetTestsPageResponseModel -from .types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel -from .types.get_unit_test_response_model import GetUnitTestResponseModel -from .types.single_test_run_request_model import SingleTestRunRequestModel -from .types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput -from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue from .usage.client import AsyncUsageClient, UsageClient from .user.client import AsyncUserClient, UserClient from .voices.client import AsyncVoicesClient, VoicesClient from .webhooks.client import AsyncWebhooksClient, WebhooksClient from .workspace.client import AsyncWorkspaceClient, WorkspaceClient -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - class BaseElevenLabs: """ @@ -144,479 +128,6 @@ def with_raw_response(self) -> RawBaseElevenLabs: """ return self._raw_client - def create_agent_response_test_route( - self, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> CreateUnitTestResponseModel: - """ - Creates a new agent response test. - - Parameters - ---------- - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - CreateUnitTestResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - ConversationHistoryTranscriptCommonModelInput, - ElevenLabs, - ) - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.create_agent_response_test_route( - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", - ) - """ - _response = self._raw_client.create_agent_response_test_route( - chat_history=chat_history, - success_condition=success_condition, - success_examples=success_examples, - failure_examples=failure_examples, - name=name, - tool_call_parameters=tool_call_parameters, - dynamic_variables=dynamic_variables, - request_options=request_options, - ) - return _response.data - - def get_agent_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GetUnitTestResponseModel: - """ - Gets an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetUnitTestResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.get_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - ) - """ - _response = self._raw_client.get_agent_response_test_route(test_id, request_options=request_options) - return _response.data - - def update_agent_response_test_route( - self, - test_id: str, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetUnitTestResponseModel: - """ - Updates an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetUnitTestResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - ConversationHistoryTranscriptCommonModelInput, - ElevenLabs, - ) - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.update_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", - ) - """ - _response = self._raw_client.update_agent_response_test_route( - test_id, - chat_history=chat_history, - success_condition=success_condition, - success_examples=success_examples, - failure_examples=failure_examples, - name=name, - tool_call_parameters=tool_call_parameters, - dynamic_variables=dynamic_variables, - request_options=request_options, - ) - return _response.data - - def delete_chat_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Deletes an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.delete_chat_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - ) - """ - _response = self._raw_client.delete_chat_response_test_route(test_id, request_options=request_options) - return _response.data - - def get_agent_response_tests_summaries_route( - self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None - ) -> GetTestsSummariesByIdsResponseModel: - """ - Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. - - Parameters - ---------- - test_ids : typing.Sequence[str] - List of test IDs to fetch. No duplicates allowed. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestsSummariesByIdsResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.get_agent_response_tests_summaries_route( - test_ids=["test_id_1", "test_id_2"], - ) - """ - _response = self._raw_client.get_agent_response_tests_summaries_route( - test_ids=test_ids, request_options=request_options - ) - return _response.data - - def list_chat_response_tests_route( - self, - *, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - search: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetTestsPageResponseModel: - """ - Lists all agent response tests with pagination support and optional search filtering. - - Parameters - ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - - page_size : typing.Optional[int] - How many Tests to return at maximum. Can not exceed 100, defaults to 30. - - search : typing.Optional[str] - Search query to filter tests by name. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestsPageResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.list_chat_response_tests_route() - """ - _response = self._raw_client.list_chat_response_tests_route( - cursor=cursor, page_size=page_size, search=search, request_options=request_options - ) - return _response.data - - def run_agent_test_suite_route( - self, - agent_id: str, - *, - tests: typing.Sequence[SingleTestRunRequestModel], - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetTestSuiteInvocationResponseModel: - """ - Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. - - Parameters - ---------- - agent_id : str - The id of an agent. This is returned on agent creation. - - tests : typing.Sequence[SingleTestRunRequestModel] - List of tests to run on the agent - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestSuiteInvocationResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs, SingleTestRunRequestModel - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.run_agent_test_suite_route( - agent_id="21m00Tcm4TlvDq8ikWAM", - tests=[ - SingleTestRunRequestModel( - test_id="test_id", - ) - ], - ) - """ - _response = self._raw_client.run_agent_test_suite_route( - agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options - ) - return _response.data - - def get_test_invocation_route( - self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GetTestSuiteInvocationResponseModel: - """ - Gets a test invocation by ID. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestSuiteInvocationResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.get_test_invocation_route( - test_invocation_id="test_invocation_id", - ) - """ - _response = self._raw_client.get_test_invocation_route(test_invocation_id, request_options=request_options) - return _response.data - - def resubmit_tests_route( - self, - test_invocation_id: str, - *, - test_run_ids: typing.Sequence[str], - agent_id: str, - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Resubmits specific test runs from a test invocation. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - test_run_ids : typing.Sequence[str] - List of test run IDs to resubmit - - agent_id : str - Agent ID to resubmit tests for - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.resubmit_tests_route( - test_invocation_id="test_invocation_id", - test_run_ids=["test_run_ids"], - agent_id="agent_id", - ) - """ - _response = self._raw_client.resubmit_tests_route( - test_invocation_id, - test_run_ids=test_run_ids, - agent_id=agent_id, - agent_config_override=agent_config_override, - request_options=request_options, - ) - return _response.data - def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Add a generated voice to the voice library. @@ -739,553 +250,6 @@ def with_raw_response(self) -> AsyncRawBaseElevenLabs: """ return self._raw_client - async def create_agent_response_test_route( - self, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> CreateUnitTestResponseModel: - """ - Creates a new agent response test. - - Parameters - ---------- - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - CreateUnitTestResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - AsyncElevenLabs, - ConversationHistoryTranscriptCommonModelInput, - ) - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.create_agent_response_test_route( - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_agent_response_test_route( - chat_history=chat_history, - success_condition=success_condition, - success_examples=success_examples, - failure_examples=failure_examples, - name=name, - tool_call_parameters=tool_call_parameters, - dynamic_variables=dynamic_variables, - request_options=request_options, - ) - return _response.data - - async def get_agent_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GetUnitTestResponseModel: - """ - Gets an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetUnitTestResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.get_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_agent_response_test_route(test_id, request_options=request_options) - return _response.data - - async def update_agent_response_test_route( - self, - test_id: str, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetUnitTestResponseModel: - """ - Updates an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetUnitTestResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import ( - AgentFailureResponseExample, - AgentSuccessfulResponseExample, - AsyncElevenLabs, - ConversationHistoryTranscriptCommonModelInput, - ) - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.update_agent_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - chat_history=[ - ConversationHistoryTranscriptCommonModelInput( - role="user", - time_in_call_secs=1, - ) - ], - success_condition="success_condition", - success_examples=[ - AgentSuccessfulResponseExample( - response="response", - ) - ], - failure_examples=[ - AgentFailureResponseExample( - response="response", - ) - ], - name="name", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_agent_response_test_route( - test_id, - chat_history=chat_history, - success_condition=success_condition, - success_examples=success_examples, - failure_examples=failure_examples, - name=name, - tool_call_parameters=tool_call_parameters, - dynamic_variables=dynamic_variables, - request_options=request_options, - ) - return _response.data - - async def delete_chat_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Deletes an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.delete_chat_response_test_route( - test_id="TeaqRRdTcIfIu2i7BYfT", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete_chat_response_test_route(test_id, request_options=request_options) - return _response.data - - async def get_agent_response_tests_summaries_route( - self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None - ) -> GetTestsSummariesByIdsResponseModel: - """ - Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. - - Parameters - ---------- - test_ids : typing.Sequence[str] - List of test IDs to fetch. No duplicates allowed. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestsSummariesByIdsResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.get_agent_response_tests_summaries_route( - test_ids=["test_id_1", "test_id_2"], - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_agent_response_tests_summaries_route( - test_ids=test_ids, request_options=request_options - ) - return _response.data - - async def list_chat_response_tests_route( - self, - *, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - search: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetTestsPageResponseModel: - """ - Lists all agent response tests with pagination support and optional search filtering. - - Parameters - ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - - page_size : typing.Optional[int] - How many Tests to return at maximum. Can not exceed 100, defaults to 30. - - search : typing.Optional[str] - Search query to filter tests by name. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestsPageResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.list_chat_response_tests_route() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_chat_response_tests_route( - cursor=cursor, page_size=page_size, search=search, request_options=request_options - ) - return _response.data - - async def run_agent_test_suite_route( - self, - agent_id: str, - *, - tests: typing.Sequence[SingleTestRunRequestModel], - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetTestSuiteInvocationResponseModel: - """ - Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. - - Parameters - ---------- - agent_id : str - The id of an agent. This is returned on agent creation. - - tests : typing.Sequence[SingleTestRunRequestModel] - List of tests to run on the agent - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestSuiteInvocationResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs, SingleTestRunRequestModel - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.run_agent_test_suite_route( - agent_id="21m00Tcm4TlvDq8ikWAM", - tests=[ - SingleTestRunRequestModel( - test_id="test_id", - ) - ], - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.run_agent_test_suite_route( - agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options - ) - return _response.data - - async def get_test_invocation_route( - self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GetTestSuiteInvocationResponseModel: - """ - Gets a test invocation by ID. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GetTestSuiteInvocationResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.get_test_invocation_route( - test_invocation_id="test_invocation_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_test_invocation_route( - test_invocation_id, request_options=request_options - ) - return _response.data - - async def resubmit_tests_route( - self, - test_invocation_id: str, - *, - test_run_ids: typing.Sequence[str], - agent_id: str, - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Resubmits specific test runs from a test invocation. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - test_run_ids : typing.Sequence[str] - List of test run IDs to resubmit - - agent_id : str - Agent ID to resubmit tests for - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.resubmit_tests_route( - test_invocation_id="test_invocation_id", - test_run_ids=["test_run_ids"], - agent_id="agent_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.resubmit_tests_route( - test_invocation_id, - test_run_ids=test_run_ids, - agent_id=agent_id, - agent_config_override=agent_config_override, - request_options=request_options, - ) - return _response.data - async def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Add a generated voice to the voice library. diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py index 2db12114..4c24a3df 100644 --- a/src/elevenlabs/conversational_ai/__init__.py +++ b/src/elevenlabs/conversational_ai/__init__.py @@ -14,6 +14,7 @@ secrets, settings, sip_trunk, + tests, tools, twilio, ) @@ -32,9 +33,11 @@ PhoneNumbersUpdateResponse_SipTrunk, PhoneNumbersUpdateResponse_Twilio, ) +from .tests import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue __all__ = [ "ConversationsListRequestSummaryMode", + "CreateUnitTestRequestDynamicVariablesValue", "PhoneNumbersCreateRequestBody", "PhoneNumbersCreateRequestBody_SipTrunk", "PhoneNumbersCreateRequestBody_Twilio", @@ -47,6 +50,7 @@ "PhoneNumbersUpdateResponse", "PhoneNumbersUpdateResponse_SipTrunk", "PhoneNumbersUpdateResponse_Twilio", + "UpdateUnitTestRequestDynamicVariablesValue", "agents", "batch_calls", "conversations", @@ -58,6 +62,7 @@ "secrets", "settings", "sip_trunk", + "tests", "tools", "twilio", ] diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index b05ac8fc..262d530e 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -4,6 +4,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions +from ...types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel from ...types.conversation_simulation_specification import ConversationSimulationSpecification @@ -11,7 +12,9 @@ from ...types.create_agent_response_model import CreateAgentResponseModel from ...types.get_agent_response_model import GetAgentResponseModel from ...types.get_agents_page_response_model import GetAgentsPageResponseModel +from ...types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from ...types.prompt_evaluation_criteria import PromptEvaluationCriteria +from ...types.single_test_run_request_model import SingleTestRunRequestModel from .knowledge_base.client import AsyncKnowledgeBaseClient, KnowledgeBaseClient from .link.client import AsyncLinkClient, LinkClient from .llm_usage.client import AsyncLlmUsageClient, LlmUsageClient @@ -437,6 +440,57 @@ def simulate_conversation_stream( ) return _response.data + def run_tests( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestSuiteInvocationResponseModel: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs, SingleTestRunRequestModel + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.agents.run_tests( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], + ) + """ + _response = self._raw_client.run_tests( + agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options + ) + return _response.data + class AsyncAgentsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -918,3 +972,62 @@ async def main() -> None: request_options=request_options, ) return _response.data + + async def run_tests( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestSuiteInvocationResponseModel: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs, SingleTestRunRequestModel + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.agents.run_tests( + agent_id="21m00Tcm4TlvDq8ikWAM", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.run_tests( + agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options + ) + return _response.data diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index f8bdc1b9..8bba27fe 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -11,6 +11,7 @@ from ...core.serialization import convert_and_respect_annotation_metadata from ...core.unchecked_base_model import construct_type from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel from ...types.conversation_simulation_specification import ConversationSimulationSpecification @@ -18,8 +19,10 @@ from ...types.create_agent_response_model import CreateAgentResponseModel from ...types.get_agent_response_model import GetAgentResponseModel from ...types.get_agents_page_response_model import GetAgentsPageResponseModel +from ...types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from ...types.http_validation_error import HttpValidationError from ...types.prompt_evaluation_criteria import PromptEvaluationCriteria +from ...types.single_test_run_request_model import SingleTestRunRequestModel # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -571,6 +574,81 @@ def simulate_conversation_stream( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def run_tests( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", + method="POST", + json={ + "tests": convert_and_respect_annotation_metadata( + object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" + ), + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawAgentsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -1119,3 +1197,78 @@ async def simulate_conversation_stream( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def run_tests( + self, + agent_id: str, + *, + tests: typing.Sequence[SingleTestRunRequestModel], + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. + + Parameters + ---------- + agent_id : str + The id of an agent. This is returned on agent creation. + + tests : typing.Sequence[SingleTestRunRequestModel] + List of tests to run on the agent + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", + method="POST", + json={ + "tests": convert_and_respect_annotation_metadata( + object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" + ), + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py index 2c7ab2aa..60aee9e9 100644 --- a/src/elevenlabs/conversational_ai/client.py +++ b/src/elevenlabs/conversational_ai/client.py @@ -22,6 +22,7 @@ from .secrets.client import AsyncSecretsClient, SecretsClient from .settings.client import AsyncSettingsClient, SettingsClient from .sip_trunk.client import AsyncSipTrunkClient, SipTrunkClient +from .tests.client import AsyncTestsClient, TestsClient from .tools.client import AsyncToolsClient, ToolsClient from .twilio.client import AsyncTwilioClient, TwilioClient @@ -38,6 +39,8 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.agents = AgentsClient(client_wrapper=client_wrapper) + self.tests = TestsClient(client_wrapper=client_wrapper) + self.phone_numbers = PhoneNumbersClient(client_wrapper=client_wrapper) self.llm_usage = LlmUsageClient(client_wrapper=client_wrapper) @@ -264,6 +267,8 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.agents = AsyncAgentsClient(client_wrapper=client_wrapper) + self.tests = AsyncTestsClient(client_wrapper=client_wrapper) + self.phone_numbers = AsyncPhoneNumbersClient(client_wrapper=client_wrapper) self.llm_usage = AsyncLlmUsageClient(client_wrapper=client_wrapper) diff --git a/src/elevenlabs/conversational_ai/tests/__init__.py b/src/elevenlabs/conversational_ai/tests/__init__.py new file mode 100644 index 00000000..95047906 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/__init__.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .types import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue +from . import invocations + +__all__ = ["CreateUnitTestRequestDynamicVariablesValue", "UpdateUnitTestRequestDynamicVariablesValue", "invocations"] diff --git a/src/elevenlabs/conversational_ai/tests/client.py b/src/elevenlabs/conversational_ai/tests/client.py new file mode 100644 index 00000000..83bd1ab2 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/client.py @@ -0,0 +1,763 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.request_options import RequestOptions +from ...types.agent_failure_response_example import AgentFailureResponseExample +from ...types.agent_successful_response_example import AgentSuccessfulResponseExample +from ...types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput +from ...types.create_unit_test_response_model import CreateUnitTestResponseModel +from ...types.get_tests_page_response_model import GetTestsPageResponseModel +from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel +from ...types.get_unit_test_response_model import GetUnitTestResponseModel +from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput +from .invocations.client import AsyncInvocationsClient, InvocationsClient +from .raw_client import AsyncRawTestsClient, RawTestsClient +from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class TestsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawTestsClient(client_wrapper=client_wrapper) + self.invocations = InvocationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawTestsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawTestsClient + """ + return self._raw_client + + def create( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateUnitTestResponseModel: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, + ) + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.create( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + """ + _response = self._raw_client.create( + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + def get(self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetUnitTestResponseModel: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.get( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + """ + _response = self._raw_client.get(test_id, request_options=request_options) + return _response.data + + def update( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetUnitTestResponseModel: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + ConversationHistoryTranscriptCommonModelInput, + ElevenLabs, + ) + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.update( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + """ + _response = self._raw_client.update( + test_id, + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + def delete( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.delete( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + """ + _response = self._raw_client.delete(test_id, request_options=request_options) + return _response.data + + def summaries( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> GetTestsSummariesByIdsResponseModel: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsSummariesByIdsResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.summaries( + test_ids=["test_id_1", "test_id_2"], + ) + """ + _response = self._raw_client.summaries(test_ids=test_ids, request_options=request_options) + return _response.data + + def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestsPageResponseModel: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsPageResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.list() + """ + _response = self._raw_client.list( + cursor=cursor, page_size=page_size, search=search, request_options=request_options + ) + return _response.data + + +class AsyncTestsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawTestsClient(client_wrapper=client_wrapper) + self.invocations = AsyncInvocationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawTestsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawTestsClient + """ + return self._raw_client + + async def create( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateUnitTestResponseModel: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + AsyncElevenLabs, + ConversationHistoryTranscriptCommonModelInput, + ) + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.create( + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + async def get( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetUnitTestResponseModel: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.get( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(test_id, request_options=request_options) + return _response.data + + async def update( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetUnitTestResponseModel: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetUnitTestResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import ( + AgentFailureResponseExample, + AgentSuccessfulResponseExample, + AsyncElevenLabs, + ConversationHistoryTranscriptCommonModelInput, + ) + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.update( + test_id="TeaqRRdTcIfIu2i7BYfT", + chat_history=[ + ConversationHistoryTranscriptCommonModelInput( + role="user", + time_in_call_secs=1, + ) + ], + success_condition="success_condition", + success_examples=[ + AgentSuccessfulResponseExample( + response="response", + ) + ], + failure_examples=[ + AgentFailureResponseExample( + response="response", + ) + ], + name="name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + test_id, + chat_history=chat_history, + success_condition=success_condition, + success_examples=success_examples, + failure_examples=failure_examples, + name=name, + tool_call_parameters=tool_call_parameters, + dynamic_variables=dynamic_variables, + request_options=request_options, + ) + return _response.data + + async def delete( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.delete( + test_id="TeaqRRdTcIfIu2i7BYfT", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(test_id, request_options=request_options) + return _response.data + + async def summaries( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> GetTestsSummariesByIdsResponseModel: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsSummariesByIdsResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.summaries( + test_ids=["test_id_1", "test_id_2"], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.summaries(test_ids=test_ids, request_options=request_options) + return _response.data + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestsPageResponseModel: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestsPageResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.list() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + cursor=cursor, page_size=page_size, search=search, request_options=request_options + ) + return _response.data diff --git a/src/elevenlabs/conversational_ai/tests/invocations/__init__.py b/src/elevenlabs/conversational_ai/tests/invocations/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/invocations/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/elevenlabs/conversational_ai/tests/invocations/client.py b/src/elevenlabs/conversational_ai/tests/invocations/client.py new file mode 100644 index 00000000..2062c321 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/invocations/client.py @@ -0,0 +1,238 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.request_options import RequestOptions +from ....types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from ....types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel +from .raw_client import AsyncRawInvocationsClient, RawInvocationsClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class InvocationsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawInvocationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawInvocationsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawInvocationsClient + """ + return self._raw_client + + def get( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetTestSuiteInvocationResponseModel: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.invocations.get( + test_invocation_id="test_invocation_id", + ) + """ + _response = self._raw_client.get(test_invocation_id, request_options=request_options) + return _response.data + + def resubmit( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.invocations.resubmit( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", + ) + """ + _response = self._raw_client.resubmit( + test_invocation_id, + test_run_ids=test_run_ids, + agent_id=agent_id, + agent_config_override=agent_config_override, + request_options=request_options, + ) + return _response.data + + +class AsyncInvocationsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawInvocationsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawInvocationsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawInvocationsClient + """ + return self._raw_client + + async def get( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetTestSuiteInvocationResponseModel: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestSuiteInvocationResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.invocations.get( + test_invocation_id="test_invocation_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(test_invocation_id, request_options=request_options) + return _response.data + + async def resubmit( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.invocations.resubmit( + test_invocation_id="test_invocation_id", + test_run_ids=["test_run_ids"], + agent_id="agent_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.resubmit( + test_invocation_id, + test_run_ids=test_run_ids, + agent_id=agent_id, + agent_config_override=agent_config_override, + request_options=request_options, + ) + return _response.data diff --git a/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py b/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py new file mode 100644 index 00000000..f7eeb21f --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py @@ -0,0 +1,289 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ....core.api_error import ApiError +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.http_response import AsyncHttpResponse, HttpResponse +from ....core.jsonable_encoder import jsonable_encoder +from ....core.request_options import RequestOptions +from ....core.serialization import convert_and_respect_annotation_metadata +from ....core.unchecked_base_model import construct_type +from ....errors.unprocessable_entity_error import UnprocessableEntityError +from ....types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from ....types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel +from ....types.http_validation_error import HttpValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawInvocationsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def resubmit( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", + method="POST", + json={ + "test_run_ids": test_run_ids, + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + "agent_id": agent_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawInvocationsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get( + self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: + """ + Gets a test invocation by ID. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestSuiteInvocationResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestSuiteInvocationResponseModel, + construct_type( + type_=GetTestSuiteInvocationResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def resubmit( + self, + test_invocation_id: str, + *, + test_run_ids: typing.Sequence[str], + agent_id: str, + agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Resubmits specific test runs from a test invocation. + + Parameters + ---------- + test_invocation_id : str + The id of a test invocation. This is returned when tests are run. + + test_run_ids : typing.Sequence[str] + List of test run IDs to resubmit + + agent_id : str + Agent ID to resubmit tests for + + agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] + Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", + method="POST", + json={ + "test_run_ids": test_run_ids, + "agent_config_override": convert_and_respect_annotation_metadata( + object_=agent_config_override, + annotation=AdhocAgentConfigOverrideForTestRequestModel, + direction="write", + ), + "agent_id": agent_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/tests/raw_client.py b/src/elevenlabs/conversational_ai/tests/raw_client.py new file mode 100644 index 00000000..1194d582 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/raw_client.py @@ -0,0 +1,919 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.http_response import AsyncHttpResponse, HttpResponse +from ...core.jsonable_encoder import jsonable_encoder +from ...core.request_options import RequestOptions +from ...core.serialization import convert_and_respect_annotation_metadata +from ...core.unchecked_base_model import construct_type +from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.agent_failure_response_example import AgentFailureResponseExample +from ...types.agent_successful_response_example import AgentSuccessfulResponseExample +from ...types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput +from ...types.create_unit_test_response_model import CreateUnitTestResponseModel +from ...types.get_tests_page_response_model import GetTestsPageResponseModel +from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel +from ...types.get_unit_test_response_model import GetUnitTestResponseModel +from ...types.http_validation_error import HttpValidationError +from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput +from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawTestsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateUnitTestResponseModel]: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/create", + method="POST", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateUnitTestResponseModel, + construct_type( + type_=CreateUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetUnitTestResponseModel]: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetUnitTestResponseModel]: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="PUT", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def summaries( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetTestsSummariesByIdsResponseModel]: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestsSummariesByIdsResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/summaries", + method="POST", + json={ + "test_ids": test_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsSummariesByIdsResponseModel, + construct_type( + type_=GetTestsSummariesByIdsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetTestsPageResponseModel]: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestsPageResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + "search": search, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsPageResponseModel, + construct_type( + type_=GetTestsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawTestsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateUnitTestResponseModel]: + """ + Creates a new agent response test. + + Parameters + ---------- + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/create", + method="POST", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateUnitTestResponseModel, + construct_type( + type_=CreateUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetUnitTestResponseModel]: + """ + Gets an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + test_id: str, + *, + chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + success_condition: str, + success_examples: typing.Sequence[AgentSuccessfulResponseExample], + failure_examples: typing.Sequence[AgentFailureResponseExample], + name: str, + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, + dynamic_variables: typing.Optional[ + typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] + ] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetUnitTestResponseModel]: + """ + Updates an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] + + success_condition : str + A prompt that evaluates whether the agent's response is successful. Should return True or False. + + success_examples : typing.Sequence[AgentSuccessfulResponseExample] + Non-empty list of example responses that should be considered successful + + failure_examples : typing.Sequence[AgentFailureResponseExample] + Non-empty list of example responses that should be considered failures + + name : str + + tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + + dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] + Dynamic variables to replace in the agent config during testing + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetUnitTestResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="PUT", + json={ + "chat_history": convert_and_respect_annotation_metadata( + object_=chat_history, + annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], + direction="write", + ), + "success_condition": success_condition, + "success_examples": convert_and_respect_annotation_metadata( + object_=success_examples, + annotation=typing.Sequence[AgentSuccessfulResponseExample], + direction="write", + ), + "failure_examples": convert_and_respect_annotation_metadata( + object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" + ), + "tool_call_parameters": convert_and_respect_annotation_metadata( + object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" + ), + "dynamic_variables": convert_and_respect_annotation_metadata( + object_=dynamic_variables, + annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], + direction="write", + ), + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetUnitTestResponseModel, + construct_type( + type_=GetUnitTestResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Deletes an agent response test by ID. + + Parameters + ---------- + test_id : str + The id of a chat response test. This is returned on test creation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def summaries( + self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetTestsSummariesByIdsResponseModel]: + """ + Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. + + Parameters + ---------- + test_ids : typing.Sequence[str] + List of test IDs to fetch. No duplicates allowed. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestsSummariesByIdsResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing/summaries", + method="POST", + json={ + "test_ids": test_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsSummariesByIdsResponseModel, + construct_type( + type_=GetTestsSummariesByIdsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def list( + self, + *, + cursor: typing.Optional[str] = None, + page_size: typing.Optional[int] = None, + search: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetTestsPageResponseModel]: + """ + Lists all agent response tests with pagination support and optional search filtering. + + Parameters + ---------- + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + search : typing.Optional[str] + Search query to filter tests by name. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestsPageResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/agent-testing", + method="GET", + params={ + "cursor": cursor, + "page_size": page_size, + "search": search, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestsPageResponseModel, + construct_type( + type_=GetTestsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/tests/types/__init__.py b/src/elevenlabs/conversational_ai/tests/types/__init__.py new file mode 100644 index 00000000..69b19600 --- /dev/null +++ b/src/elevenlabs/conversational_ai/tests/types/__init__.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue +from .update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue + +__all__ = ["CreateUnitTestRequestDynamicVariablesValue", "UpdateUnitTestRequestDynamicVariablesValue"] diff --git a/src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py b/src/elevenlabs/conversational_ai/tests/types/create_unit_test_request_dynamic_variables_value.py similarity index 100% rename from src/elevenlabs/types/create_unit_test_request_dynamic_variables_value.py rename to src/elevenlabs/conversational_ai/tests/types/create_unit_test_request_dynamic_variables_value.py diff --git a/src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py b/src/elevenlabs/conversational_ai/tests/types/update_unit_test_request_dynamic_variables_value.py similarity index 100% rename from src/elevenlabs/types/update_unit_test_request_dynamic_variables_value.py rename to src/elevenlabs/conversational_ai/tests/types/update_unit_test_request_dynamic_variables_value.py diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 74ba0faa..905074d5 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.12.0", + "User-Agent": "elevenlabs/v2.12.1", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.12.0", + "X-Fern-SDK-Version": "v2.12.1", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/raw_base_client.py b/src/elevenlabs/raw_base_client.py index 806eaa3b..0cdebbe0 100644 --- a/src/elevenlabs/raw_base_client.py +++ b/src/elevenlabs/raw_base_client.py @@ -6,680 +6,13 @@ from .core.api_error import ApiError from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.http_response import AsyncHttpResponse, HttpResponse -from .core.jsonable_encoder import jsonable_encoder from .core.request_options import RequestOptions -from .core.serialization import convert_and_respect_annotation_metadata -from .core.unchecked_base_model import construct_type -from .errors.unprocessable_entity_error import UnprocessableEntityError -from .types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel -from .types.agent_failure_response_example import AgentFailureResponseExample -from .types.agent_successful_response_example import AgentSuccessfulResponseExample -from .types.conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput -from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue -from .types.create_unit_test_response_model import CreateUnitTestResponseModel -from .types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel -from .types.get_tests_page_response_model import GetTestsPageResponseModel -from .types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel -from .types.get_unit_test_response_model import GetUnitTestResponseModel -from .types.http_validation_error import HttpValidationError -from .types.single_test_run_request_model import SingleTestRunRequestModel -from .types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput -from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) class RawBaseElevenLabs: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create_agent_response_test_route( - self, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[CreateUnitTestResponseModel]: - """ - Creates a new agent response test. - - Parameters - ---------- - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CreateUnitTestResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing/create", - method="POST", - json={ - "chat_history": convert_and_respect_annotation_metadata( - object_=chat_history, - annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - direction="write", - ), - "success_condition": success_condition, - "success_examples": convert_and_respect_annotation_metadata( - object_=success_examples, - annotation=typing.Sequence[AgentSuccessfulResponseExample], - direction="write", - ), - "failure_examples": convert_and_respect_annotation_metadata( - object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" - ), - "tool_call_parameters": convert_and_respect_annotation_metadata( - object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" - ), - "dynamic_variables": convert_and_respect_annotation_metadata( - object_=dynamic_variables, - annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], - direction="write", - ), - "name": name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CreateUnitTestResponseModel, - construct_type( - type_=CreateUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def get_agent_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[GetUnitTestResponseModel]: - """ - Gets an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetUnitTestResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetUnitTestResponseModel, - construct_type( - type_=GetUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def update_agent_response_test_route( - self, - test_id: str, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[GetUnitTestResponseModel]: - """ - Updates an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetUnitTestResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="PUT", - json={ - "chat_history": convert_and_respect_annotation_metadata( - object_=chat_history, - annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - direction="write", - ), - "success_condition": success_condition, - "success_examples": convert_and_respect_annotation_metadata( - object_=success_examples, - annotation=typing.Sequence[AgentSuccessfulResponseExample], - direction="write", - ), - "failure_examples": convert_and_respect_annotation_metadata( - object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" - ), - "tool_call_parameters": convert_and_respect_annotation_metadata( - object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" - ), - "dynamic_variables": convert_and_respect_annotation_metadata( - object_=dynamic_variables, - annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], - direction="write", - ), - "name": name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetUnitTestResponseModel, - construct_type( - type_=GetUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def delete_chat_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Deletes an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - construct_type( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def get_agent_response_tests_summaries_route( - self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[GetTestsSummariesByIdsResponseModel]: - """ - Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. - - Parameters - ---------- - test_ids : typing.Sequence[str] - List of test IDs to fetch. No duplicates allowed. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetTestsSummariesByIdsResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing/summaries", - method="POST", - json={ - "test_ids": test_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestsSummariesByIdsResponseModel, - construct_type( - type_=GetTestsSummariesByIdsResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def list_chat_response_tests_route( - self, - *, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - search: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[GetTestsPageResponseModel]: - """ - Lists all agent response tests with pagination support and optional search filtering. - - Parameters - ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - - page_size : typing.Optional[int] - How many Tests to return at maximum. Can not exceed 100, defaults to 30. - - search : typing.Optional[str] - Search query to filter tests by name. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetTestsPageResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing", - method="GET", - params={ - "cursor": cursor, - "page_size": page_size, - "search": search, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestsPageResponseModel, - construct_type( - type_=GetTestsPageResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def run_agent_test_suite_route( - self, - agent_id: str, - *, - tests: typing.Sequence[SingleTestRunRequestModel], - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: - """ - Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. - - Parameters - ---------- - agent_id : str - The id of an agent. This is returned on agent creation. - - tests : typing.Sequence[SingleTestRunRequestModel] - List of tests to run on the agent - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetTestSuiteInvocationResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", - method="POST", - json={ - "tests": convert_and_respect_annotation_metadata( - object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" - ), - "agent_config_override": convert_and_respect_annotation_metadata( - object_=agent_config_override, - annotation=AdhocAgentConfigOverrideForTestRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestSuiteInvocationResponseModel, - construct_type( - type_=GetTestSuiteInvocationResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def get_test_invocation_route( - self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: - """ - Gets a test invocation by ID. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetTestSuiteInvocationResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestSuiteInvocationResponseModel, - construct_type( - type_=GetTestSuiteInvocationResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def resubmit_tests_route( - self, - test_invocation_id: str, - *, - test_run_ids: typing.Sequence[str], - agent_id: str, - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Resubmits specific test runs from a test invocation. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - test_run_ids : typing.Sequence[str] - List of test run IDs to resubmit - - agent_id : str - Agent ID to resubmit tests for - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", - method="POST", - json={ - "test_run_ids": test_run_ids, - "agent_config_override": convert_and_respect_annotation_metadata( - object_=agent_config_override, - annotation=AdhocAgentConfigOverrideForTestRequestModel, - direction="write", - ), - "agent_id": agent_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - construct_type( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ Add a generated voice to the voice library. @@ -711,652 +44,6 @@ class AsyncRawBaseElevenLabs: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create_agent_response_test_route( - self, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[CreateUnitTestResponseModel]: - """ - Creates a new agent response test. - - Parameters - ---------- - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CreateUnitTestResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing/create", - method="POST", - json={ - "chat_history": convert_and_respect_annotation_metadata( - object_=chat_history, - annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - direction="write", - ), - "success_condition": success_condition, - "success_examples": convert_and_respect_annotation_metadata( - object_=success_examples, - annotation=typing.Sequence[AgentSuccessfulResponseExample], - direction="write", - ), - "failure_examples": convert_and_respect_annotation_metadata( - object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" - ), - "tool_call_parameters": convert_and_respect_annotation_metadata( - object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" - ), - "dynamic_variables": convert_and_respect_annotation_metadata( - object_=dynamic_variables, - annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], - direction="write", - ), - "name": name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CreateUnitTestResponseModel, - construct_type( - type_=CreateUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def get_agent_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[GetUnitTestResponseModel]: - """ - Gets an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetUnitTestResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetUnitTestResponseModel, - construct_type( - type_=GetUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def update_agent_response_test_route( - self, - test_id: str, - *, - chat_history: typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - success_condition: str, - success_examples: typing.Sequence[AgentSuccessfulResponseExample], - failure_examples: typing.Sequence[AgentFailureResponseExample], - name: str, - tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelInput] = OMIT, - dynamic_variables: typing.Optional[ - typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[GetUnitTestResponseModel]: - """ - Updates an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - chat_history : typing.Sequence[ConversationHistoryTranscriptCommonModelInput] - - success_condition : str - A prompt that evaluates whether the agent's response is successful. Should return True or False. - - success_examples : typing.Sequence[AgentSuccessfulResponseExample] - Non-empty list of example responses that should be considered successful - - failure_examples : typing.Sequence[AgentFailureResponseExample] - Non-empty list of example responses that should be considered failures - - name : str - - tool_call_parameters : typing.Optional[UnitTestToolCallEvaluationModelInput] - How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. - - dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] - Dynamic variables to replace in the agent config during testing - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetUnitTestResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="PUT", - json={ - "chat_history": convert_and_respect_annotation_metadata( - object_=chat_history, - annotation=typing.Sequence[ConversationHistoryTranscriptCommonModelInput], - direction="write", - ), - "success_condition": success_condition, - "success_examples": convert_and_respect_annotation_metadata( - object_=success_examples, - annotation=typing.Sequence[AgentSuccessfulResponseExample], - direction="write", - ), - "failure_examples": convert_and_respect_annotation_metadata( - object_=failure_examples, annotation=typing.Sequence[AgentFailureResponseExample], direction="write" - ), - "tool_call_parameters": convert_and_respect_annotation_metadata( - object_=tool_call_parameters, annotation=UnitTestToolCallEvaluationModelInput, direction="write" - ), - "dynamic_variables": convert_and_respect_annotation_metadata( - object_=dynamic_variables, - annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], - direction="write", - ), - "name": name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetUnitTestResponseModel, - construct_type( - type_=GetUnitTestResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def delete_chat_response_test_route( - self, test_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Deletes an agent response test by ID. - - Parameters - ---------- - test_id : str - The id of a chat response test. This is returned on test creation. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/agent-testing/{jsonable_encoder(test_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - construct_type( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def get_agent_response_tests_summaries_route( - self, *, test_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[GetTestsSummariesByIdsResponseModel]: - """ - Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries. - - Parameters - ---------- - test_ids : typing.Sequence[str] - List of test IDs to fetch. No duplicates allowed. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetTestsSummariesByIdsResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing/summaries", - method="POST", - json={ - "test_ids": test_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestsSummariesByIdsResponseModel, - construct_type( - type_=GetTestsSummariesByIdsResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def list_chat_response_tests_route( - self, - *, - cursor: typing.Optional[str] = None, - page_size: typing.Optional[int] = None, - search: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[GetTestsPageResponseModel]: - """ - Lists all agent response tests with pagination support and optional search filtering. - - Parameters - ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - - page_size : typing.Optional[int] - How many Tests to return at maximum. Can not exceed 100, defaults to 30. - - search : typing.Optional[str] - Search query to filter tests by name. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetTestsPageResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/convai/agent-testing", - method="GET", - params={ - "cursor": cursor, - "page_size": page_size, - "search": search, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestsPageResponseModel, - construct_type( - type_=GetTestsPageResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def run_agent_test_suite_route( - self, - agent_id: str, - *, - tests: typing.Sequence[SingleTestRunRequestModel], - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: - """ - Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. - - Parameters - ---------- - agent_id : str - The id of an agent. This is returned on agent creation. - - tests : typing.Sequence[SingleTestRunRequestModel] - List of tests to run on the agent - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetTestSuiteInvocationResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/agents/{jsonable_encoder(agent_id)}/run-tests", - method="POST", - json={ - "tests": convert_and_respect_annotation_metadata( - object_=tests, annotation=typing.Sequence[SingleTestRunRequestModel], direction="write" - ), - "agent_config_override": convert_and_respect_annotation_metadata( - object_=agent_config_override, - annotation=AdhocAgentConfigOverrideForTestRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestSuiteInvocationResponseModel, - construct_type( - type_=GetTestSuiteInvocationResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def get_test_invocation_route( - self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: - """ - Gets a test invocation by ID. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetTestSuiteInvocationResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetTestSuiteInvocationResponseModel, - construct_type( - type_=GetTestSuiteInvocationResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def resubmit_tests_route( - self, - test_invocation_id: str, - *, - test_run_ids: typing.Sequence[str], - agent_id: str, - agent_config_override: typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Resubmits specific test runs from a test invocation. - - Parameters - ---------- - test_invocation_id : str - The id of a test invocation. This is returned when tests are run. - - test_run_ids : typing.Sequence[str] - List of test run IDs to resubmit - - agent_id : str - Agent ID to resubmit tests for - - agent_config_override : typing.Optional[AdhocAgentConfigOverrideForTestRequestModel] - Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/test-invocations/{jsonable_encoder(test_invocation_id)}/resubmit", - method="POST", - json={ - "test_run_ids": test_run_ids, - "agent_config_override": convert_and_respect_annotation_metadata( - object_=agent_config_override, - annotation=AdhocAgentConfigOverrideForTestRequestModel, - direction="write", - ), - "agent_id": agent_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - construct_type( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def save_a_voice_preview( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 262a77b6..da109c98 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -264,7 +264,6 @@ from .create_sip_trunk_phone_number_request import CreateSipTrunkPhoneNumberRequest from .create_transcript_request import CreateTranscriptRequest from .create_twilio_phone_number_request import CreateTwilioPhoneNumberRequest -from .create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue from .create_unit_test_response_model import CreateUnitTestResponseModel from .custom_llm import CustomLlm from .custom_llm_request_headers_value import CustomLlmRequestHeadersValue @@ -712,6 +711,7 @@ from .test_condition_result_common_model import TestConditionResultCommonModel from .test_run_status import TestRunStatus from .test_tool_result_model import TestToolResultModel +from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum from .text_to_speech_stream_request import TextToSpeechStreamRequest @@ -774,7 +774,6 @@ from .update_chapter_request import UpdateChapterRequest from .update_project_request import UpdateProjectRequest from .update_pronunciation_dictionaries_request import UpdatePronunciationDictionariesRequest -from .update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue from .update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel from .url_avatar import UrlAvatar from .usage_aggregation_interval import UsageAggregationInterval @@ -1094,7 +1093,6 @@ "CreateSipTrunkPhoneNumberRequest", "CreateTranscriptRequest", "CreateTwilioPhoneNumberRequest", - "CreateUnitTestRequestDynamicVariablesValue", "CreateUnitTestResponseModel", "CustomLlm", "CustomLlmRequestHeadersValue", @@ -1504,6 +1502,7 @@ "TestConditionResultCommonModel", "TestRunStatus", "TestToolResultModel", + "TestsFeatureUsageCommonModel", "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechOutputFormatEnum", "TextToSpeechStreamRequest", @@ -1560,7 +1559,6 @@ "UpdateChapterRequest", "UpdateProjectRequest", "UpdatePronunciationDictionariesRequest", - "UpdateUnitTestRequestDynamicVariablesValue", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", "UsageAggregationInterval", diff --git a/src/elevenlabs/types/client_event.py b/src/elevenlabs/types/client_event.py index 17fd0241..c0f65f7e 100644 --- a/src/elevenlabs/types/client_event.py +++ b/src/elevenlabs/types/client_event.py @@ -10,6 +10,7 @@ "audio", "interruption", "user_transcript", + "tentative_user_transcript", "agent_response", "agent_response_correction", "client_tool_call", diff --git a/src/elevenlabs/types/features_usage_common_model.py b/src/elevenlabs/types/features_usage_common_model.py index 06b4f7dd..0ef0a32f 100644 --- a/src/elevenlabs/types/features_usage_common_model.py +++ b/src/elevenlabs/types/features_usage_common_model.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .feature_status_common_model import FeatureStatusCommonModel +from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel @@ -22,6 +23,7 @@ class FeaturesUsageCommonModel(UncheckedBaseModel): is_livekit: typing.Optional[bool] = None voicemail_detection: typing.Optional[FeatureStatusCommonModel] = None workflow: typing.Optional[WorkflowFeaturesUsageCommonModel] = None + agent_testing: typing.Optional[TestsFeatureUsageCommonModel] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/tests_feature_usage_common_model.py b/src/elevenlabs/types/tests_feature_usage_common_model.py new file mode 100644 index 00000000..aabb91ae --- /dev/null +++ b/src/elevenlabs/types/tests_feature_usage_common_model.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TestsFeatureUsageCommonModel(UncheckedBaseModel): + enabled: typing.Optional[bool] = None + tests_ran_after_last_modification: typing.Optional[bool] = None + tests_ran_in_last_7_days: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py index bc1ecde5..47eb234d 100644 --- a/src/elevenlabs/types/unit_test_run_response_model.py +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -20,6 +20,7 @@ class UnitTestRunResponseModel(UncheckedBaseModel): agent_responses: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutput]] = None test_id: str condition_result: typing.Optional[TestConditionResultCommonModel] = None + last_updated_at_unix: typing.Optional[int] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 From 01da8923ce49b0285e71e0542800896dd3844f97 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 12:33:40 +0200 Subject: [PATCH 11/34] SDK regeneration (#617) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 86 +++---------- src/elevenlabs/__init__.py | 4 +- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/dubbing/resource/client.py | 20 ++- src/elevenlabs/dubbing/resource/raw_client.py | 14 +++ .../text_to_sound_effects/client.py | 10 ++ .../text_to_sound_effects/raw_client.py | 10 ++ src/elevenlabs/types/__init__.py | 4 +- .../types/agent_metadata_response_model.py | 5 + .../delete_workspace_member_response_model.py | 23 ---- src/elevenlabs/types/invoice_response.py | 6 + ...ce_response_model_payment_intent_status.py | 16 +++ src/elevenlabs/types/subscription.py | 5 + .../tts_conversational_config_override.py | 15 +++ ...s_conversational_config_override_config.py | 15 +++ src/elevenlabs/types/voice.py | 5 + .../types/voice_preview_response_model.py | 5 + src/elevenlabs/workspace/members/client.py | 75 ------------ .../workspace/members/raw_client.py | 115 ------------------ 20 files changed, 147 insertions(+), 292 deletions(-) delete mode 100644 src/elevenlabs/types/delete_workspace_member_response_model.py create mode 100644 src/elevenlabs/types/invoice_response_model_payment_intent_status.py diff --git a/pyproject.toml b/pyproject.toml index 13440487..12a62213 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.12.1" +version = "v2.13.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 5868a149..88728660 100644 --- a/reference.md +++ b/reference.md @@ -367,6 +367,14 @@ client.text_to_sound_effects.convert(
+**loop:** `typing.Optional[bool]` — Whether to create a sound effect that loops smoothly. + +
+
+ +
+
+ **duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None.
@@ -11968,6 +11976,14 @@ client.dubbing.resource.render(
+**should_normalize_volume:** `typing.Optional[bool]` — Whether to normalize the volume of the rendered audio. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -17008,76 +17024,6 @@ client.workspace.members.update(
- -
-
- -
client.workspace.members.delete(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a workspace member. This endpoint may only be called by workspace administrators. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.workspace.members.delete( - email="email", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**email:** `str` — Email of the target user. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- -
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index a25d3849..6600b669 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -231,7 +231,6 @@ DeleteVoiceSampleResponseModel, DeleteWorkspaceGroupMemberResponseModel, DeleteWorkspaceInviteResponseModel, - DeleteWorkspaceMemberResponseModel, DependentAvailableAgentIdentifier, DependentAvailableAgentIdentifierAccessLevel, DependentAvailableToolIdentifier, @@ -378,6 +377,7 @@ InitializeConnectionMulti, IntegrationType, InvoiceResponse, + InvoiceResponseModelPaymentIntentStatus, KeepContextAlive, KnowledgeBaseDocumentChunkResponseModel, KnowledgeBaseDocumentMetadataResponseModel, @@ -1115,7 +1115,6 @@ "DeleteVoiceSampleResponseModel", "DeleteWorkspaceGroupMemberResponseModel", "DeleteWorkspaceInviteResponseModel", - "DeleteWorkspaceMemberResponseModel", "DependentAvailableAgentIdentifier", "DependentAvailableAgentIdentifierAccessLevel", "DependentAvailableToolIdentifier", @@ -1268,6 +1267,7 @@ "InitializeConnectionMulti", "IntegrationType", "InvoiceResponse", + "InvoiceResponseModelPaymentIntentStatus", "KeepContextAlive", "KnowledgeBaseDocumentChunkResponseModel", "KnowledgeBaseDocumentMetadataResponseModel", diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 905074d5..6a01caf9 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.12.1", + "User-Agent": "elevenlabs/v2.13.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.12.1", + "X-Fern-SDK-Version": "v2.13.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/dubbing/resource/client.py b/src/elevenlabs/dubbing/resource/client.py index d9d99e18..94f8c650 100644 --- a/src/elevenlabs/dubbing/resource/client.py +++ b/src/elevenlabs/dubbing/resource/client.py @@ -211,6 +211,7 @@ def render( language: str, *, render_type: RenderType, + should_normalize_volume: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingRenderResponseModel: """ @@ -227,6 +228,9 @@ def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + should_normalize_volume : typing.Optional[bool] + Whether to normalize the volume of the rendered audio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -249,7 +253,11 @@ def render( ) """ _response = self._raw_client.render( - dubbing_id, language, render_type=render_type, request_options=request_options + dubbing_id, + language, + render_type=render_type, + should_normalize_volume=should_normalize_volume, + request_options=request_options, ) return _response.data @@ -478,6 +486,7 @@ async def render( language: str, *, render_type: RenderType, + should_normalize_volume: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingRenderResponseModel: """ @@ -494,6 +503,9 @@ async def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + should_normalize_volume : typing.Optional[bool] + Whether to normalize the volume of the rendered audio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -524,6 +536,10 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.render( - dubbing_id, language, render_type=render_type, request_options=request_options + dubbing_id, + language, + render_type=render_type, + should_normalize_volume=should_normalize_volume, + request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/dubbing/resource/raw_client.py b/src/elevenlabs/dubbing/resource/raw_client.py index 74d9651b..0d6fa981 100644 --- a/src/elevenlabs/dubbing/resource/raw_client.py +++ b/src/elevenlabs/dubbing/resource/raw_client.py @@ -284,6 +284,7 @@ def render( language: str, *, render_type: RenderType, + should_normalize_volume: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DubbingRenderResponseModel]: """ @@ -300,6 +301,9 @@ def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + should_normalize_volume : typing.Optional[bool] + Whether to normalize the volume of the rendered audio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -311,6 +315,9 @@ def render( _response = self._client_wrapper.httpx_client.request( f"v1/dubbing/resource/{jsonable_encoder(dubbing_id)}/render/{jsonable_encoder(language)}", method="POST", + params={ + "should_normalize_volume": should_normalize_volume, + }, json={ "render_type": render_type, }, @@ -609,6 +616,7 @@ async def render( language: str, *, render_type: RenderType, + should_normalize_volume: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DubbingRenderResponseModel]: """ @@ -625,6 +633,9 @@ async def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + should_normalize_volume : typing.Optional[bool] + Whether to normalize the volume of the rendered audio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -636,6 +647,9 @@ async def render( _response = await self._client_wrapper.httpx_client.request( f"v1/dubbing/resource/{jsonable_encoder(dubbing_id)}/render/{jsonable_encoder(language)}", method="POST", + params={ + "should_normalize_volume": should_normalize_volume, + }, json={ "render_type": render_type, }, diff --git a/src/elevenlabs/text_to_sound_effects/client.py b/src/elevenlabs/text_to_sound_effects/client.py index 1a9185a7..5d30bfe2 100644 --- a/src/elevenlabs/text_to_sound_effects/client.py +++ b/src/elevenlabs/text_to_sound_effects/client.py @@ -31,6 +31,7 @@ def convert( *, text: str, output_format: typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] = None, + loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -46,6 +47,9 @@ def convert( output_format : typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + loop : typing.Optional[bool] + Whether to create a sound effect that loops smoothly. + duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -74,6 +78,7 @@ def convert( with self._raw_client.convert( text=text, output_format=output_format, + loop=loop, duration_seconds=duration_seconds, prompt_influence=prompt_influence, request_options=request_options, @@ -101,6 +106,7 @@ async def convert( *, text: str, output_format: typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] = None, + loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -116,6 +122,9 @@ async def convert( output_format : typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + loop : typing.Optional[bool] + Whether to create a sound effect that loops smoothly. + duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -152,6 +161,7 @@ async def main() -> None: async with self._raw_client.convert( text=text, output_format=output_format, + loop=loop, duration_seconds=duration_seconds, prompt_influence=prompt_influence, request_options=request_options, diff --git a/src/elevenlabs/text_to_sound_effects/raw_client.py b/src/elevenlabs/text_to_sound_effects/raw_client.py index a05388f5..34c3bd64 100644 --- a/src/elevenlabs/text_to_sound_effects/raw_client.py +++ b/src/elevenlabs/text_to_sound_effects/raw_client.py @@ -27,6 +27,7 @@ def convert( *, text: str, output_format: typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] = None, + loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -42,6 +43,9 @@ def convert( output_format : typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + loop : typing.Optional[bool] + Whether to create a sound effect that loops smoothly. + duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -64,6 +68,7 @@ def convert( }, json={ "text": text, + "loop": loop, "duration_seconds": duration_seconds, "prompt_influence": prompt_influence, }, @@ -113,6 +118,7 @@ async def convert( *, text: str, output_format: typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] = None, + loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -128,6 +134,9 @@ async def convert( output_format : typing.Optional[TextToSoundEffectsConvertRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + loop : typing.Optional[bool] + Whether to create a sound effect that loops smoothly. + duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -150,6 +159,7 @@ async def convert( }, json={ "text": text, + "loop": loop, "duration_seconds": duration_seconds, "prompt_influence": prompt_influence, }, diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index da109c98..aa668d79 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -282,7 +282,6 @@ from .delete_voice_sample_response_model import DeleteVoiceSampleResponseModel from .delete_workspace_group_member_response_model import DeleteWorkspaceGroupMemberResponseModel from .delete_workspace_invite_response_model import DeleteWorkspaceInviteResponseModel -from .delete_workspace_member_response_model import DeleteWorkspaceMemberResponseModel from .dependent_available_agent_identifier import DependentAvailableAgentIdentifier from .dependent_available_agent_identifier_access_level import DependentAvailableAgentIdentifierAccessLevel from .dependent_available_tool_identifier import DependentAvailableToolIdentifier @@ -453,6 +452,7 @@ from .initialize_connection_multi import InitializeConnectionMulti from .integration_type import IntegrationType from .invoice_response import InvoiceResponse +from .invoice_response_model_payment_intent_status import InvoiceResponseModelPaymentIntentStatus from .keep_context_alive import KeepContextAlive from .knowledge_base_document_chunk_response_model import KnowledgeBaseDocumentChunkResponseModel from .knowledge_base_document_metadata_response_model import KnowledgeBaseDocumentMetadataResponseModel @@ -1111,7 +1111,6 @@ "DeleteVoiceSampleResponseModel", "DeleteWorkspaceGroupMemberResponseModel", "DeleteWorkspaceInviteResponseModel", - "DeleteWorkspaceMemberResponseModel", "DependentAvailableAgentIdentifier", "DependentAvailableAgentIdentifierAccessLevel", "DependentAvailableToolIdentifier", @@ -1258,6 +1257,7 @@ "InitializeConnectionMulti", "IntegrationType", "InvoiceResponse", + "InvoiceResponseModelPaymentIntentStatus", "KeepContextAlive", "KnowledgeBaseDocumentChunkResponseModel", "KnowledgeBaseDocumentMetadataResponseModel", diff --git a/src/elevenlabs/types/agent_metadata_response_model.py b/src/elevenlabs/types/agent_metadata_response_model.py index 8a2ff5b9..8ed3bcf9 100644 --- a/src/elevenlabs/types/agent_metadata_response_model.py +++ b/src/elevenlabs/types/agent_metadata_response_model.py @@ -13,6 +13,11 @@ class AgentMetadataResponseModel(UncheckedBaseModel): The creation time of the agent in unix seconds """ + updated_at_unix_secs: int = pydantic.Field() + """ + The last update time of the agent in unix seconds + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/delete_workspace_member_response_model.py b/src/elevenlabs/types/delete_workspace_member_response_model.py deleted file mode 100644 index 41044c5f..00000000 --- a/src/elevenlabs/types/delete_workspace_member_response_model.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class DeleteWorkspaceMemberResponseModel(UncheckedBaseModel): - status: str = pydantic.Field() - """ - The status of the workspace member deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/invoice_response.py b/src/elevenlabs/types/invoice_response.py index a2e6eecd..8a57cea9 100644 --- a/src/elevenlabs/types/invoice_response.py +++ b/src/elevenlabs/types/invoice_response.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .invoice_response_model_payment_intent_status import InvoiceResponseModelPaymentIntentStatus class InvoiceResponse(UncheckedBaseModel): @@ -28,6 +29,11 @@ class InvoiceResponse(UncheckedBaseModel): The Unix timestamp of the next payment attempt. """ + payment_intent_status: typing.Optional[InvoiceResponseModelPaymentIntentStatus] = pydantic.Field(default=None) + """ + The status of this invoice's payment intent. None when there is no payment intent. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/invoice_response_model_payment_intent_status.py b/src/elevenlabs/types/invoice_response_model_payment_intent_status.py new file mode 100644 index 00000000..316ced78 --- /dev/null +++ b/src/elevenlabs/types/invoice_response_model_payment_intent_status.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InvoiceResponseModelPaymentIntentStatus = typing.Union[ + typing.Literal[ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded", + ], + typing.Any, +] diff --git a/src/elevenlabs/types/subscription.py b/src/elevenlabs/types/subscription.py index d2b6dca4..7a72b78d 100644 --- a/src/elevenlabs/types/subscription.py +++ b/src/elevenlabs/types/subscription.py @@ -123,6 +123,11 @@ class Subscription(UncheckedBaseModel): The next invoice for the user. """ + open_invoices: typing.List[InvoiceResponse] = pydantic.Field() + """ + The open invoices for the user. + """ + has_open_invoices: bool = pydantic.Field() """ Whether the user has open invoices. diff --git a/src/elevenlabs/types/tts_conversational_config_override.py b/src/elevenlabs/types/tts_conversational_config_override.py index ab8af519..faf6ff30 100644 --- a/src/elevenlabs/types/tts_conversational_config_override.py +++ b/src/elevenlabs/types/tts_conversational_config_override.py @@ -13,6 +13,21 @@ class TtsConversationalConfigOverride(UncheckedBaseModel): The voice ID to use for TTS """ + stability: typing.Optional[float] = pydantic.Field(default=None) + """ + The stability of generated speech + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + The speed of generated speech + """ + + similarity_boost: typing.Optional[float] = pydantic.Field(default=None) + """ + The similarity boost for generated speech + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/tts_conversational_config_override_config.py b/src/elevenlabs/types/tts_conversational_config_override_config.py index 2643f7f9..5c311017 100644 --- a/src/elevenlabs/types/tts_conversational_config_override_config.py +++ b/src/elevenlabs/types/tts_conversational_config_override_config.py @@ -13,6 +13,21 @@ class TtsConversationalConfigOverrideConfig(UncheckedBaseModel): Whether to allow overriding the voice_id field. """ + stability: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to allow overriding the stability field. + """ + + speed: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to allow overriding the speed field. + """ + + similarity_boost: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to allow overriding the similarity_boost field. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/voice.py b/src/elevenlabs/types/voice.py index 08a8d0a4..75c7e0d7 100644 --- a/src/elevenlabs/types/voice.py +++ b/src/elevenlabs/types/voice.py @@ -111,6 +111,11 @@ class Voice(UncheckedBaseModel): Whether the voice is mixed. """ + favorited_at_unix: typing.Optional[int] = pydantic.Field(default=None) + """ + Timestamp when the voice was marked as favorite in Unix time. + """ + created_at_unix: typing.Optional[int] = pydantic.Field(default=None) """ The creation time of the voice in Unix time. diff --git a/src/elevenlabs/types/voice_preview_response_model.py b/src/elevenlabs/types/voice_preview_response_model.py index 26e83522..03af0015 100644 --- a/src/elevenlabs/types/voice_preview_response_model.py +++ b/src/elevenlabs/types/voice_preview_response_model.py @@ -28,6 +28,11 @@ class VoicePreviewResponseModel(UncheckedBaseModel): The duration of the preview in seconds. """ + language: typing.Optional[str] = pydantic.Field(default=None) + """ + The language of the preview. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/workspace/members/client.py b/src/elevenlabs/workspace/members/client.py index 977ca987..f0bc6db5 100644 --- a/src/elevenlabs/workspace/members/client.py +++ b/src/elevenlabs/workspace/members/client.py @@ -4,7 +4,6 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions -from ...types.delete_workspace_member_response_model import DeleteWorkspaceMemberResponseModel from ...types.update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel from .raw_client import AsyncRawMembersClient, RawMembersClient from .types.body_update_member_v_1_workspace_members_post_workspace_role import ( @@ -76,39 +75,6 @@ def update( ) return _response.data - def delete( - self, *, email: str, request_options: typing.Optional[RequestOptions] = None - ) -> DeleteWorkspaceMemberResponseModel: - """ - Deletes a workspace member. This endpoint may only be called by workspace administrators. - - Parameters - ---------- - email : str - Email of the target user. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - DeleteWorkspaceMemberResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.workspace.members.delete( - email="email", - ) - """ - _response = self._raw_client.delete(email=email, request_options=request_options) - return _response.data - class AsyncMembersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -178,44 +144,3 @@ async def main() -> None: email=email, is_locked=is_locked, workspace_role=workspace_role, request_options=request_options ) return _response.data - - async def delete( - self, *, email: str, request_options: typing.Optional[RequestOptions] = None - ) -> DeleteWorkspaceMemberResponseModel: - """ - Deletes a workspace member. This endpoint may only be called by workspace administrators. - - Parameters - ---------- - email : str - Email of the target user. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - DeleteWorkspaceMemberResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workspace.members.delete( - email="email", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete(email=email, request_options=request_options) - return _response.data diff --git a/src/elevenlabs/workspace/members/raw_client.py b/src/elevenlabs/workspace/members/raw_client.py index 33487307..869788ee 100644 --- a/src/elevenlabs/workspace/members/raw_client.py +++ b/src/elevenlabs/workspace/members/raw_client.py @@ -9,7 +9,6 @@ from ...core.request_options import RequestOptions from ...core.unchecked_base_model import construct_type from ...errors.unprocessable_entity_error import UnprocessableEntityError -from ...types.delete_workspace_member_response_model import DeleteWorkspaceMemberResponseModel from ...types.http_validation_error import HttpValidationError from ...types.update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel from .types.body_update_member_v_1_workspace_members_post_workspace_role import ( @@ -94,63 +93,6 @@ def update( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def delete( - self, *, email: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[DeleteWorkspaceMemberResponseModel]: - """ - Deletes a workspace member. This endpoint may only be called by workspace administrators. - - Parameters - ---------- - email : str - Email of the target user. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[DeleteWorkspaceMemberResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/workspace/members", - method="DELETE", - json={ - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - DeleteWorkspaceMemberResponseModel, - construct_type( - type_=DeleteWorkspaceMemberResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - class AsyncRawMembersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -225,60 +167,3 @@ async def update( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def delete( - self, *, email: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[DeleteWorkspaceMemberResponseModel]: - """ - Deletes a workspace member. This endpoint may only be called by workspace administrators. - - Parameters - ---------- - email : str - Email of the target user. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[DeleteWorkspaceMemberResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/workspace/members", - method="DELETE", - json={ - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - DeleteWorkspaceMemberResponseModel, - construct_type( - type_=DeleteWorkspaceMemberResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) From 283cb07a672ad77de02a9d0286f037614bb11176 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 19:18:44 +0200 Subject: [PATCH 12/34] SDK regeneration (#621) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 145 ++++++++++++++- src/elevenlabs/__init__.py | 125 ++++++++++++- .../conversational_ai/conversations/client.py | 26 ++- .../conversations/raw_client.py | 20 ++- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/errors/__init__.py | 10 +- src/elevenlabs/errors/unauthorized_error.py | 10 ++ src/elevenlabs/speech_to_text/__init__.py | 4 + src/elevenlabs/speech_to_text/client.py | 7 +- src/elevenlabs/speech_to_text/raw_client.py | 4 +- .../speech_to_text/transcripts/__init__.py | 7 + .../speech_to_text/transcripts/client.py | 114 ++++++++++++ .../speech_to_text/transcripts/raw_client.py | 170 ++++++++++++++++++ .../transcripts/types/__init__.py | 7 + .../types/transcripts_get_response.py | 8 + src/elevenlabs/studio/projects/client.py | 22 ++- src/elevenlabs/studio/projects/raw_client.py | 24 ++- src/elevenlabs/text_to_dialogue/__init__.py | 14 +- src/elevenlabs/text_to_dialogue/client.py | 54 ++++++ src/elevenlabs/text_to_dialogue/raw_client.py | 54 ++++++ .../text_to_dialogue/types/__init__.py | 13 +- ...ue_stream_post_apply_text_normalization.py | 7 + ..._dialogue_post_apply_text_normalization.py | 7 + .../text_to_sound_effects/client.py | 18 +- .../text_to_sound_effects/raw_client.py | 18 +- src/elevenlabs/text_to_speech/client.py | 16 +- src/elevenlabs/text_to_speech/raw_client.py | 16 +- src/elevenlabs/types/__init__.py | 120 +++++++++++++ ..._config_override_for_test_request_model.py | 4 + ...gent_config_api_model_workflow_override.py | 48 +++++ .../types/agent_workflow_request_model.py | 23 +++ ...gent_workflow_request_model_nodes_value.py | 130 ++++++++++++++ ...conversational_config_workflow_override.py | 41 +++++ .../types/built_in_tools_workflow_override.py | 54 ++++++ .../types/caption_style_template_model.py | 1 + .../conversation_config_workflow_override.py | 34 ++++ ...sation_history_multivoice_message_model.py | 25 +++ ...n_history_multivoice_message_part_model.py | 26 +++ ...n_history_transcript_common_model_input.py | 2 + ..._history_transcript_common_model_output.py | 2 + ...onal_config_api_model_workflow_override.py | 64 +++++++ .../types/dubbing_release_channel.py | 5 + ...amic_variables_config_workflow_override.py | 28 +++ ...ide_dynamic_variable_placeholders_value.py | 5 + ...tichannel_speech_to_text_response_model.py | 5 + src/elevenlabs/types/position.py | 21 +++ .../types/project_extended_response.py | 5 + src/elevenlabs/types/project_response.py | 5 + ...rompt_agent_api_model_workflow_override.py | 102 +++++++++++ ..._api_model_workflow_override_tools_item.py | 118 ++++++++++++ .../types/rag_config_workflow_override.py | 36 ++++ .../types/resource_metadata_response_model.py | 10 ++ ...e_model_anonymous_access_level_override.py | 7 + .../types/single_test_run_request_model.py | 5 + .../types/speech_history_item_response.py | 2 +- .../speech_to_text_chunk_response_model.py | 5 + .../speech_to_text_webhook_response_model.py | 5 + src/elevenlabs/types/test_run_metadata.py | 24 +++ .../types/test_run_metadata_test_type.py | 5 + ...conversational_config_workflow_override.py | 70 ++++++++ .../types/turn_config_workflow_override.py | 34 ++++ .../types/unit_test_run_response_model.py | 3 + src/elevenlabs/types/workflow_edge_model.py | 32 ++++ .../workflow_edge_model_backward_condition.py | 64 +++++++ .../workflow_edge_model_forward_condition.py | 64 +++++++ .../types/workflow_end_node_model.py | 24 +++ .../types/workflow_llm_condition_model.py | 21 +++ .../workflow_override_agent_node_model.py | 40 +++++ .../types/workflow_phone_number_node_model.py | 29 +++ ..._number_node_model_transfer_destination.py | 46 +++++ .../types/workflow_result_condition_model.py | 21 +++ .../workflow_standalone_agent_node_model.py | 29 +++ .../types/workflow_start_node_model.py | 24 +++ src/elevenlabs/types/workflow_tool_locator.py | 20 +++ .../types/workflow_tool_node_model.py | 27 +++ .../types/workflow_unconditional_model.py | 20 +++ 77 files changed, 2404 insertions(+), 57 deletions(-) create mode 100644 src/elevenlabs/errors/unauthorized_error.py create mode 100644 src/elevenlabs/speech_to_text/transcripts/__init__.py create mode 100644 src/elevenlabs/speech_to_text/transcripts/client.py create mode 100644 src/elevenlabs/speech_to_text/transcripts/raw_client.py create mode 100644 src/elevenlabs/speech_to_text/transcripts/types/__init__.py create mode 100644 src/elevenlabs/speech_to_text/transcripts/types/transcripts_get_response.py create mode 100644 src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization.py create mode 100644 src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization.py create mode 100644 src/elevenlabs/types/agent_config_api_model_workflow_override.py create mode 100644 src/elevenlabs/types/agent_workflow_request_model.py create mode 100644 src/elevenlabs/types/agent_workflow_request_model_nodes_value.py create mode 100644 src/elevenlabs/types/asr_conversational_config_workflow_override.py create mode 100644 src/elevenlabs/types/built_in_tools_workflow_override.py create mode 100644 src/elevenlabs/types/conversation_config_workflow_override.py create mode 100644 src/elevenlabs/types/conversation_history_multivoice_message_model.py create mode 100644 src/elevenlabs/types/conversation_history_multivoice_message_part_model.py create mode 100644 src/elevenlabs/types/conversational_config_api_model_workflow_override.py create mode 100644 src/elevenlabs/types/dubbing_release_channel.py create mode 100644 src/elevenlabs/types/dynamic_variables_config_workflow_override.py create mode 100644 src/elevenlabs/types/dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value.py create mode 100644 src/elevenlabs/types/position.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py create mode 100644 src/elevenlabs/types/rag_config_workflow_override.py create mode 100644 src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py create mode 100644 src/elevenlabs/types/test_run_metadata.py create mode 100644 src/elevenlabs/types/test_run_metadata_test_type.py create mode 100644 src/elevenlabs/types/tts_conversational_config_workflow_override.py create mode 100644 src/elevenlabs/types/turn_config_workflow_override.py create mode 100644 src/elevenlabs/types/workflow_edge_model.py create mode 100644 src/elevenlabs/types/workflow_edge_model_backward_condition.py create mode 100644 src/elevenlabs/types/workflow_edge_model_forward_condition.py create mode 100644 src/elevenlabs/types/workflow_end_node_model.py create mode 100644 src/elevenlabs/types/workflow_llm_condition_model.py create mode 100644 src/elevenlabs/types/workflow_override_agent_node_model.py create mode 100644 src/elevenlabs/types/workflow_phone_number_node_model.py create mode 100644 src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py create mode 100644 src/elevenlabs/types/workflow_result_condition_model.py create mode 100644 src/elevenlabs/types/workflow_standalone_agent_node_model.py create mode 100644 src/elevenlabs/types/workflow_start_node_model.py create mode 100644 src/elevenlabs/types/workflow_tool_locator.py create mode 100644 src/elevenlabs/types/workflow_tool_node_model.py create mode 100644 src/elevenlabs/types/workflow_unconditional_model.py diff --git a/pyproject.toml b/pyproject.toml index 12a62213..9defd7a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.13.0" +version = "v2.14.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 88728660..af1106f9 100644 --- a/reference.md +++ b/reference.md @@ -313,7 +313,7 @@ client.history.delete(
-Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. +Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world.
@@ -367,7 +367,7 @@ client.text_to_sound_effects.convert(
-**loop:** `typing.Optional[bool]` — Whether to create a sound effect that loops smoothly. +**loop:** `typing.Optional[bool]` — Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'.
@@ -391,6 +391,14 @@ client.text_to_sound_effects.convert(
+**model_id:** `typing.Optional[str]` — The model ID to use for the sound generation. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -595,7 +603,7 @@ Defaults to None.
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned.
@@ -803,7 +811,7 @@ Defaults to None.
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned.
@@ -1015,7 +1023,7 @@ Defaults to None.
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned.
@@ -1229,7 +1237,7 @@ Defaults to None.
-**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned.
@@ -1415,6 +1423,14 @@ client.text_to_dialogue.convert(
+**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + +
+
+ +
+
+ **settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation.
@@ -1439,6 +1455,16 @@ client.text_to_dialogue.convert(
+**apply_text_normalization:** `typing.Optional[ + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1534,6 +1560,14 @@ client.text_to_dialogue.stream(
+**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + +
+
+ +
+
+ **settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation.
@@ -1558,6 +1592,16 @@ client.text_to_dialogue.stream(
+**apply_text_normalization:** `typing.Optional[ + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization +]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -5058,7 +5102,7 @@ client.speech_to_text.convert(
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers.
@@ -5749,6 +5793,14 @@ client.conversational_ai.conversations.get_signed_url(
+**include_conversation_id:** `typing.Optional[bool]` — Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13267,6 +13319,77 @@ client.service_accounts.api_keys.update(
+ +
+
+ +## SpeechToText Transcripts +
client.speech_to_text.transcripts.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a previously generated transcript by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.speech_to_text.transcripts.get( + transcription_id="transcription_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transcription_id:** `str` — The unique ID of the transcript to retrieve + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -13746,6 +13869,14 @@ client.studio.projects.get(
+**share_id:** `typing.Optional[str]` — The share ID of the project + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 6600b669..ebf25b60 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -20,6 +20,7 @@ Age, AgentCallLimits, AgentConfig, + AgentConfigApiModelWorkflowOverride, AgentConfigOverride, AgentConfigOverrideConfig, AgentFailureResponseExample, @@ -31,6 +32,14 @@ AgentSummaryResponseModel, AgentTestingSettings, AgentTransfer, + AgentWorkflowRequestModel, + AgentWorkflowRequestModelNodesValue, + AgentWorkflowRequestModelNodesValue_End, + AgentWorkflowRequestModelNodesValue_OverrideAgent, + AgentWorkflowRequestModelNodesValue_PhoneNumber, + AgentWorkflowRequestModelNodesValue_StandaloneAgent, + AgentWorkflowRequestModelNodesValue_Start, + AgentWorkflowRequestModelNodesValue_Tool, AgentWorkspaceOverridesInput, AgentWorkspaceOverridesOutput, Alignment, @@ -40,6 +49,7 @@ ArrayJsonSchemaPropertyOutput, ArrayJsonSchemaPropertyOutputItems, AsrConversationalConfig, + AsrConversationalConfigWorkflowOverride, AsrInputFormat, AsrProvider, AsrQuality, @@ -65,6 +75,7 @@ BreakdownTypes, BuiltInToolsInput, BuiltInToolsOutput, + BuiltInToolsWorkflowOverride, CaptionStyleCharacterAnimationModel, CaptionStyleCharacterAnimationModelEnterType, CaptionStyleCharacterAnimationModelExitType, @@ -131,6 +142,7 @@ ConversationConfigClientOverrideOutput, ConversationConfigOverride, ConversationConfigOverrideConfig, + ConversationConfigWorkflowOverride, ConversationDeletionSettings, ConversationHistoryAnalysisCommonModel, ConversationHistoryBatchCallModel, @@ -142,6 +154,8 @@ ConversationHistoryMetadataCommonModelPhoneCall, ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, ConversationHistoryMetadataCommonModelPhoneCall_Twilio, + ConversationHistoryMultivoiceMessageModel, + ConversationHistoryMultivoiceMessagePartModel, ConversationHistoryRagUsageCommonModel, ConversationHistorySipTrunkingPhoneCallModel, ConversationHistorySipTrunkingPhoneCallModelDirection, @@ -203,6 +217,7 @@ ConversationTokenPurpose, ConversationTurnMetrics, ConversationalConfig, + ConversationalConfigApiModelWorkflowOverride, ConvertChapterResponseModel, ConvertProjectResponseModel, CreateAgentResponseModel, @@ -249,12 +264,15 @@ DubbingMediaReference, DubbingMetadataPageResponseModel, DubbingMetadataResponse, + DubbingReleaseChannel, DubbingRenderResponseModel, DubbingResource, DynamicVariableAssignment, DynamicVariableUpdateCommonModel, DynamicVariablesConfig, DynamicVariablesConfigDynamicVariablePlaceholdersValue, + DynamicVariablesConfigWorkflowOverride, + DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, EditChapterResponseModel, EditProjectResponseModel, EditVoiceResponseModel, @@ -467,6 +485,7 @@ PodcastProjectResponseModel, PodcastTextSource, PodcastUrlSource, + Position, PostAgentAvatarResponseModel, PostWorkspaceSecretResponseModel, PrivacyConfig, @@ -504,6 +523,12 @@ PromptAgentApiModelOutputToolsItem_Webhook, PromptAgentApiModelOverride, PromptAgentApiModelOverrideConfig, + PromptAgentApiModelWorkflowOverride, + PromptAgentApiModelWorkflowOverrideToolsItem, + PromptAgentApiModelWorkflowOverrideToolsItem_Client, + PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideToolsItem_System, + PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, PromptAgentDbModel, PromptEvaluationCriteria, PronunciationDictionaryAliasRuleRequestModel, @@ -518,6 +543,7 @@ QueryParamsJsonSchema, RagChunkMetadata, RagConfig, + RagConfigWorkflowOverride, RagDocumentIndexResponseModel, RagDocumentIndexUsage, RagDocumentIndexesResponseModel, @@ -539,6 +565,7 @@ ResourceAccessInfo, ResourceAccessInfoRole, ResourceMetadataResponseModel, + ResourceMetadataResponseModelAnonymousAccessLevelOverride, ReviewStatus, SafetyCommonModel, SafetyEvaluation, @@ -620,6 +647,8 @@ TelephonyProvider, TestConditionRationaleCommonModel, TestConditionResultCommonModel, + TestRunMetadata, + TestRunMetadataTestType, TestRunStatus, TestToolResultModel, TestsFeatureUsageCommonModel, @@ -658,11 +687,13 @@ TtsConversationalConfigOutput, TtsConversationalConfigOverride, TtsConversationalConfigOverrideConfig, + TtsConversationalConfigWorkflowOverride, TtsConversationalModel, TtsModelFamily, TtsOptimizeStreamingLatency, TtsOutputFormat, TurnConfig, + TurnConfigWorkflowOverride, TurnMode, TwilioOutboundCallResponse, TxtExportOptions, @@ -743,13 +774,34 @@ WidgetPlacement, WidgetStyles, WidgetTextContents, + WorkflowEdgeModel, + WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Llm, + WorkflowEdgeModelBackwardCondition_Result, + WorkflowEdgeModelBackwardCondition_Unconditional, + WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Llm, + WorkflowEdgeModelForwardCondition_Result, + WorkflowEdgeModelForwardCondition_Unconditional, + WorkflowEndNodeModel, WorkflowFeaturesUsageCommonModel, + WorkflowLlmConditionModel, + WorkflowOverrideAgentNodeModel, + WorkflowPhoneNumberNodeModel, + WorkflowPhoneNumberNodeModelTransferDestination, + WorkflowPhoneNumberNodeModelTransferDestination_Phone, + WorkflowPhoneNumberNodeModelTransferDestination_SipUri, + WorkflowResultConditionModel, + WorkflowStandaloneAgentNodeModel, + WorkflowStartNodeModel, WorkflowToolEdgeStepModel, + WorkflowToolLocator, WorkflowToolMaxIterationsExceededStepModel, WorkflowToolNestedToolsStepModelInput, WorkflowToolNestedToolsStepModelInputResultsItem, WorkflowToolNestedToolsStepModelOutput, WorkflowToolNestedToolsStepModelOutputResultsItem, + WorkflowToolNodeModel, WorkflowToolResponseModelInput, WorkflowToolResponseModelInputStepsItem, WorkflowToolResponseModelInputStepsItem_Edge, @@ -760,6 +812,7 @@ WorkflowToolResponseModelOutputStepsItem_Edge, WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, WorkflowToolResponseModelOutputStepsItem_NestedTools, + WorkflowUnconditionalModel, WorkspaceApiKeyListResponseModel, WorkspaceApiKeyResponseModel, WorkspaceApiKeyResponseModelPermissionsItem, @@ -773,7 +826,14 @@ WorkspaceWebhookResponseModel, WorkspaceWebhookUsageResponseModel, ) -from .errors import BadRequestError, ForbiddenError, NotFoundError, TooEarlyError, UnprocessableEntityError +from .errors import ( + BadRequestError, + ForbiddenError, + NotFoundError, + TooEarlyError, + UnauthorizedError, + UnprocessableEntityError, +) from . import ( audio_isolation, audio_native, @@ -843,7 +903,12 @@ BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, ) -from .text_to_dialogue import TextToDialogueConvertRequestOutputFormat, TextToDialogueStreamRequestOutputFormat +from .text_to_dialogue import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + TextToDialogueConvertRequestOutputFormat, + TextToDialogueStreamRequestOutputFormat, +) from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat from .text_to_speech import ( BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, @@ -883,6 +948,7 @@ "Age", "AgentCallLimits", "AgentConfig", + "AgentConfigApiModelWorkflowOverride", "AgentConfigOverride", "AgentConfigOverrideConfig", "AgentFailureResponseExample", @@ -894,6 +960,14 @@ "AgentSummaryResponseModel", "AgentTestingSettings", "AgentTransfer", + "AgentWorkflowRequestModel", + "AgentWorkflowRequestModelNodesValue", + "AgentWorkflowRequestModelNodesValue_End", + "AgentWorkflowRequestModelNodesValue_OverrideAgent", + "AgentWorkflowRequestModelNodesValue_PhoneNumber", + "AgentWorkflowRequestModelNodesValue_StandaloneAgent", + "AgentWorkflowRequestModelNodesValue_Start", + "AgentWorkflowRequestModelNodesValue_Tool", "AgentWorkspaceOverridesInput", "AgentWorkspaceOverridesOutput", "Alignment", @@ -903,6 +977,7 @@ "ArrayJsonSchemaPropertyOutput", "ArrayJsonSchemaPropertyOutputItems", "AsrConversationalConfig", + "AsrConversationalConfigWorkflowOverride", "AsrInputFormat", "AsrProvider", "AsrQuality", @@ -942,6 +1017,8 @@ "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", @@ -949,6 +1026,7 @@ "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", + "BuiltInToolsWorkflowOverride", "CaptionStyleCharacterAnimationModel", "CaptionStyleCharacterAnimationModelEnterType", "CaptionStyleCharacterAnimationModelExitType", @@ -1015,6 +1093,7 @@ "ConversationConfigClientOverrideOutput", "ConversationConfigOverride", "ConversationConfigOverrideConfig", + "ConversationConfigWorkflowOverride", "ConversationDeletionSettings", "ConversationHistoryAnalysisCommonModel", "ConversationHistoryBatchCallModel", @@ -1026,6 +1105,8 @@ "ConversationHistoryMetadataCommonModelPhoneCall", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio", + "ConversationHistoryMultivoiceMessageModel", + "ConversationHistoryMultivoiceMessagePartModel", "ConversationHistoryRagUsageCommonModel", "ConversationHistorySipTrunkingPhoneCallModel", "ConversationHistorySipTrunkingPhoneCallModelDirection", @@ -1087,6 +1168,7 @@ "ConversationTokenPurpose", "ConversationTurnMetrics", "ConversationalConfig", + "ConversationalConfigApiModelWorkflowOverride", "ConvertChapterResponseModel", "ConvertProjectResponseModel", "CreateAgentResponseModel", @@ -1135,12 +1217,15 @@ "DubbingMediaReference", "DubbingMetadataPageResponseModel", "DubbingMetadataResponse", + "DubbingReleaseChannel", "DubbingRenderResponseModel", "DubbingResource", "DynamicVariableAssignment", "DynamicVariableUpdateCommonModel", "DynamicVariablesConfig", "DynamicVariablesConfigDynamicVariablePlaceholdersValue", + "DynamicVariablesConfigWorkflowOverride", + "DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue", "EditChapterResponseModel", "EditProjectResponseModel", "EditVoiceResponseModel", @@ -1361,6 +1446,7 @@ "PodcastProjectResponseModel", "PodcastTextSource", "PodcastUrlSource", + "Position", "PostAgentAvatarResponseModel", "PostWorkspaceSecretResponseModel", "PrivacyConfig", @@ -1398,6 +1484,12 @@ "PromptAgentApiModelOutputToolsItem_Webhook", "PromptAgentApiModelOverride", "PromptAgentApiModelOverrideConfig", + "PromptAgentApiModelWorkflowOverride", + "PromptAgentApiModelWorkflowOverrideToolsItem", + "PromptAgentApiModelWorkflowOverrideToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideToolsItem_System", + "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook", "PromptAgentDbModel", "PromptEvaluationCriteria", "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess", @@ -1414,6 +1506,7 @@ "QueryParamsJsonSchema", "RagChunkMetadata", "RagConfig", + "RagConfigWorkflowOverride", "RagDocumentIndexResponseModel", "RagDocumentIndexUsage", "RagDocumentIndexesResponseModel", @@ -1437,6 +1530,7 @@ "ResourceAccessInfo", "ResourceAccessInfoRole", "ResourceMetadataResponseModel", + "ResourceMetadataResponseModelAnonymousAccessLevelOverride", "ReviewStatus", "SafetyCommonModel", "SafetyEvaluation", @@ -1528,6 +1622,8 @@ "TelephonyProvider", "TestConditionRationaleCommonModel", "TestConditionResultCommonModel", + "TestRunMetadata", + "TestRunMetadataTestType", "TestRunStatus", "TestToolResultModel", "TestsFeatureUsageCommonModel", @@ -1576,14 +1672,17 @@ "TtsConversationalConfigOutput", "TtsConversationalConfigOverride", "TtsConversationalConfigOverrideConfig", + "TtsConversationalConfigWorkflowOverride", "TtsConversationalModel", "TtsModelFamily", "TtsOptimizeStreamingLatency", "TtsOutputFormat", "TurnConfig", + "TurnConfigWorkflowOverride", "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", + "UnauthorizedError", "UnitTestRunResponseModel", "UnitTestSummaryResponseModel", "UnitTestToolCallEvaluationModelInput", @@ -1664,13 +1763,34 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowEdgeModel", + "WorkflowEdgeModelBackwardCondition", + "WorkflowEdgeModelBackwardCondition_Llm", + "WorkflowEdgeModelBackwardCondition_Result", + "WorkflowEdgeModelBackwardCondition_Unconditional", + "WorkflowEdgeModelForwardCondition", + "WorkflowEdgeModelForwardCondition_Llm", + "WorkflowEdgeModelForwardCondition_Result", + "WorkflowEdgeModelForwardCondition_Unconditional", + "WorkflowEndNodeModel", "WorkflowFeaturesUsageCommonModel", + "WorkflowLlmConditionModel", + "WorkflowOverrideAgentNodeModel", + "WorkflowPhoneNumberNodeModel", + "WorkflowPhoneNumberNodeModelTransferDestination", + "WorkflowPhoneNumberNodeModelTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelTransferDestination_SipUri", + "WorkflowResultConditionModel", + "WorkflowStandaloneAgentNodeModel", + "WorkflowStartNodeModel", "WorkflowToolEdgeStepModel", + "WorkflowToolLocator", "WorkflowToolMaxIterationsExceededStepModel", "WorkflowToolNestedToolsStepModelInput", "WorkflowToolNestedToolsStepModelInputResultsItem", "WorkflowToolNestedToolsStepModelOutput", "WorkflowToolNestedToolsStepModelOutputResultsItem", + "WorkflowToolNodeModel", "WorkflowToolResponseModelInput", "WorkflowToolResponseModelInputStepsItem", "WorkflowToolResponseModelInputStepsItem_Edge", @@ -1681,6 +1801,7 @@ "WorkflowToolResponseModelOutputStepsItem_Edge", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", "WorkflowToolResponseModelOutputStepsItem_NestedTools", + "WorkflowUnconditionalModel", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index a223be81..894436ac 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -34,7 +34,11 @@ def with_raw_response(self) -> RawConversationsClient: return self._raw_client def get_signed_url( - self, *, agent_id: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + agent_id: str, + include_conversation_id: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConversationSignedUrlResponseModel: """ Get a signed url to start a conversation with an agent with an agent that requires authorization @@ -44,6 +48,9 @@ def get_signed_url( agent_id : str The id of the agent you're taking the action on. + include_conversation_id : typing.Optional[bool] + Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -63,7 +70,9 @@ def get_signed_url( agent_id="21m00Tcm4TlvDq8ikWAM", ) """ - _response = self._raw_client.get_signed_url(http://github.com/agent_id=agent_id,%20request_options=request_options) + _response = self._raw_client.get_signed_url( + agent_id=agent_id, include_conversation_id=include_conversation_id, request_options=request_options + ) return _response.data def get_webrtc_token( @@ -266,7 +275,11 @@ def with_raw_response(self) -> AsyncRawConversationsClient: return self._raw_client async def get_signed_url( - self, *, agent_id: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + agent_id: str, + include_conversation_id: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConversationSignedUrlResponseModel: """ Get a signed url to start a conversation with an agent with an agent that requires authorization @@ -276,6 +289,9 @@ async def get_signed_url( agent_id : str The id of the agent you're taking the action on. + include_conversation_id : typing.Optional[bool] + Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -303,7 +319,9 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_signed_url(http://github.com/agent_id=agent_id,%20request_options=request_options) + _response = await self._raw_client.get_signed_url( + agent_id=agent_id, include_conversation_id=include_conversation_id, request_options=request_options + ) return _response.data async def get_webrtc_token( diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py index eeb7f5ad..2c44eb2f 100644 --- a/src/elevenlabs/conversational_ai/conversations/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py @@ -24,7 +24,11 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def get_signed_url( - self, *, agent_id: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + agent_id: str, + include_conversation_id: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ConversationSignedUrlResponseModel]: """ Get a signed url to start a conversation with an agent with an agent that requires authorization @@ -34,6 +38,9 @@ def get_signed_url( agent_id : str The id of the agent you're taking the action on. + include_conversation_id : typing.Optional[bool] + Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -47,6 +54,7 @@ def get_signed_url( method="GET", params={ "agent_id": agent_id, + "include_conversation_id": include_conversation_id, }, request_options=request_options, ) @@ -336,7 +344,11 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def get_signed_url( - self, *, agent_id: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + agent_id: str, + include_conversation_id: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ConversationSignedUrlResponseModel]: """ Get a signed url to start a conversation with an agent with an agent that requires authorization @@ -346,6 +358,9 @@ async def get_signed_url( agent_id : str The id of the agent you're taking the action on. + include_conversation_id : typing.Optional[bool] + Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -359,6 +374,7 @@ async def get_signed_url( method="GET", params={ "agent_id": agent_id, + "include_conversation_id": include_conversation_id, }, request_options=request_options, ) diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 6a01caf9..531a5c5a 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -14,10 +14,10 @@ def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeo def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.13.0", + "User-Agent": "elevenlabs/v2.14.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.13.0", + "X-Fern-SDK-Version": "v2.14.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/errors/__init__.py b/src/elevenlabs/errors/__init__.py index f744d3fb..a63f3cf2 100644 --- a/src/elevenlabs/errors/__init__.py +++ b/src/elevenlabs/errors/__init__.py @@ -6,6 +6,14 @@ from .forbidden_error import ForbiddenError from .not_found_error import NotFoundError from .too_early_error import TooEarlyError +from .unauthorized_error import UnauthorizedError from .unprocessable_entity_error import UnprocessableEntityError -__all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "TooEarlyError", "UnprocessableEntityError"] +__all__ = [ + "BadRequestError", + "ForbiddenError", + "NotFoundError", + "TooEarlyError", + "UnauthorizedError", + "UnprocessableEntityError", +] diff --git a/src/elevenlabs/errors/unauthorized_error.py b/src/elevenlabs/errors/unauthorized_error.py new file mode 100644 index 00000000..c83b25c2 --- /dev/null +++ b/src/elevenlabs/errors/unauthorized_error.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.api_error import ApiError + + +class UnauthorizedError(ApiError): + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=401, headers=headers, body=body) diff --git a/src/elevenlabs/speech_to_text/__init__.py b/src/elevenlabs/speech_to_text/__init__.py index 58f97876..42808ed5 100644 --- a/src/elevenlabs/speech_to_text/__init__.py +++ b/src/elevenlabs/speech_to_text/__init__.py @@ -8,10 +8,14 @@ SpeechToTextConvertRequestWebhookMetadata, SpeechToTextConvertResponse, ) +from . import transcripts +from .transcripts import TranscriptsGetResponse __all__ = [ "SpeechToTextConvertRequestFileFormat", "SpeechToTextConvertRequestTimestampsGranularity", "SpeechToTextConvertRequestWebhookMetadata", "SpeechToTextConvertResponse", + "TranscriptsGetResponse", + "transcripts", ] diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index 89c59429..eff73f81 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -7,6 +7,7 @@ from ..core.request_options import RequestOptions from ..types.additional_formats import AdditionalFormats from .raw_client import AsyncRawSpeechToTextClient, RawSpeechToTextClient +from .transcripts.client import AsyncTranscriptsClient, TranscriptsClient from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity from .types.speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata @@ -19,6 +20,7 @@ class SpeechToTextClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSpeechToTextClient(client_wrapper=client_wrapper) + self.transcripts = TranscriptsClient(client_wrapper=client_wrapper) @property def with_raw_response(self) -> RawSpeechToTextClient: @@ -63,7 +65,7 @@ def convert( The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. enable_logging : typing.Optional[bool] - When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. file : typing.Optional[core.File] See core.File for more documentation @@ -159,6 +161,7 @@ def convert( class AsyncSpeechToTextClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSpeechToTextClient(client_wrapper=client_wrapper) + self.transcripts = AsyncTranscriptsClient(client_wrapper=client_wrapper) @property def with_raw_response(self) -> AsyncRawSpeechToTextClient: @@ -203,7 +206,7 @@ async def convert( The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. enable_logging : typing.Optional[bool] - When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. file : typing.Optional[core.File] See core.File for more documentation diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 308c5d6b..99dc7b89 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -59,7 +59,7 @@ def convert( The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. enable_logging : typing.Optional[bool] - When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. file : typing.Optional[core.File] See core.File for more documentation @@ -215,7 +215,7 @@ async def convert( The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. enable_logging : typing.Optional[bool] - When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. file : typing.Optional[core.File] See core.File for more documentation diff --git a/src/elevenlabs/speech_to_text/transcripts/__init__.py b/src/elevenlabs/speech_to_text/transcripts/__init__.py new file mode 100644 index 00000000..fa3a8854 --- /dev/null +++ b/src/elevenlabs/speech_to_text/transcripts/__init__.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .types import TranscriptsGetResponse + +__all__ = ["TranscriptsGetResponse"] diff --git a/src/elevenlabs/speech_to_text/transcripts/client.py b/src/elevenlabs/speech_to_text/transcripts/client.py new file mode 100644 index 00000000..4c3dc629 --- /dev/null +++ b/src/elevenlabs/speech_to_text/transcripts/client.py @@ -0,0 +1,114 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.request_options import RequestOptions +from .raw_client import AsyncRawTranscriptsClient, RawTranscriptsClient +from .types.transcripts_get_response import TranscriptsGetResponse + + +class TranscriptsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawTranscriptsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawTranscriptsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawTranscriptsClient + """ + return self._raw_client + + def get( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> TranscriptsGetResponse: + """ + Retrieve a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to retrieve + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TranscriptsGetResponse + The transcript data + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.speech_to_text.transcripts.get( + transcription_id="transcription_id", + ) + """ + _response = self._raw_client.get(transcription_id, request_options=request_options) + return _response.data + + +class AsyncTranscriptsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawTranscriptsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawTranscriptsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawTranscriptsClient + """ + return self._raw_client + + async def get( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> TranscriptsGetResponse: + """ + Retrieve a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to retrieve + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TranscriptsGetResponse + The transcript data + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.speech_to_text.transcripts.get( + transcription_id="transcription_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(transcription_id, request_options=request_options) + return _response.data diff --git a/src/elevenlabs/speech_to_text/transcripts/raw_client.py b/src/elevenlabs/speech_to_text/transcripts/raw_client.py new file mode 100644 index 00000000..472387b8 --- /dev/null +++ b/src/elevenlabs/speech_to_text/transcripts/raw_client.py @@ -0,0 +1,170 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.http_response import AsyncHttpResponse, HttpResponse +from ...core.jsonable_encoder import jsonable_encoder +from ...core.request_options import RequestOptions +from ...core.unchecked_base_model import construct_type +from ...errors.not_found_error import NotFoundError +from ...errors.unauthorized_error import UnauthorizedError +from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.http_validation_error import HttpValidationError +from .types.transcripts_get_response import TranscriptsGetResponse + + +class RawTranscriptsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[TranscriptsGetResponse]: + """ + Retrieve a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to retrieve + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[TranscriptsGetResponse] + The transcript data + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/speech-to-text/transcripts/{jsonable_encoder(transcription_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TranscriptsGetResponse, + construct_type( + type_=TranscriptsGetResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawTranscriptsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[TranscriptsGetResponse]: + """ + Retrieve a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to retrieve + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[TranscriptsGetResponse] + The transcript data + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/speech-to-text/transcripts/{jsonable_encoder(transcription_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TranscriptsGetResponse, + construct_type( + type_=TranscriptsGetResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/speech_to_text/transcripts/types/__init__.py b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py new file mode 100644 index 00000000..aaa28c33 --- /dev/null +++ b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +from .transcripts_get_response import TranscriptsGetResponse + +__all__ = ["TranscriptsGetResponse"] diff --git a/src/elevenlabs/speech_to_text/transcripts/types/transcripts_get_response.py b/src/elevenlabs/speech_to_text/transcripts/types/transcripts_get_response.py new file mode 100644 index 00000000..39474351 --- /dev/null +++ b/src/elevenlabs/speech_to_text/transcripts/types/transcripts_get_response.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel +from ....types.speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel + +TranscriptsGetResponse = typing.Union[SpeechToTextChunkResponseModel, MultichannelSpeechToTextResponseModel] diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index 03c377cc..a5e04fca 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -311,7 +311,11 @@ def create( return _response.data def get( - self, project_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + project_id: str, + *, + share_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ProjectExtendedResponse: """ Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. @@ -321,6 +325,9 @@ def get( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + share_id : typing.Optional[str] + The share ID of the project + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -340,7 +347,7 @@ def get( project_id="21m00Tcm4TlvDq8ikWAM", ) """ - _response = self._raw_client.get(project_id, request_options=request_options) + _response = self._raw_client.get(project_id, share_id=share_id, request_options=request_options) return _response.data def update( @@ -789,7 +796,11 @@ async def main() -> None: return _response.data async def get( - self, project_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + project_id: str, + *, + share_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ProjectExtendedResponse: """ Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. @@ -799,6 +810,9 @@ async def get( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + share_id : typing.Optional[str] + The share ID of the project + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -826,7 +840,7 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get(project_id, request_options=request_options) + _response = await self._raw_client.get(project_id, share_id=share_id, request_options=request_options) return _response.data async def update( diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py index 058fa17d..87b5ee68 100644 --- a/src/elevenlabs/studio/projects/raw_client.py +++ b/src/elevenlabs/studio/projects/raw_client.py @@ -335,7 +335,11 @@ def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def get( - self, project_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + project_id: str, + *, + share_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ProjectExtendedResponse]: """ Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. @@ -345,6 +349,9 @@ def get( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + share_id : typing.Optional[str] + The share ID of the project + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -356,6 +363,9 @@ def get( _response = self._client_wrapper.httpx_client.request( f"v1/studio/projects/{jsonable_encoder(project_id)}", method="GET", + params={ + "share_id": share_id, + }, request_options=request_options, ) try: @@ -889,7 +899,11 @@ async def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def get( - self, project_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + project_id: str, + *, + share_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ProjectExtendedResponse]: """ Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. @@ -899,6 +913,9 @@ async def get( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + share_id : typing.Optional[str] + The share ID of the project + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -910,6 +927,9 @@ async def get( _response = await self._client_wrapper.httpx_client.request( f"v1/studio/projects/{jsonable_encoder(project_id)}", method="GET", + params={ + "share_id": share_id, + }, request_options=request_options, ) try: diff --git a/src/elevenlabs/text_to_dialogue/__init__.py b/src/elevenlabs/text_to_dialogue/__init__.py index 68f875e0..8bff2bad 100644 --- a/src/elevenlabs/text_to_dialogue/__init__.py +++ b/src/elevenlabs/text_to_dialogue/__init__.py @@ -2,6 +2,16 @@ # isort: skip_file -from .types import TextToDialogueConvertRequestOutputFormat, TextToDialogueStreamRequestOutputFormat +from .types import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + TextToDialogueConvertRequestOutputFormat, + TextToDialogueStreamRequestOutputFormat, +) -__all__ = ["TextToDialogueConvertRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat"] +__all__ = [ + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "TextToDialogueConvertRequestOutputFormat", + "TextToDialogueStreamRequestOutputFormat", +] diff --git a/src/elevenlabs/text_to_dialogue/client.py b/src/elevenlabs/text_to_dialogue/client.py index 2ab69caf..eb60a6c6 100644 --- a/src/elevenlabs/text_to_dialogue/client.py +++ b/src/elevenlabs/text_to_dialogue/client.py @@ -8,6 +8,12 @@ from ..types.model_settings_response_model import ModelSettingsResponseModel from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator from .raw_client import AsyncRawTextToDialogueClient, RawTextToDialogueClient +from .types.body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, +) +from .types.body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, +) from .types.text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat from .types.text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat @@ -36,11 +42,15 @@ def convert( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueConvertRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -57,6 +67,9 @@ def convert( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -66,6 +79,9 @@ def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -98,9 +114,11 @@ def convert( inputs=inputs, output_format=output_format, model_id=model_id, + language_code=language_code, settings=settings, pronunciation_dictionary_locators=pronunciation_dictionary_locators, seed=seed, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) as r: yield from r.data @@ -111,11 +129,15 @@ def stream( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueStreamRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -132,6 +154,9 @@ def stream( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -141,6 +166,9 @@ def stream( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -173,9 +201,11 @@ def stream( inputs=inputs, output_format=output_format, model_id=model_id, + language_code=language_code, settings=settings, pronunciation_dictionary_locators=pronunciation_dictionary_locators, seed=seed, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) as r: yield from r.data @@ -202,11 +232,15 @@ async def convert( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueConvertRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -223,6 +257,9 @@ async def convert( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -232,6 +269,9 @@ async def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -272,9 +312,11 @@ async def main() -> None: inputs=inputs, output_format=output_format, model_id=model_id, + language_code=language_code, settings=settings, pronunciation_dictionary_locators=pronunciation_dictionary_locators, seed=seed, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) as r: async for _chunk in r.data: @@ -286,11 +328,15 @@ async def stream( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueStreamRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -307,6 +353,9 @@ async def stream( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -316,6 +365,9 @@ async def stream( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -356,9 +408,11 @@ async def main() -> None: inputs=inputs, output_format=output_format, model_id=model_id, + language_code=language_code, settings=settings, pronunciation_dictionary_locators=pronunciation_dictionary_locators, seed=seed, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/text_to_dialogue/raw_client.py b/src/elevenlabs/text_to_dialogue/raw_client.py index f6d6315a..4383ec96 100644 --- a/src/elevenlabs/text_to_dialogue/raw_client.py +++ b/src/elevenlabs/text_to_dialogue/raw_client.py @@ -15,6 +15,12 @@ from ..types.http_validation_error import HttpValidationError from ..types.model_settings_response_model import ModelSettingsResponseModel from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator +from .types.body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, +) +from .types.body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, +) from .types.text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat from .types.text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat @@ -33,11 +39,15 @@ def convert( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueConvertRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -54,6 +64,9 @@ def convert( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -63,6 +76,9 @@ def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -82,6 +98,7 @@ def convert( object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" ), "model_id": model_id, + "language_code": language_code, "settings": convert_and_respect_annotation_metadata( object_=settings, annotation=ModelSettingsResponseModel, direction="write" ), @@ -91,6 +108,7 @@ def convert( direction="write", ), "seed": seed, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", @@ -134,11 +152,15 @@ def stream( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueStreamRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -155,6 +177,9 @@ def stream( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -164,6 +189,9 @@ def stream( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -183,6 +211,7 @@ def stream( object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" ), "model_id": model_id, + "language_code": language_code, "settings": convert_and_respect_annotation_metadata( object_=settings, annotation=ModelSettingsResponseModel, direction="write" ), @@ -192,6 +221,7 @@ def stream( direction="write", ), "seed": seed, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", @@ -240,11 +270,15 @@ async def convert( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueConvertRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -261,6 +295,9 @@ async def convert( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -270,6 +307,9 @@ async def convert( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -289,6 +329,7 @@ async def convert( object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" ), "model_id": model_id, + "language_code": language_code, "settings": convert_and_respect_annotation_metadata( object_=settings, annotation=ModelSettingsResponseModel, direction="write" ), @@ -298,6 +339,7 @@ async def convert( direction="write", ), "seed": seed, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", @@ -342,11 +384,15 @@ async def stream( inputs: typing.Sequence[DialogueInput], output_format: typing.Optional[TextToDialogueStreamRequestOutputFormat] = None, model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, settings: typing.Optional[ModelSettingsResponseModel] = OMIT, pronunciation_dictionary_locators: typing.Optional[ typing.Sequence[PronunciationDictionaryVersionLocator] ] = OMIT, seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[ + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -363,6 +409,9 @@ async def stream( model_id : typing.Optional[str] Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + settings : typing.Optional[ModelSettingsResponseModel] Settings controlling the dialogue generation. @@ -372,6 +421,9 @@ async def stream( seed : typing.Optional[int] If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + apply_text_normalization : typing.Optional[BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -391,6 +443,7 @@ async def stream( object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" ), "model_id": model_id, + "language_code": language_code, "settings": convert_and_respect_annotation_metadata( object_=settings, annotation=ModelSettingsResponseModel, direction="write" ), @@ -400,6 +453,7 @@ async def stream( direction="write", ), "seed": seed, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/text_to_dialogue/types/__init__.py b/src/elevenlabs/text_to_dialogue/types/__init__.py index ecb145fd..a8af8088 100644 --- a/src/elevenlabs/text_to_dialogue/types/__init__.py +++ b/src/elevenlabs/text_to_dialogue/types/__init__.py @@ -2,7 +2,18 @@ # isort: skip_file +from .body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, +) +from .body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, +) from .text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat from .text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat -__all__ = ["TextToDialogueConvertRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat"] +__all__ = [ + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "TextToDialogueConvertRequestOutputFormat", + "TextToDialogueStreamRequestOutputFormat", +] diff --git a/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization.py b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization.py new file mode 100644 index 00000000..66568c8a --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off"], typing.Any +] diff --git a/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization.py b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization.py new file mode 100644 index 00000000..f9faef0b --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off"], typing.Any +] diff --git a/src/elevenlabs/text_to_sound_effects/client.py b/src/elevenlabs/text_to_sound_effects/client.py index 5d30bfe2..5ff43638 100644 --- a/src/elevenlabs/text_to_sound_effects/client.py +++ b/src/elevenlabs/text_to_sound_effects/client.py @@ -34,10 +34,11 @@ def convert( loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, + model_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ - Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. + Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world. Parameters ---------- @@ -48,7 +49,7 @@ def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. loop : typing.Optional[bool] - Whether to create a sound effect that loops smoothly. + Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'. duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -56,6 +57,9 @@ def convert( prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + model_id : typing.Optional[str] + The model ID to use for the sound generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -81,6 +85,7 @@ def convert( loop=loop, duration_seconds=duration_seconds, prompt_influence=prompt_influence, + model_id=model_id, request_options=request_options, ) as r: yield from r.data @@ -109,10 +114,11 @@ async def convert( loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, + model_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ - Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. + Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world. Parameters ---------- @@ -123,7 +129,7 @@ async def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. loop : typing.Optional[bool] - Whether to create a sound effect that loops smoothly. + Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'. duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -131,6 +137,9 @@ async def convert( prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + model_id : typing.Optional[str] + The model ID to use for the sound generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -164,6 +173,7 @@ async def main() -> None: loop=loop, duration_seconds=duration_seconds, prompt_influence=prompt_influence, + model_id=model_id, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/text_to_sound_effects/raw_client.py b/src/elevenlabs/text_to_sound_effects/raw_client.py index 34c3bd64..a45ab731 100644 --- a/src/elevenlabs/text_to_sound_effects/raw_client.py +++ b/src/elevenlabs/text_to_sound_effects/raw_client.py @@ -30,10 +30,11 @@ def convert( loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, + model_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ - Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. + Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world. Parameters ---------- @@ -44,7 +45,7 @@ def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. loop : typing.Optional[bool] - Whether to create a sound effect that loops smoothly. + Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'. duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -52,6 +53,9 @@ def convert( prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + model_id : typing.Optional[str] + The model ID to use for the sound generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -71,6 +75,7 @@ def convert( "loop": loop, "duration_seconds": duration_seconds, "prompt_influence": prompt_influence, + "model_id": model_id, }, headers={ "content-type": "application/json", @@ -121,10 +126,11 @@ async def convert( loop: typing.Optional[bool] = OMIT, duration_seconds: typing.Optional[float] = OMIT, prompt_influence: typing.Optional[float] = OMIT, + model_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ - Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects model in the world. + Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world. Parameters ---------- @@ -135,7 +141,7 @@ async def convert( Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. loop : typing.Optional[bool] - Whether to create a sound effect that loops smoothly. + Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'. duration_seconds : typing.Optional[float] The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. @@ -143,6 +149,9 @@ async def convert( prompt_influence : typing.Optional[float] A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + model_id : typing.Optional[str] + The model ID to use for the sound generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -162,6 +171,7 @@ async def convert( "loop": loop, "duration_seconds": duration_seconds, "prompt_influence": prompt_influence, + "model_id": model_id, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/text_to_speech/client.py b/src/elevenlabs/text_to_speech/client.py index f8dd1e90..6d300574 100644 --- a/src/elevenlabs/text_to_speech/client.py +++ b/src/elevenlabs/text_to_speech/client.py @@ -106,7 +106,7 @@ def convert( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -239,7 +239,7 @@ def convert_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -370,7 +370,7 @@ def stream( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -503,7 +503,7 @@ def stream_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -654,7 +654,7 @@ async def convert( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -796,7 +796,7 @@ async def convert_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -935,7 +935,7 @@ async def stream( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -1077,7 +1077,7 @@ async def stream_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. diff --git a/src/elevenlabs/text_to_speech/raw_client.py b/src/elevenlabs/text_to_speech/raw_client.py index 6febd529..9a5c361c 100644 --- a/src/elevenlabs/text_to_speech/raw_client.py +++ b/src/elevenlabs/text_to_speech/raw_client.py @@ -105,7 +105,7 @@ def convert( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -266,7 +266,7 @@ def convert_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -425,7 +425,7 @@ def stream( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -587,7 +587,7 @@ def stream_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -768,7 +768,7 @@ async def convert( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -930,7 +930,7 @@ async def convert_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -1089,7 +1089,7 @@ async def stream( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. @@ -1252,7 +1252,7 @@ async def stream_with_timestamps( Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. language_code : typing.Optional[str] - Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided. + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. voice_settings : typing.Optional[VoiceSettings] Voice settings overriding stored settings for the given voice. They are applied only on the given request. diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index aa668d79..4c75ee95 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -21,6 +21,7 @@ from .age import Age from .agent_call_limits import AgentCallLimits from .agent_config import AgentConfig +from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride from .agent_config_override import AgentConfigOverride from .agent_config_override_config import AgentConfigOverrideConfig from .agent_failure_response_example import AgentFailureResponseExample @@ -32,6 +33,16 @@ from .agent_summary_response_model import AgentSummaryResponseModel from .agent_testing_settings import AgentTestingSettings from .agent_transfer import AgentTransfer +from .agent_workflow_request_model import AgentWorkflowRequestModel +from .agent_workflow_request_model_nodes_value import ( + AgentWorkflowRequestModelNodesValue, + AgentWorkflowRequestModelNodesValue_End, + AgentWorkflowRequestModelNodesValue_OverrideAgent, + AgentWorkflowRequestModelNodesValue_PhoneNumber, + AgentWorkflowRequestModelNodesValue_StandaloneAgent, + AgentWorkflowRequestModelNodesValue_Start, + AgentWorkflowRequestModelNodesValue_Tool, +) from .agent_workspace_overrides_input import AgentWorkspaceOverridesInput from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput from .alignment import Alignment @@ -41,6 +52,7 @@ from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput from .array_json_schema_property_output_items import ArrayJsonSchemaPropertyOutputItems from .asr_conversational_config import AsrConversationalConfig +from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride from .asr_input_format import AsrInputFormat from .asr_provider import AsrProvider from .asr_quality import AsrQuality @@ -70,6 +82,7 @@ from .breakdown_types import BreakdownTypes from .built_in_tools_input import BuiltInToolsInput from .built_in_tools_output import BuiltInToolsOutput +from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType @@ -142,6 +155,7 @@ from .conversation_config_client_override_output import ConversationConfigClientOverrideOutput from .conversation_config_override import ConversationConfigOverride from .conversation_config_override_config import ConversationConfigOverrideConfig +from .conversation_config_workflow_override import ConversationConfigWorkflowOverride from .conversation_deletion_settings import ConversationDeletionSettings from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel from .conversation_history_batch_call_model import ConversationHistoryBatchCallModel @@ -157,6 +171,8 @@ ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, ConversationHistoryMetadataCommonModelPhoneCall_Twilio, ) +from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel +from .conversation_history_multivoice_message_part_model import ConversationHistoryMultivoiceMessagePartModel from .conversation_history_rag_usage_common_model import ConversationHistoryRagUsageCommonModel from .conversation_history_sip_trunking_phone_call_model import ConversationHistorySipTrunkingPhoneCallModel from .conversation_history_sip_trunking_phone_call_model_direction import ( @@ -254,6 +270,7 @@ from .conversation_token_purpose import ConversationTokenPurpose from .conversation_turn_metrics import ConversationTurnMetrics from .conversational_config import ConversationalConfig +from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride from .convert_chapter_response_model import ConvertChapterResponseModel from .convert_project_response_model import ConvertProjectResponseModel from .create_agent_response_model import CreateAgentResponseModel @@ -300,6 +317,7 @@ from .dubbing_media_reference import DubbingMediaReference from .dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel from .dubbing_metadata_response import DubbingMetadataResponse +from .dubbing_release_channel import DubbingReleaseChannel from .dubbing_render_response_model import DubbingRenderResponseModel from .dubbing_resource import DubbingResource from .dynamic_variable_assignment import DynamicVariableAssignment @@ -308,6 +326,10 @@ from .dynamic_variables_config_dynamic_variable_placeholders_value import ( DynamicVariablesConfigDynamicVariablePlaceholdersValue, ) +from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride +from .dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value import ( + DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, +) from .edit_chapter_response_model import EditChapterResponseModel from .edit_project_response_model import EditProjectResponseModel from .edit_voice_response_model import EditVoiceResponseModel @@ -546,6 +568,7 @@ from .podcast_project_response_model import PodcastProjectResponseModel from .podcast_text_source import PodcastTextSource from .podcast_url_source import PodcastUrlSource +from .position import Position from .post_agent_avatar_response_model import PostAgentAvatarResponseModel from .post_workspace_secret_response_model import PostWorkspaceSecretResponseModel from .privacy_config import PrivacyConfig @@ -587,6 +610,14 @@ ) from .prompt_agent_api_model_override import PromptAgentApiModelOverride from .prompt_agent_api_model_override_config import PromptAgentApiModelOverrideConfig +from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride +from .prompt_agent_api_model_workflow_override_tools_item import ( + PromptAgentApiModelWorkflowOverrideToolsItem, + PromptAgentApiModelWorkflowOverrideToolsItem_Client, + PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideToolsItem_System, + PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, +) from .prompt_agent_db_model import PromptAgentDbModel from .prompt_evaluation_criteria import PromptEvaluationCriteria from .pronunciation_dictionary_alias_rule_request_model import PronunciationDictionaryAliasRuleRequestModel @@ -603,6 +634,7 @@ from .query_params_json_schema import QueryParamsJsonSchema from .rag_chunk_metadata import RagChunkMetadata from .rag_config import RagConfig +from .rag_config_workflow_override import RagConfigWorkflowOverride from .rag_document_index_response_model import RagDocumentIndexResponseModel from .rag_document_index_usage import RagDocumentIndexUsage from .rag_document_indexes_response_model import RagDocumentIndexesResponseModel @@ -624,6 +656,9 @@ from .resource_access_info import ResourceAccessInfo from .resource_access_info_role import ResourceAccessInfoRole from .resource_metadata_response_model import ResourceMetadataResponseModel +from .resource_metadata_response_model_anonymous_access_level_override import ( + ResourceMetadataResponseModelAnonymousAccessLevelOverride, +) from .review_status import ReviewStatus from .safety_common_model import SafetyCommonModel from .safety_evaluation import SafetyEvaluation @@ -709,6 +744,8 @@ from .telephony_provider import TelephonyProvider from .test_condition_rationale_common_model import TestConditionRationaleCommonModel from .test_condition_result_common_model import TestConditionResultCommonModel +from .test_run_metadata import TestRunMetadata +from .test_run_metadata_test_type import TestRunMetadataTestType from .test_run_status import TestRunStatus from .test_tool_result_model import TestToolResultModel from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel @@ -751,11 +788,13 @@ from .tts_conversational_config_output import TtsConversationalConfigOutput from .tts_conversational_config_override import TtsConversationalConfigOverride from .tts_conversational_config_override_config import TtsConversationalConfigOverrideConfig +from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride from .tts_conversational_model import TtsConversationalModel from .tts_model_family import TtsModelFamily from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency from .tts_output_format import TtsOutputFormat from .turn_config import TurnConfig +from .turn_config_workflow_override import TurnConfigWorkflowOverride from .turn_mode import TurnMode from .twilio_outbound_call_response import TwilioOutboundCallResponse from .txt_export_options import TxtExportOptions @@ -848,13 +887,40 @@ from .widget_placement import WidgetPlacement from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents +from .workflow_edge_model import WorkflowEdgeModel +from .workflow_edge_model_backward_condition import ( + WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Llm, + WorkflowEdgeModelBackwardCondition_Result, + WorkflowEdgeModelBackwardCondition_Unconditional, +) +from .workflow_edge_model_forward_condition import ( + WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Llm, + WorkflowEdgeModelForwardCondition_Result, + WorkflowEdgeModelForwardCondition_Unconditional, +) +from .workflow_end_node_model import WorkflowEndNodeModel from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel +from .workflow_llm_condition_model import WorkflowLlmConditionModel +from .workflow_override_agent_node_model import WorkflowOverrideAgentNodeModel +from .workflow_phone_number_node_model import WorkflowPhoneNumberNodeModel +from .workflow_phone_number_node_model_transfer_destination import ( + WorkflowPhoneNumberNodeModelTransferDestination, + WorkflowPhoneNumberNodeModelTransferDestination_Phone, + WorkflowPhoneNumberNodeModelTransferDestination_SipUri, +) +from .workflow_result_condition_model import WorkflowResultConditionModel +from .workflow_standalone_agent_node_model import WorkflowStandaloneAgentNodeModel +from .workflow_start_node_model import WorkflowStartNodeModel from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel +from .workflow_tool_locator import WorkflowToolLocator from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem +from .workflow_tool_node_model import WorkflowToolNodeModel from .workflow_tool_response_model_input import WorkflowToolResponseModelInput from .workflow_tool_response_model_input_steps_item import ( WorkflowToolResponseModelInputStepsItem, @@ -869,6 +935,7 @@ WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, WorkflowToolResponseModelOutputStepsItem_NestedTools, ) +from .workflow_unconditional_model import WorkflowUnconditionalModel from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem @@ -900,6 +967,7 @@ "Age", "AgentCallLimits", "AgentConfig", + "AgentConfigApiModelWorkflowOverride", "AgentConfigOverride", "AgentConfigOverrideConfig", "AgentFailureResponseExample", @@ -911,6 +979,14 @@ "AgentSummaryResponseModel", "AgentTestingSettings", "AgentTransfer", + "AgentWorkflowRequestModel", + "AgentWorkflowRequestModelNodesValue", + "AgentWorkflowRequestModelNodesValue_End", + "AgentWorkflowRequestModelNodesValue_OverrideAgent", + "AgentWorkflowRequestModelNodesValue_PhoneNumber", + "AgentWorkflowRequestModelNodesValue_StandaloneAgent", + "AgentWorkflowRequestModelNodesValue_Start", + "AgentWorkflowRequestModelNodesValue_Tool", "AgentWorkspaceOverridesInput", "AgentWorkspaceOverridesOutput", "Alignment", @@ -920,6 +996,7 @@ "ArrayJsonSchemaPropertyOutput", "ArrayJsonSchemaPropertyOutputItems", "AsrConversationalConfig", + "AsrConversationalConfigWorkflowOverride", "AsrInputFormat", "AsrProvider", "AsrQuality", @@ -945,6 +1022,7 @@ "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", + "BuiltInToolsWorkflowOverride", "CaptionStyleCharacterAnimationModel", "CaptionStyleCharacterAnimationModelEnterType", "CaptionStyleCharacterAnimationModelExitType", @@ -1011,6 +1089,7 @@ "ConversationConfigClientOverrideOutput", "ConversationConfigOverride", "ConversationConfigOverrideConfig", + "ConversationConfigWorkflowOverride", "ConversationDeletionSettings", "ConversationHistoryAnalysisCommonModel", "ConversationHistoryBatchCallModel", @@ -1022,6 +1101,8 @@ "ConversationHistoryMetadataCommonModelPhoneCall", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio", + "ConversationHistoryMultivoiceMessageModel", + "ConversationHistoryMultivoiceMessagePartModel", "ConversationHistoryRagUsageCommonModel", "ConversationHistorySipTrunkingPhoneCallModel", "ConversationHistorySipTrunkingPhoneCallModelDirection", @@ -1083,6 +1164,7 @@ "ConversationTokenPurpose", "ConversationTurnMetrics", "ConversationalConfig", + "ConversationalConfigApiModelWorkflowOverride", "ConvertChapterResponseModel", "ConvertProjectResponseModel", "CreateAgentResponseModel", @@ -1129,12 +1211,15 @@ "DubbingMediaReference", "DubbingMetadataPageResponseModel", "DubbingMetadataResponse", + "DubbingReleaseChannel", "DubbingRenderResponseModel", "DubbingResource", "DynamicVariableAssignment", "DynamicVariableUpdateCommonModel", "DynamicVariablesConfig", "DynamicVariablesConfigDynamicVariablePlaceholdersValue", + "DynamicVariablesConfigWorkflowOverride", + "DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue", "EditChapterResponseModel", "EditProjectResponseModel", "EditVoiceResponseModel", @@ -1347,6 +1432,7 @@ "PodcastProjectResponseModel", "PodcastTextSource", "PodcastUrlSource", + "Position", "PostAgentAvatarResponseModel", "PostWorkspaceSecretResponseModel", "PrivacyConfig", @@ -1384,6 +1470,12 @@ "PromptAgentApiModelOutputToolsItem_Webhook", "PromptAgentApiModelOverride", "PromptAgentApiModelOverrideConfig", + "PromptAgentApiModelWorkflowOverride", + "PromptAgentApiModelWorkflowOverrideToolsItem", + "PromptAgentApiModelWorkflowOverrideToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideToolsItem_System", + "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook", "PromptAgentDbModel", "PromptEvaluationCriteria", "PronunciationDictionaryAliasRuleRequestModel", @@ -1398,6 +1490,7 @@ "QueryParamsJsonSchema", "RagChunkMetadata", "RagConfig", + "RagConfigWorkflowOverride", "RagDocumentIndexResponseModel", "RagDocumentIndexUsage", "RagDocumentIndexesResponseModel", @@ -1419,6 +1512,7 @@ "ResourceAccessInfo", "ResourceAccessInfoRole", "ResourceMetadataResponseModel", + "ResourceMetadataResponseModelAnonymousAccessLevelOverride", "ReviewStatus", "SafetyCommonModel", "SafetyEvaluation", @@ -1500,6 +1594,8 @@ "TelephonyProvider", "TestConditionRationaleCommonModel", "TestConditionResultCommonModel", + "TestRunMetadata", + "TestRunMetadataTestType", "TestRunStatus", "TestToolResultModel", "TestsFeatureUsageCommonModel", @@ -1538,11 +1634,13 @@ "TtsConversationalConfigOutput", "TtsConversationalConfigOverride", "TtsConversationalConfigOverrideConfig", + "TtsConversationalConfigWorkflowOverride", "TtsConversationalModel", "TtsModelFamily", "TtsOptimizeStreamingLatency", "TtsOutputFormat", "TurnConfig", + "TurnConfigWorkflowOverride", "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", @@ -1623,13 +1721,34 @@ "WidgetPlacement", "WidgetStyles", "WidgetTextContents", + "WorkflowEdgeModel", + "WorkflowEdgeModelBackwardCondition", + "WorkflowEdgeModelBackwardCondition_Llm", + "WorkflowEdgeModelBackwardCondition_Result", + "WorkflowEdgeModelBackwardCondition_Unconditional", + "WorkflowEdgeModelForwardCondition", + "WorkflowEdgeModelForwardCondition_Llm", + "WorkflowEdgeModelForwardCondition_Result", + "WorkflowEdgeModelForwardCondition_Unconditional", + "WorkflowEndNodeModel", "WorkflowFeaturesUsageCommonModel", + "WorkflowLlmConditionModel", + "WorkflowOverrideAgentNodeModel", + "WorkflowPhoneNumberNodeModel", + "WorkflowPhoneNumberNodeModelTransferDestination", + "WorkflowPhoneNumberNodeModelTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelTransferDestination_SipUri", + "WorkflowResultConditionModel", + "WorkflowStandaloneAgentNodeModel", + "WorkflowStartNodeModel", "WorkflowToolEdgeStepModel", + "WorkflowToolLocator", "WorkflowToolMaxIterationsExceededStepModel", "WorkflowToolNestedToolsStepModelInput", "WorkflowToolNestedToolsStepModelInputResultsItem", "WorkflowToolNestedToolsStepModelOutput", "WorkflowToolNestedToolsStepModelOutputResultsItem", + "WorkflowToolNodeModel", "WorkflowToolResponseModelInput", "WorkflowToolResponseModelInputStepsItem", "WorkflowToolResponseModelInputStepsItem_Edge", @@ -1640,6 +1759,7 @@ "WorkflowToolResponseModelOutputStepsItem_Edge", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", "WorkflowToolResponseModelOutputStepsItem_NestedTools", + "WorkflowUnconditionalModel", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", diff --git a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py index 033ae20d..ec8bde42 100644 --- a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py +++ b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py @@ -8,12 +8,14 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel +from .agent_workflow_request_model import AgentWorkflowRequestModel from .conversational_config import ConversationalConfig class AdhocAgentConfigOverrideForTestRequestModel(UncheckedBaseModel): conversation_config: ConversationalConfig platform_settings: AgentPlatformSettingsRequestModel + workflow: typing.Optional[AgentWorkflowRequestModel] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -27,5 +29,7 @@ class Config: from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 update_forward_refs(AdhocAgentConfigOverrideForTestRequestModel) diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override.py b/src/elevenlabs/types/agent_config_api_model_workflow_override.py new file mode 100644 index 00000000..d234cc68 --- /dev/null +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride +from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride + + +class AgentConfigApiModelWorkflowOverride(UncheckedBaseModel): + first_message: typing.Optional[str] = pydantic.Field(default=None) + """ + If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language of the agent - used for ASR and TTS + """ + + dynamic_variables: typing.Optional[DynamicVariablesConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for dynamic variables + """ + + prompt: typing.Optional[PromptAgentApiModelWorkflowOverride] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(AgentConfigApiModelWorkflowOverride) diff --git a/src/elevenlabs/types/agent_workflow_request_model.py b/src/elevenlabs/types/agent_workflow_request_model.py new file mode 100644 index 00000000..64452bd1 --- /dev/null +++ b/src/elevenlabs/types/agent_workflow_request_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_workflow_request_model_nodes_value import AgentWorkflowRequestModelNodesValue +from .workflow_edge_model import WorkflowEdgeModel + + +class AgentWorkflowRequestModel(UncheckedBaseModel): + edges: typing.Optional[typing.Dict[str, WorkflowEdgeModel]] = None + nodes: typing.Optional[typing.Dict[str, AgentWorkflowRequestModelNodesValue]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py new file mode 100644 index 00000000..bf449b87 --- /dev/null +++ b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py @@ -0,0 +1,130 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride +from .knowledge_base_locator import KnowledgeBaseLocator +from .position import Position +from .transfer_type_enum import TransferTypeEnum +from .workflow_phone_number_node_model_transfer_destination import WorkflowPhoneNumberNodeModelTransferDestination +from .workflow_tool_locator import WorkflowToolLocator + + +class AgentWorkflowRequestModelNodesValue_End(UncheckedBaseModel): + type: typing.Literal["end"] = "end" + position: typing.Optional[Position] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowRequestModelNodesValue_OverrideAgent(UncheckedBaseModel): + type: typing.Literal["override_agent"] = "override_agent" + conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverride] = None + additional_prompt: typing.Optional[str] = None + additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = None + additional_tool_ids: typing.Optional[typing.List[str]] = None + position: typing.Optional[Position] = None + label: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + + +class AgentWorkflowRequestModelNodesValue_PhoneNumber(UncheckedBaseModel): + type: typing.Literal["phone_number"] = "phone_number" + position: typing.Optional[Position] = None + transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination + transfer_type: typing.Optional[TransferTypeEnum] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowRequestModelNodesValue_StandaloneAgent(UncheckedBaseModel): + type: typing.Literal["standalone_agent"] = "standalone_agent" + position: typing.Optional[Position] = None + agent_id: str + delay_ms: typing.Optional[int] = None + transfer_message: typing.Optional[str] = None + enable_transferred_agent_first_message: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowRequestModelNodesValue_Start(UncheckedBaseModel): + type: typing.Literal["start"] = "start" + position: typing.Optional[Position] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowRequestModelNodesValue_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + position: typing.Optional[Position] = None + tools: typing.Optional[typing.List[WorkflowToolLocator]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AgentWorkflowRequestModelNodesValue = typing_extensions.Annotated[ + typing.Union[ + AgentWorkflowRequestModelNodesValue_End, + AgentWorkflowRequestModelNodesValue_OverrideAgent, + AgentWorkflowRequestModelNodesValue_PhoneNumber, + AgentWorkflowRequestModelNodesValue_StandaloneAgent, + AgentWorkflowRequestModelNodesValue_Start, + AgentWorkflowRequestModelNodesValue_Tool, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(AgentWorkflowRequestModelNodesValue_OverrideAgent) diff --git a/src/elevenlabs/types/asr_conversational_config_workflow_override.py b/src/elevenlabs/types/asr_conversational_config_workflow_override.py new file mode 100644 index 00000000..f82c7721 --- /dev/null +++ b/src/elevenlabs/types/asr_conversational_config_workflow_override.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .asr_input_format import AsrInputFormat +from .asr_provider import AsrProvider +from .asr_quality import AsrQuality + + +class AsrConversationalConfigWorkflowOverride(UncheckedBaseModel): + quality: typing.Optional[AsrQuality] = pydantic.Field(default=None) + """ + The quality of the transcription + """ + + provider: typing.Optional[AsrProvider] = pydantic.Field(default=None) + """ + The provider of the transcription service + """ + + user_input_audio_format: typing.Optional[AsrInputFormat] = pydantic.Field(default=None) + """ + The format of the audio to be transcribed + """ + + keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Keywords to boost prediction probability for + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/built_in_tools_workflow_override.py b/src/elevenlabs/types/built_in_tools_workflow_override.py new file mode 100644 index 00000000..d113ff54 --- /dev/null +++ b/src/elevenlabs/types/built_in_tools_workflow_override.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .system_tool_config_input import SystemToolConfigInput + + +class BuiltInToolsWorkflowOverride(UncheckedBaseModel): + end_call: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The end call tool + """ + + language_detection: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The language detection tool + """ + + transfer_to_agent: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The transfer to agent tool + """ + + transfer_to_number: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The transfer to number tool + """ + + skip_turn: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The skip turn tool + """ + + play_keypad_touch_tone: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The play DTMF tool + """ + + voicemail_detection: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The voicemail detection tool + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/caption_style_template_model.py b/src/elevenlabs/types/caption_style_template_model.py index e2f7b6fe..864e4c2e 100644 --- a/src/elevenlabs/types/caption_style_template_model.py +++ b/src/elevenlabs/types/caption_style_template_model.py @@ -10,6 +10,7 @@ class CaptionStyleTemplateModel(UncheckedBaseModel): key: str label: str + requires_high_fps: typing.Optional[bool] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/conversation_config_workflow_override.py b/src/elevenlabs/types/conversation_config_workflow_override.py new file mode 100644 index 00000000..0fbaa739 --- /dev/null +++ b/src/elevenlabs/types/conversation_config_workflow_override.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_event import ClientEvent + + +class ConversationConfigWorkflowOverride(UncheckedBaseModel): + text_only: typing.Optional[bool] = pydantic.Field(default=None) + """ + If enabled audio will not be processed and only text will be used, use to avoid audio pricing. + """ + + max_duration_seconds: typing.Optional[int] = pydantic.Field(default=None) + """ + The maximum duration of a conversation in seconds + """ + + client_events: typing.Optional[typing.List[ClientEvent]] = pydantic.Field(default=None) + """ + The events that will be sent to the client + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_multivoice_message_model.py b/src/elevenlabs/types/conversation_history_multivoice_message_model.py new file mode 100644 index 00000000..011ac3bc --- /dev/null +++ b/src/elevenlabs/types/conversation_history_multivoice_message_model.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_multivoice_message_part_model import ConversationHistoryMultivoiceMessagePartModel + + +class ConversationHistoryMultivoiceMessageModel(UncheckedBaseModel): + """ + Represents a message from a multi-voice agent. + """ + + parts: typing.List[ConversationHistoryMultivoiceMessagePartModel] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_multivoice_message_part_model.py b/src/elevenlabs/types/conversation_history_multivoice_message_part_model.py new file mode 100644 index 00000000..5c84b46f --- /dev/null +++ b/src/elevenlabs/types/conversation_history_multivoice_message_part_model.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ConversationHistoryMultivoiceMessagePartModel(UncheckedBaseModel): + """ + Represents a single voice part of a multi-voice message. + """ + + text: str + voice_label: typing.Optional[str] = None + time_in_call_secs: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py index 5999c83a..3fd4a2af 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel from .conversation_history_transcript_common_model_input_role import ConversationHistoryTranscriptCommonModelInputRole from .conversation_history_transcript_common_model_input_source_medium import ( ConversationHistoryTranscriptCommonModelInputSourceMedium, @@ -24,6 +25,7 @@ class ConversationHistoryTranscriptCommonModelInput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelInputRole message: typing.Optional[str] = None + multivoice_message: typing.Optional[ConversationHistoryMultivoiceMessageModel] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelInputToolResultsItem]] = None feedback: typing.Optional[UserFeedback] = None diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py index 26ae71a1..ac4008b1 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel from .conversation_history_transcript_common_model_output_role import ConversationHistoryTranscriptCommonModelOutputRole from .conversation_history_transcript_common_model_output_source_medium import ( ConversationHistoryTranscriptCommonModelOutputSourceMedium, @@ -24,6 +25,7 @@ class ConversationHistoryTranscriptCommonModelOutput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelOutputRole message: typing.Optional[str] = None + multivoice_message: typing.Optional[ConversationHistoryMultivoiceMessageModel] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None tool_results: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutputToolResultsItem]] = None feedback: typing.Optional[UserFeedback] = None diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override.py new file mode 100644 index 00000000..d85dfc34 --- /dev/null +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride +from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride +from .conversation_config_workflow_override import ConversationConfigWorkflowOverride +from .language_preset_input import LanguagePresetInput +from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride +from .turn_config_workflow_override import TurnConfigWorkflowOverride + + +class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): + asr: typing.Optional[AsrConversationalConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for conversational transcription + """ + + turn: typing.Optional[TurnConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for turn detection + """ + + tts: typing.Optional[TtsConversationalConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for conversational text to speech + """ + + conversation: typing.Optional[ConversationConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for conversational events + """ + + language_presets: typing.Optional[typing.Dict[str, typing.Optional[LanguagePresetInput]]] = pydantic.Field( + default=None + ) + """ + Language presets for conversations + """ + + agent: typing.Optional[AgentConfigApiModelWorkflowOverride] = pydantic.Field(default=None) + """ + Agent specific configuration + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(ConversationalConfigApiModelWorkflowOverride) diff --git a/src/elevenlabs/types/dubbing_release_channel.py b/src/elevenlabs/types/dubbing_release_channel.py new file mode 100644 index 00000000..4fbeee49 --- /dev/null +++ b/src/elevenlabs/types/dubbing_release_channel.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DubbingReleaseChannel = typing.Union[typing.Literal["stable", "release", "experimental"], typing.Any] diff --git a/src/elevenlabs/types/dynamic_variables_config_workflow_override.py b/src/elevenlabs/types/dynamic_variables_config_workflow_override.py new file mode 100644 index 00000000..47d1eb9c --- /dev/null +++ b/src/elevenlabs/types/dynamic_variables_config_workflow_override.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value import ( + DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, +) + + +class DynamicVariablesConfigWorkflowOverride(UncheckedBaseModel): + dynamic_variable_placeholders: typing.Optional[ + typing.Dict[str, typing.Optional[DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue]] + ] = pydantic.Field(default=None) + """ + A dictionary of dynamic variable placeholders and their values + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value.py b/src/elevenlabs/types/dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value.py new file mode 100644 index 00000000..93cef35a --- /dev/null +++ b/src/elevenlabs/types/dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue = typing.Union[str, float, int, bool] diff --git a/src/elevenlabs/types/multichannel_speech_to_text_response_model.py b/src/elevenlabs/types/multichannel_speech_to_text_response_model.py index c13a1ff7..cd19f9ce 100644 --- a/src/elevenlabs/types/multichannel_speech_to_text_response_model.py +++ b/src/elevenlabs/types/multichannel_speech_to_text_response_model.py @@ -18,6 +18,11 @@ class MultichannelSpeechToTextResponseModel(UncheckedBaseModel): List of transcripts, one for each audio channel. Each transcript contains the text and word-level details for its respective channel. """ + transcription_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The transcription ID of the response. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/position.py b/src/elevenlabs/types/position.py new file mode 100644 index 00000000..d1b131e9 --- /dev/null +++ b/src/elevenlabs/types/position.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class Position(UncheckedBaseModel): + x: typing.Optional[float] = None + y: typing.Optional[float] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/project_extended_response.py b/src/elevenlabs/types/project_extended_response.py index 88e54d52..8340348a 100644 --- a/src/elevenlabs/types/project_extended_response.py +++ b/src/elevenlabs/types/project_extended_response.py @@ -170,6 +170,11 @@ class ProjectExtendedResponse(UncheckedBaseModel): Global styling to be applied to all captions """ + public_share_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The public share ID of the project. + """ + quality_preset: ProjectExtendedResponseModelQualityPreset = pydantic.Field() """ The quality preset level of the project. diff --git a/src/elevenlabs/types/project_response.py b/src/elevenlabs/types/project_response.py index 12d21138..93def094 100644 --- a/src/elevenlabs/types/project_response.py +++ b/src/elevenlabs/types/project_response.py @@ -165,6 +165,11 @@ class ProjectResponse(UncheckedBaseModel): Global styling to be applied to all captions """ + public_share_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The public share ID of the project. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py new file mode 100644 index 00000000..b6205233 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py @@ -0,0 +1,102 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride +from .custom_llm import CustomLlm +from .knowledge_base_locator import KnowledgeBaseLocator +from .llm import Llm +from .prompt_agent_api_model_workflow_override_tools_item import PromptAgentApiModelWorkflowOverrideToolsItem +from .rag_config_workflow_override import RagConfigWorkflowOverride + + +class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): + prompt: typing.Optional[str] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + llm: typing.Optional[Llm] = pydantic.Field(default=None) + """ + The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + The temperature for the LLM + """ + + max_tokens: typing.Optional[int] = pydantic.Field(default=None) + """ + If greater than 0, maximum number of tokens the LLM can predict + """ + + tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of IDs of tools used by the agent + """ + + built_in_tools: typing.Optional[BuiltInToolsWorkflowOverride] = pydantic.Field(default=None) + """ + Built-in system tools to be used by the agent + """ + + mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of MCP server ids to be used by the agent + """ + + native_mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of Native MCP server ids to be used by the agent + """ + + knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = pydantic.Field(default=None) + """ + A list of knowledge bases to be used by the agent + """ + + custom_llm: typing.Optional[CustomLlm] = pydantic.Field(default=None) + """ + Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM' + """ + + ignore_default_personality: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to ignore the default personality + """ + + rag: typing.Optional[RagConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for RAG + """ + + timezone: typing.Optional[str] = pydantic.Field(default=None) + """ + Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). + """ + + tools: typing.Optional[typing.List[PromptAgentApiModelWorkflowOverrideToolsItem]] = pydantic.Field(default=None) + """ + A list of tools that the agent can use over the course of the conversation, use tool_ids instead + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(PromptAgentApiModelWorkflowOverride) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py new file mode 100644 index 00000000..47e96009 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py @@ -0,0 +1,118 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment +from .dynamic_variables_config import DynamicVariablesConfig +from .system_tool_config_input_params import SystemToolConfigInputParams +from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput + + +class PromptAgentApiModelWorkflowOverrideToolsItem_Client(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["client"] = "client" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None + expects_response: typing.Optional[bool] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelWorkflowOverrideToolsItem_Mcp(UncheckedBaseModel): + value: typing.Optional[typing.Any] = None + type: typing.Literal["mcp"] = "mcp" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + + +class PromptAgentApiModelWorkflowOverrideToolsItem_System(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["system"] = "system" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + params: SystemToolConfigInputParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelWorkflowOverrideToolsItem_Webhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["webhook"] = "webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + api_schema: WebhookToolApiSchemaConfigInput + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +PromptAgentApiModelWorkflowOverrideToolsItem = typing_extensions.Annotated[ + typing.Union[ + PromptAgentApiModelWorkflowOverrideToolsItem_Client, + PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideToolsItem_System, + PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(PromptAgentApiModelWorkflowOverrideToolsItem_Client) +update_forward_refs(PromptAgentApiModelWorkflowOverrideToolsItem_Webhook) diff --git a/src/elevenlabs/types/rag_config_workflow_override.py b/src/elevenlabs/types/rag_config_workflow_override.py new file mode 100644 index 00000000..bd040658 --- /dev/null +++ b/src/elevenlabs/types/rag_config_workflow_override.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .embedding_model_enum import EmbeddingModelEnum + + +class RagConfigWorkflowOverride(UncheckedBaseModel): + enabled: typing.Optional[bool] = None + embedding_model: typing.Optional[EmbeddingModelEnum] = None + max_vector_distance: typing.Optional[float] = pydantic.Field(default=None) + """ + Maximum vector distance of retrieved chunks. + """ + + max_documents_length: typing.Optional[int] = pydantic.Field(default=None) + """ + Maximum total length of document chunks retrieved from RAG. + """ + + max_retrieved_rag_chunks_count: typing.Optional[int] = pydantic.Field(default=None) + """ + Maximum number of RAG document chunks to initially retrieve from the vector store. These are then further filtered by vector distance and total length. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/resource_metadata_response_model.py b/src/elevenlabs/types/resource_metadata_response_model.py index d7be4a2d..8a55dff3 100644 --- a/src/elevenlabs/types/resource_metadata_response_model.py +++ b/src/elevenlabs/types/resource_metadata_response_model.py @@ -5,6 +5,9 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .resource_metadata_response_model_anonymous_access_level_override import ( + ResourceMetadataResponseModelAnonymousAccessLevelOverride, +) from .share_option_response_model import ShareOptionResponseModel from .workspace_resource_type import WorkspaceResourceType @@ -25,6 +28,13 @@ class ResourceMetadataResponseModel(UncheckedBaseModel): The ID of the user who created the resource. """ + anonymous_access_level_override: typing.Optional[ResourceMetadataResponseModelAnonymousAccessLevelOverride] = ( + pydantic.Field(default=None) + ) + """ + The access level for anonymous users. If None, the resource is not shared publicly. + """ + role_to_group_ids: typing.Dict[str, typing.List[str]] = pydantic.Field() """ A mapping of roles to group IDs. When the resource is shared with a user, the group id is the user's id. diff --git a/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py b/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py new file mode 100644 index 00000000..93840e72 --- /dev/null +++ b/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResourceMetadataResponseModelAnonymousAccessLevelOverride = typing.Union[ + typing.Literal["admin", "editor", "viewer"], typing.Any +] diff --git a/src/elevenlabs/types/single_test_run_request_model.py b/src/elevenlabs/types/single_test_run_request_model.py index 086a24ef..a8697bbe 100644 --- a/src/elevenlabs/types/single_test_run_request_model.py +++ b/src/elevenlabs/types/single_test_run_request_model.py @@ -13,6 +13,11 @@ class SingleTestRunRequestModel(UncheckedBaseModel): ID of the test to run """ + workflow_node_id: typing.Optional[str] = pydantic.Field(default=None) + """ + ID of the workflow node to run the test on. If not provided, the test will be run on the agent's default workflow node. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/speech_history_item_response.py b/src/elevenlabs/types/speech_history_item_response.py index c6a0c9af..3b1a2989 100644 --- a/src/elevenlabs/types/speech_history_item_response.py +++ b/src/elevenlabs/types/speech_history_item_response.py @@ -86,7 +86,7 @@ class SpeechHistoryItemResponse(UncheckedBaseModel): source: typing.Optional[SpeechHistoryItemResponseModelSource] = pydantic.Field(default=None) """ - The source of the history item. Either TTS (text to speech), STS (speech to text), AN (audio native), Projects, Dubbing, PlayAPI, PD (pronunciation dictionary) or ConvAI (conversational AI). + The source of the history item. Either TTS (text to speech), STS (speech to text), AN (audio native), Projects, Dubbing, PlayAPI, PD (pronunciation dictionary) or ConvAI (Agents Platform). """ alignments: typing.Optional[HistoryAlignmentsResponseModel] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/speech_to_text_chunk_response_model.py b/src/elevenlabs/types/speech_to_text_chunk_response_model.py index 3c324ddd..6b99c271 100644 --- a/src/elevenlabs/types/speech_to_text_chunk_response_model.py +++ b/src/elevenlabs/types/speech_to_text_chunk_response_model.py @@ -46,6 +46,11 @@ class SpeechToTextChunkResponseModel(UncheckedBaseModel): Requested additional formats of the transcript. """ + transcription_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The transcription ID of the response. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/speech_to_text_webhook_response_model.py b/src/elevenlabs/types/speech_to_text_webhook_response_model.py index 59707adb..f6803f75 100644 --- a/src/elevenlabs/types/speech_to_text_webhook_response_model.py +++ b/src/elevenlabs/types/speech_to_text_webhook_response_model.py @@ -18,6 +18,11 @@ class SpeechToTextWebhookResponseModel(UncheckedBaseModel): The request ID of the webhook response. """ + transcription_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The transcription ID of the webhook response. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/test_run_metadata.py b/src/elevenlabs/types/test_run_metadata.py new file mode 100644 index 00000000..0e294ddf --- /dev/null +++ b/src/elevenlabs/types/test_run_metadata.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_run_metadata_test_type import TestRunMetadataTestType + + +class TestRunMetadata(UncheckedBaseModel): + workspace_id: str + test_name: str + ran_by_user_email: str + test_type: typing.Optional[TestRunMetadataTestType] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/test_run_metadata_test_type.py b/src/elevenlabs/types/test_run_metadata_test_type.py new file mode 100644 index 00000000..9ec90575 --- /dev/null +++ b/src/elevenlabs/types/test_run_metadata_test_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestRunMetadataTestType = typing.Union[typing.Literal["llm", "tool_call"], typing.Any] diff --git a/src/elevenlabs/types/tts_conversational_config_workflow_override.py b/src/elevenlabs/types/tts_conversational_config_workflow_override.py new file mode 100644 index 00000000..f32bbf28 --- /dev/null +++ b/src/elevenlabs/types/tts_conversational_config_workflow_override.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pydantic_pronunciation_dictionary_version_locator import PydanticPronunciationDictionaryVersionLocator +from .supported_voice import SupportedVoice +from .tts_conversational_model import TtsConversationalModel +from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency +from .tts_output_format import TtsOutputFormat + + +class TtsConversationalConfigWorkflowOverride(UncheckedBaseModel): + model_id: typing.Optional[TtsConversationalModel] = pydantic.Field(default=None) + """ + The model to use for TTS + """ + + voice_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The voice ID to use for TTS + """ + + supported_voices: typing.Optional[typing.List[SupportedVoice]] = pydantic.Field(default=None) + """ + Additional supported voices for the agent + """ + + agent_output_audio_format: typing.Optional[TtsOutputFormat] = pydantic.Field(default=None) + """ + The audio format to use for TTS + """ + + optimize_streaming_latency: typing.Optional[TtsOptimizeStreamingLatency] = pydantic.Field(default=None) + """ + The optimization for streaming latency + """ + + stability: typing.Optional[float] = pydantic.Field(default=None) + """ + The stability of generated speech + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + The speed of generated speech + """ + + similarity_boost: typing.Optional[float] = pydantic.Field(default=None) + """ + The similarity boost for generated speech + """ + + pronunciation_dictionary_locators: typing.Optional[typing.List[PydanticPronunciationDictionaryVersionLocator]] = ( + pydantic.Field(default=None) + ) + """ + The pronunciation dictionary locators + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/turn_config_workflow_override.py b/src/elevenlabs/types/turn_config_workflow_override.py new file mode 100644 index 00000000..8a790c95 --- /dev/null +++ b/src/elevenlabs/types/turn_config_workflow_override.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .turn_mode import TurnMode + + +class TurnConfigWorkflowOverride(UncheckedBaseModel): + turn_timeout: typing.Optional[float] = pydantic.Field(default=None) + """ + Maximum wait time for the user's reply before re-engaging the user + """ + + silence_end_call_timeout: typing.Optional[float] = pydantic.Field(default=None) + """ + Maximum wait time since the user last spoke before terminating the call + """ + + mode: typing.Optional[TurnMode] = pydantic.Field(default=None) + """ + The mode of turn detection + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py index 47eb234d..58359c8b 100644 --- a/src/elevenlabs/types/unit_test_run_response_model.py +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput from .test_condition_result_common_model import TestConditionResultCommonModel +from .test_run_metadata import TestRunMetadata from .test_run_status import TestRunStatus @@ -16,11 +17,13 @@ class UnitTestRunResponseModel(UncheckedBaseModel): test_run_id: str test_invocation_id: str agent_id: str + workflow_node_id: typing.Optional[str] = None status: TestRunStatus agent_responses: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutput]] = None test_id: str condition_result: typing.Optional[TestConditionResultCommonModel] = None last_updated_at_unix: typing.Optional[int] = None + metadata: typing.Optional[TestRunMetadata] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/workflow_edge_model.py b/src/elevenlabs/types/workflow_edge_model.py new file mode 100644 index 00000000..483f2e6b --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_edge_model_backward_condition import WorkflowEdgeModelBackwardCondition +from .workflow_edge_model_forward_condition import WorkflowEdgeModelForwardCondition + + +class WorkflowEdgeModel(UncheckedBaseModel): + source: str + target: str + forward_condition: typing.Optional[WorkflowEdgeModelForwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the forward direction. + """ + + backward_condition: typing.Optional[WorkflowEdgeModelBackwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the backward direction. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_edge_model_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_backward_condition.py new file mode 100644 index 00000000..f404989e --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_backward_condition.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowEdgeModelBackwardCondition_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + label: typing.Optional[str] = None + condition: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelBackwardCondition_Result(UncheckedBaseModel): + type: typing.Literal["result"] = "result" + label: typing.Optional[str] = None + successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelBackwardCondition_Unconditional(UncheckedBaseModel): + type: typing.Literal["unconditional"] = "unconditional" + label: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowEdgeModelBackwardCondition = typing_extensions.Annotated[ + typing.Union[ + WorkflowEdgeModelBackwardCondition_Llm, + WorkflowEdgeModelBackwardCondition_Result, + WorkflowEdgeModelBackwardCondition_Unconditional, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/elevenlabs/types/workflow_edge_model_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_forward_condition.py new file mode 100644 index 00000000..14313e47 --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_forward_condition.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowEdgeModelForwardCondition_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + label: typing.Optional[str] = None + condition: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelForwardCondition_Result(UncheckedBaseModel): + type: typing.Literal["result"] = "result" + label: typing.Optional[str] = None + successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelForwardCondition_Unconditional(UncheckedBaseModel): + type: typing.Literal["unconditional"] = "unconditional" + label: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowEdgeModelForwardCondition = typing_extensions.Annotated[ + typing.Union[ + WorkflowEdgeModelForwardCondition_Llm, + WorkflowEdgeModelForwardCondition_Result, + WorkflowEdgeModelForwardCondition_Unconditional, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/elevenlabs/types/workflow_end_node_model.py b/src/elevenlabs/types/workflow_end_node_model.py new file mode 100644 index 00000000..61eb208f --- /dev/null +++ b/src/elevenlabs/types/workflow_end_node_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position import Position + + +class WorkflowEndNodeModel(UncheckedBaseModel): + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_llm_condition_model.py b/src/elevenlabs/types/workflow_llm_condition_model.py new file mode 100644 index 00000000..e07dbc2e --- /dev/null +++ b/src/elevenlabs/types/workflow_llm_condition_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowLlmConditionModel(UncheckedBaseModel): + label: typing.Optional[str] = None + condition: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_override_agent_node_model.py b/src/elevenlabs/types/workflow_override_agent_node_model.py new file mode 100644 index 00000000..e30a5acc --- /dev/null +++ b/src/elevenlabs/types/workflow_override_agent_node_model.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride +from .knowledge_base_locator import KnowledgeBaseLocator +from .position import Position + + +class WorkflowOverrideAgentNodeModel(UncheckedBaseModel): + conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverride] = None + additional_prompt: typing.Optional[str] = None + additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = None + additional_tool_ids: typing.Optional[typing.List[str]] = None + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + label: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowOverrideAgentNodeModel) diff --git a/src/elevenlabs/types/workflow_phone_number_node_model.py b/src/elevenlabs/types/workflow_phone_number_node_model.py new file mode 100644 index 00000000..a4d2ae4a --- /dev/null +++ b/src/elevenlabs/types/workflow_phone_number_node_model.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position import Position +from .transfer_type_enum import TransferTypeEnum +from .workflow_phone_number_node_model_transfer_destination import WorkflowPhoneNumberNodeModelTransferDestination + + +class WorkflowPhoneNumberNodeModel(UncheckedBaseModel): + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination + transfer_type: typing.Optional[TransferTypeEnum] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py b/src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py new file mode 100644 index 00000000..3370c4ba --- /dev/null +++ b/src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowPhoneNumberNodeModelTransferDestination_Phone(UncheckedBaseModel): + type: typing.Literal["phone"] = "phone" + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowPhoneNumberNodeModelTransferDestination_SipUri(UncheckedBaseModel): + type: typing.Literal["sip_uri"] = "sip_uri" + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowPhoneNumberNodeModelTransferDestination = typing_extensions.Annotated[ + typing.Union[ + WorkflowPhoneNumberNodeModelTransferDestination_Phone, WorkflowPhoneNumberNodeModelTransferDestination_SipUri + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/elevenlabs/types/workflow_result_condition_model.py b/src/elevenlabs/types/workflow_result_condition_model.py new file mode 100644 index 00000000..bab48c79 --- /dev/null +++ b/src/elevenlabs/types/workflow_result_condition_model.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowResultConditionModel(UncheckedBaseModel): + label: typing.Optional[str] = None + successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_standalone_agent_node_model.py b/src/elevenlabs/types/workflow_standalone_agent_node_model.py new file mode 100644 index 00000000..8f3f75d5 --- /dev/null +++ b/src/elevenlabs/types/workflow_standalone_agent_node_model.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position import Position + + +class WorkflowStandaloneAgentNodeModel(UncheckedBaseModel): + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + agent_id: str + delay_ms: typing.Optional[int] = None + transfer_message: typing.Optional[str] = None + enable_transferred_agent_first_message: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_start_node_model.py b/src/elevenlabs/types/workflow_start_node_model.py new file mode 100644 index 00000000..dd71e8a5 --- /dev/null +++ b/src/elevenlabs/types/workflow_start_node_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position import Position + + +class WorkflowStartNodeModel(UncheckedBaseModel): + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_tool_locator.py b/src/elevenlabs/types/workflow_tool_locator.py new file mode 100644 index 00000000..a3b69320 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_locator.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowToolLocator(UncheckedBaseModel): + tool_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_tool_node_model.py b/src/elevenlabs/types/workflow_tool_node_model.py new file mode 100644 index 00000000..fb1f41f0 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_node_model.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position import Position +from .workflow_tool_locator import WorkflowToolLocator + + +class WorkflowToolNodeModel(UncheckedBaseModel): + position: typing.Optional[Position] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + tools: typing.Optional[typing.List[WorkflowToolLocator]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_unconditional_model.py b/src/elevenlabs/types/workflow_unconditional_model.py new file mode 100644 index 00000000..14cc925a --- /dev/null +++ b/src/elevenlabs/types/workflow_unconditional_model.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowUnconditionalModel(UncheckedBaseModel): + label: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow From 86987eb01414607618cf46fc8ff1857ac00f56e2 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 08:50:16 +0200 Subject: [PATCH 13/34] :herb: Fern Regeneration -- September 8, 2025 (#622) * SDK regeneration * fix --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Paul Asjes --- poetry.lock | 2 +- pyproject.toml | 4 +- reference.md | 161 + requirements.txt | 2 +- src/elevenlabs/__init__.py | 2795 +++++++++++------ src/elevenlabs/audio_isolation/__init__.py | 30 +- .../audio_isolation/types/__init__.py | 32 +- src/elevenlabs/base_client.py | 520 ++- src/elevenlabs/client.py | 10 +- src/elevenlabs/conversational_ai/__init__.py | 119 +- .../conversational_ai/agents/__init__.py | 27 +- .../conversational_ai/agents/client.py | 103 +- .../agents/widget/__init__.py | 27 +- .../conversational_ai/agents/widget/client.py | 28 +- src/elevenlabs/conversational_ai/client.py | 319 +- .../conversations/__init__.py | 33 +- .../conversational_ai/conversations/client.py | 52 +- .../conversations/types/__init__.py | 29 +- .../conversational_ai/dashboard/__init__.py | 45 +- .../conversational_ai/dashboard/client.py | 30 +- .../dashboard/settings/__init__.py | 42 +- .../dashboard/settings/types/__init__.py | 42 +- .../knowledge_base/__init__.py | 58 +- .../knowledge_base/client.py | 52 +- .../knowledge_base/documents/__init__.py | 57 +- .../knowledge_base/documents/client.py | 27 +- .../documents/types/__init__.py | 58 +- .../conversational_ai/mcp_servers/__init__.py | 27 +- .../conversational_ai/mcp_servers/client.py | 75 +- .../phone_numbers/__init__.py | 66 +- .../phone_numbers/types/__init__.py | 78 +- .../conversational_ai/tests/__init__.py | 33 +- .../conversational_ai/tests/client.py | 27 +- .../conversational_ai/tests/types/__init__.py | 32 +- src/elevenlabs/core/__init__.py | 96 +- src/elevenlabs/core/client_wrapper.py | 24 +- src/elevenlabs/core/force_multipart.py | 6 +- src/elevenlabs/core/http_response.py | 2 +- src/elevenlabs/core/pydantic_utilities.py | 11 +- src/elevenlabs/core/unchecked_base_model.py | 44 +- src/elevenlabs/dubbing/__init__.py | 38 +- src/elevenlabs/dubbing/client.py | 75 +- src/elevenlabs/dubbing/resource/__init__.py | 27 +- src/elevenlabs/dubbing/resource/client.py | 75 +- .../dubbing/resource/speaker/__init__.py | 27 +- .../dubbing/resource/speaker/client.py | 27 +- src/elevenlabs/dubbing/transcript/__init__.py | 27 +- .../dubbing/transcript/types/__init__.py | 29 +- src/elevenlabs/dubbing/types/__init__.py | 32 +- src/elevenlabs/errors/__init__.py | 44 +- src/elevenlabs/history/__init__.py | 27 +- src/elevenlabs/history/types/__init__.py | 27 +- src/elevenlabs/music/__init__.py | 42 +- src/elevenlabs/music/client.py | 27 +- src/elevenlabs/music/types/__init__.py | 35 +- .../pronunciation_dictionaries/__init__.py | 60 +- .../pronunciation_dictionaries/client.py | 27 +- .../rules/__init__.py | 35 +- .../rules/types/__init__.py | 39 +- .../types/__init__.py | 56 +- src/elevenlabs/service_accounts/__init__.py | 45 +- .../service_accounts/api_keys/__init__.py | 42 +- .../api_keys/types/__init__.py | 54 +- src/elevenlabs/service_accounts/client.py | 28 +- src/elevenlabs/speech_to_speech/__init__.py | 42 +- .../speech_to_speech/types/__init__.py | 38 +- src/elevenlabs/speech_to_text/__init__.py | 48 +- src/elevenlabs/speech_to_text/client.py | 27 +- .../speech_to_text/transcripts/__init__.py | 27 +- .../transcripts/types/__init__.py | 27 +- .../speech_to_text/types/__init__.py | 38 +- src/elevenlabs/studio/__init__.py | 76 +- src/elevenlabs/studio/client.py | 27 +- src/elevenlabs/studio/projects/__init__.py | 48 +- .../studio/projects/chapters/__init__.py | 27 +- .../studio/projects/chapters/client.py | 27 +- src/elevenlabs/studio/projects/client.py | 99 +- .../studio/projects/types/__init__.py | 38 +- src/elevenlabs/studio/types/__init__.py | 69 +- src/elevenlabs/text_to_dialogue/__init__.py | 42 +- .../text_to_dialogue/types/__init__.py | 46 +- .../text_to_sound_effects/__init__.py | 27 +- .../text_to_sound_effects/types/__init__.py | 29 +- src/elevenlabs/text_to_speech/__init__.py | 54 +- .../text_to_speech/types/__init__.py | 74 +- src/elevenlabs/text_to_voice/__init__.py | 45 +- src/elevenlabs/text_to_voice/client.py | 226 +- src/elevenlabs/text_to_voice/raw_client.py | 234 ++ .../text_to_voice/types/__init__.py | 38 +- ...xt_to_voice_remix_request_output_format.py | 28 + src/elevenlabs/types/__init__.py | 2758 ++++++++++------ src/elevenlabs/types/agent_config.py | 5 + ...gent_config_api_model_workflow_override.py | 5 + .../types/agent_workflow_request_model.py | 10 +- .../object_json_schema_property_input.py | 1 + .../object_json_schema_property_output.py | 1 + .../workflow_tool_response_model_input.py | 2 - .../workflow_tool_response_model_output.py | 2 - src/elevenlabs/user/__init__.py | 27 +- src/elevenlabs/user/client.py | 28 +- .../__init__.py | 27 +- .../types/__init__.py | 32 +- .../__init__.py | 27 +- .../types/__init__.py | 29 +- src/elevenlabs/voices/__init__.py | 35 +- src/elevenlabs/voices/client.py | 99 +- src/elevenlabs/voices/pvc/__init__.py | 27 +- src/elevenlabs/voices/pvc/client.py | 51 +- src/elevenlabs/voices/pvc/samples/__init__.py | 27 +- src/elevenlabs/voices/pvc/samples/client.py | 75 +- .../voices/pvc/samples/speakers/__init__.py | 27 +- .../voices/pvc/samples/speakers/client.py | 28 +- .../voices/pvc/verification/__init__.py | 27 +- .../voices/pvc/verification/client.py | 27 +- src/elevenlabs/voices/samples/__init__.py | 27 +- src/elevenlabs/voices/samples/client.py | 30 +- src/elevenlabs/voices/types/__init__.py | 27 +- src/elevenlabs/workspace/__init__.py | 41 +- src/elevenlabs/workspace/client.py | 102 +- src/elevenlabs/workspace/groups/__init__.py | 27 +- src/elevenlabs/workspace/groups/client.py | 28 +- src/elevenlabs/workspace/invites/__init__.py | 27 +- .../workspace/invites/types/__init__.py | 33 +- src/elevenlabs/workspace/members/__init__.py | 27 +- .../workspace/members/types/__init__.py | 33 +- .../workspace/resources/__init__.py | 29 +- .../workspace/resources/types/__init__.py | 33 +- 127 files changed, 8894 insertions(+), 2618 deletions(-) create mode 100644 src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py diff --git a/poetry.lock b/poetry.lock index b6521cbe..10ee395f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -807,4 +807,4 @@ pyaudio = ["pyaudio"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "b820898bc8f521807e3f8b6d5dc0323fc0b5ff4110a82646f60865bd9738d84a" +content-hash = "b7da141a4d5cf0383830ab57e4341326054c70f2d67cc19d189d4cd1cbaf21c0" diff --git a/pyproject.toml b/pyproject.toml index 9defd7a6..2696993b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.14.0" +version = "v2.15.0" description = "" readme = "README.md" authors = [] @@ -39,7 +39,7 @@ python = "^3.8" httpx = ">=0.21.2" pyaudio = { version = ">=0.2.14", optional = true} pydantic = ">= 1.9.2" -pydantic-core = "^2.18.2" +pydantic-core = ">=2.18.2" requests = ">=2.20" typing_extensions = ">= 4.0.0" websockets = ">=11.0" diff --git a/reference.md b/reference.md index af1106f9..a7b9ea98 100644 --- a/reference.md +++ b/reference.md @@ -2326,6 +2326,165 @@ client.text_to_voice.design(
+ + +
+ +
client.text_to_voice.remix(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_voice.remix( + voice_id="21m00Tcm4TlvDq8ikWAM", + voice_description="Make the voice have a higher pitch.", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**voice_description:** `str` — Description of the changes to make to the voice. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToVoiceRemixRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. + +
+
+ +
+
+ +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. + +
+
+ +
+
+ +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. + +
+
+ +
+
+ +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + +
+
+ +
+
+ +**stream_previews:** `typing.Optional[bool]` — Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + +
+
+ +
+
+ +**remixing_session_id:** `typing.Optional[str]` — The remixing session id. + +
+
+ +
+
+ +**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + +
+
+ +
+
+ +**prompt_strength:** `typing.Optional[float]` — Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -6809,6 +6968,7 @@ client.conversational_ai.agents.simulate_conversation( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) @@ -6913,6 +7073,7 @@ client.conversational_ai.agents.simulate_conversation_stream( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) diff --git a/requirements.txt b/requirements.txt index 90ceac30..fe130d00 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ httpx>=0.21.2 pyaudio>=0.2.14 pydantic>= 1.9.2 -pydantic-core==2.18.2 +pydantic-core>=2.18.2 requests>=2.20 typing_extensions>= 4.0.0 websockets>=11.0 diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index ebf25b60..838ca4a9 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -2,933 +2,1873 @@ # isort: skip_file -from .types import ( - AddChapterResponseModel, - AddKnowledgeBaseResponseModel, - AddProjectRequest, - AddProjectResponseModel, - AddPronunciationDictionaryResponseModel, - AddPronunciationDictionaryResponseModelPermissionOnResource, - AddSharingVoiceRequest, - AddVoiceIvcResponseModel, - AddVoiceResponseModel, - AddWorkspaceGroupMemberResponseModel, - AddWorkspaceInviteResponseModel, - AdditionalFormatResponseModel, - AdditionalFormats, - AdhocAgentConfigOverrideForTestRequestModel, - Age, - AgentCallLimits, - AgentConfig, - AgentConfigApiModelWorkflowOverride, - AgentConfigOverride, - AgentConfigOverrideConfig, - AgentFailureResponseExample, - AgentMetadataResponseModel, - AgentPlatformSettingsRequestModel, - AgentPlatformSettingsResponseModel, - AgentSimulatedChatTestResponseModel, - AgentSuccessfulResponseExample, - AgentSummaryResponseModel, - AgentTestingSettings, - AgentTransfer, - AgentWorkflowRequestModel, - AgentWorkflowRequestModelNodesValue, - AgentWorkflowRequestModelNodesValue_End, - AgentWorkflowRequestModelNodesValue_OverrideAgent, - AgentWorkflowRequestModelNodesValue_PhoneNumber, - AgentWorkflowRequestModelNodesValue_StandaloneAgent, - AgentWorkflowRequestModelNodesValue_Start, - AgentWorkflowRequestModelNodesValue_Tool, - AgentWorkspaceOverridesInput, - AgentWorkspaceOverridesOutput, - Alignment, - AllowlistItem, - ArrayJsonSchemaPropertyInput, - ArrayJsonSchemaPropertyInputItems, - ArrayJsonSchemaPropertyOutput, - ArrayJsonSchemaPropertyOutputItems, - AsrConversationalConfig, - AsrConversationalConfigWorkflowOverride, - AsrInputFormat, - AsrProvider, - AsrQuality, - AttachedTestModel, - AudioNativeCreateProjectResponseModel, - AudioNativeEditContentResponseModel, - AudioNativeProjectSettingsResponseModel, - AudioNativeProjectSettingsResponseModelStatus, - AudioOutput, - AudioOutputMulti, - AudioWithTimestampsResponse, - AuthConnectionLocator, - AuthSettings, - AuthorizationMethod, - BadRequestErrorBody, - BanReasonType, - BatchCallDetailedResponse, - BatchCallRecipientStatus, - BatchCallResponse, - BatchCallStatus, - BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, - BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, - BreakdownTypes, - BuiltInToolsInput, - BuiltInToolsOutput, - BuiltInToolsWorkflowOverride, - CaptionStyleCharacterAnimationModel, - CaptionStyleCharacterAnimationModelEnterType, - CaptionStyleCharacterAnimationModelExitType, - CaptionStyleHorizontalPlacementModel, - CaptionStyleHorizontalPlacementModelAlign, - CaptionStyleModel, - CaptionStyleModelTextAlign, - CaptionStyleModelTextStyle, - CaptionStyleModelTextWeight, - CaptionStyleSectionAnimationModel, - CaptionStyleSectionAnimationModelEnterType, - CaptionStyleSectionAnimationModelExitType, - CaptionStyleTemplateModel, - CaptionStyleVerticalPlacementModel, - CaptionStyleVerticalPlacementModelAlign, - CaptionStyleWordAnimationModel, - CaptionStyleWordAnimationModelEnterType, - CaptionStyleWordAnimationModelExitType, - ChapterContentBlockExtendableNodeResponseModel, - ChapterContentBlockInputModel, - ChapterContentBlockInputModelSubType, - ChapterContentBlockResponseModel, - ChapterContentBlockResponseModelNodesItem, - ChapterContentBlockResponseModelNodesItem_Other, - ChapterContentBlockResponseModelNodesItem_TtsNode, - ChapterContentBlockTtsNodeResponseModel, - ChapterContentInputModel, - ChapterContentParagraphTtsNodeInputModel, - ChapterContentResponseModel, - ChapterResponse, - ChapterSnapshotExtendedResponseModel, - ChapterSnapshotResponse, - ChapterSnapshotsResponse, - ChapterState, - ChapterStatisticsResponse, - ChapterWithContentResponseModel, - ChapterWithContentResponseModelState, - CharacterAlignmentModel, - CharacterAlignmentResponseModel, - CharacterUsageResponse, - ClientEvent, - ClientToolConfigInput, - ClientToolConfigOutput, - CloseConnection, - CloseContext, - CloseSocket, - ConvAiDynamicVariable, - ConvAiSecretLocator, - ConvAiStoredSecretDependencies, - ConvAiStoredSecretDependenciesAgentsItem, - ConvAiStoredSecretDependenciesAgentsItem_Available, - ConvAiStoredSecretDependenciesAgentsItem_Unknown, - ConvAiStoredSecretDependenciesToolsItem, - ConvAiStoredSecretDependenciesToolsItem_Available, - ConvAiStoredSecretDependenciesToolsItem_Unknown, - ConvAiUserSecretDbModel, - ConvAiWebhooks, - ConvAiWorkspaceStoredSecretConfig, - ConversationChargingCommonModel, - ConversationConfig, - ConversationConfigClientOverrideConfigInput, - ConversationConfigClientOverrideConfigOutput, - ConversationConfigClientOverrideInput, - ConversationConfigClientOverrideOutput, - ConversationConfigOverride, - ConversationConfigOverrideConfig, - ConversationConfigWorkflowOverride, - ConversationDeletionSettings, - ConversationHistoryAnalysisCommonModel, - ConversationHistoryBatchCallModel, - ConversationHistoryElevenAssistantCommonModel, - ConversationHistoryErrorCommonModel, - ConversationHistoryEvaluationCriteriaResultCommonModel, - ConversationHistoryFeedbackCommonModel, - ConversationHistoryMetadataCommonModel, - ConversationHistoryMetadataCommonModelPhoneCall, - ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, - ConversationHistoryMetadataCommonModelPhoneCall_Twilio, - ConversationHistoryMultivoiceMessageModel, - ConversationHistoryMultivoiceMessagePartModel, - ConversationHistoryRagUsageCommonModel, - ConversationHistorySipTrunkingPhoneCallModel, - ConversationHistorySipTrunkingPhoneCallModelDirection, - ConversationHistoryTranscriptCommonModelInput, - ConversationHistoryTranscriptCommonModelInputRole, - ConversationHistoryTranscriptCommonModelInputSourceMedium, - ConversationHistoryTranscriptCommonModelInputToolResultsItem, - ConversationHistoryTranscriptCommonModelOutput, - ConversationHistoryTranscriptCommonModelOutputRole, - ConversationHistoryTranscriptCommonModelOutputSourceMedium, - ConversationHistoryTranscriptCommonModelOutputToolResultsItem, - ConversationHistoryTranscriptOtherToolsResultCommonModel, - ConversationHistoryTranscriptOtherToolsResultCommonModelType, - ConversationHistoryTranscriptSystemToolResultCommonModel, - ConversationHistoryTranscriptSystemToolResultCommonModelResult, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, - ConversationHistoryTranscriptToolCallClientDetails, - ConversationHistoryTranscriptToolCallCommonModel, - ConversationHistoryTranscriptToolCallCommonModelToolDetails, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, - ConversationHistoryTranscriptToolCallMcpDetails, - ConversationHistoryTranscriptToolCallWebhookDetails, - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, - ConversationHistoryTwilioPhoneCallModel, - ConversationHistoryTwilioPhoneCallModelDirection, - ConversationInitiationClientDataConfigInput, - ConversationInitiationClientDataConfigOutput, - ConversationInitiationClientDataInternal, - ConversationInitiationClientDataInternalDynamicVariablesValue, - ConversationInitiationClientDataRequestInput, - ConversationInitiationClientDataRequestInputDynamicVariablesValue, - ConversationInitiationClientDataRequestOutput, - ConversationInitiationClientDataRequestOutputDynamicVariablesValue, - ConversationInitiationClientDataWebhook, - ConversationInitiationClientDataWebhookRequestHeadersValue, - ConversationInitiationSource, - ConversationInitiationSourceInfo, - ConversationSignedUrlResponseModel, - ConversationSimulationSpecification, - ConversationSimulationSpecificationDynamicVariablesValue, - ConversationSummaryResponseModel, - ConversationSummaryResponseModelDirection, - ConversationSummaryResponseModelStatus, - ConversationTokenDbModel, - ConversationTokenPurpose, - ConversationTurnMetrics, - ConversationalConfig, - ConversationalConfigApiModelWorkflowOverride, - ConvertChapterResponseModel, - ConvertProjectResponseModel, - CreateAgentResponseModel, - CreateAudioNativeProjectRequest, - CreatePhoneNumberResponseModel, - CreatePreviouslyGeneratedVoiceRequest, - CreatePronunciationDictionaryResponseModel, - CreateSipTrunkPhoneNumberRequest, - CreateTranscriptRequest, - CreateTwilioPhoneNumberRequest, - CreateUnitTestResponseModel, - CustomLlm, - CustomLlmRequestHeadersValue, - DashboardCallSuccessChartModel, - DashboardCriteriaChartModel, - DashboardDataCollectionChartModel, - DataCollectionResultCommonModel, - DeleteChapterRequest, - DeleteChapterResponseModel, - DeleteDubbingResponseModel, - DeleteHistoryItemResponse, - DeleteProjectRequest, - DeleteProjectResponseModel, - DeleteSampleResponse, - DeleteVoiceResponseModel, - DeleteVoiceSampleResponseModel, - DeleteWorkspaceGroupMemberResponseModel, - DeleteWorkspaceInviteResponseModel, - DependentAvailableAgentIdentifier, - DependentAvailableAgentIdentifierAccessLevel, - DependentAvailableToolIdentifier, - DependentAvailableToolIdentifierAccessLevel, - DependentPhoneNumberIdentifier, - DependentUnknownAgentIdentifier, - DependentUnknownToolIdentifier, - DetailedMusicResponse, - DialogueInput, - DialogueInputResponseModel, - DoDubbingResponse, - DocumentUsageModeEnum, - DocxExportOptions, - DubbedSegment, - DubbingMediaMetadata, - DubbingMediaReference, - DubbingMetadataPageResponseModel, - DubbingMetadataResponse, - DubbingReleaseChannel, - DubbingRenderResponseModel, - DubbingResource, - DynamicVariableAssignment, - DynamicVariableUpdateCommonModel, - DynamicVariablesConfig, - DynamicVariablesConfigDynamicVariablePlaceholdersValue, - DynamicVariablesConfigWorkflowOverride, - DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, - EditChapterResponseModel, - EditProjectResponseModel, - EditVoiceResponseModel, - EditVoiceSettingsRequest, - EditVoiceSettingsResponseModel, - EmbedVariant, - EmbeddingModelEnum, - EndCallToolConfig, - EndCallToolResultModel, - EvaluationSettings, - EvaluationSuccessResult, - ExactParameterEvaluationStrategy, - ExportOptions, - ExportOptions_Docx, - ExportOptions_Html, - ExportOptions_Pdf, - ExportOptions_SegmentedJson, - ExportOptions_Srt, - ExportOptions_Txt, - ExtendedSubscriptionResponseModelBillingPeriod, - ExtendedSubscriptionResponseModelCharacterRefreshPeriod, - ExtendedSubscriptionResponseModelCurrency, - ExtendedSubscriptionResponseModelPendingChange, - FeatureStatusCommonModel, - FeaturesUsageCommonModel, - FeedbackItem, - FinalOutput, - FinalOutputMulti, - FineTuningResponse, - FineTuningResponseModelStateValue, - FlushContext, - ForcedAlignmentCharacterResponseModel, - ForcedAlignmentResponseModel, - ForcedAlignmentWordResponseModel, - Gender, - GenerateVoiceRequest, - GenerationConfig, - GetAgentEmbedResponseModel, - GetAgentKnowledgebaseSizeResponseModel, - GetAgentLinkResponseModel, - GetAgentResponseModel, - GetAgentResponseModelPhoneNumbersItem, - GetAgentResponseModelPhoneNumbersItem_SipTrunk, - GetAgentResponseModelPhoneNumbersItem_Twilio, - GetAgentsPageResponseModel, - GetAudioNativeProjectSettingsResponseModel, - GetChapterRequest, - GetChapterSnapshotsRequest, - GetChaptersRequest, - GetChaptersResponse, - GetConvAiDashboardSettingsResponseModel, - GetConvAiDashboardSettingsResponseModelChartsItem, - GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess, - GetConvAiDashboardSettingsResponseModelChartsItem_Criteria, - GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection, - GetConvAiSettingsResponseModel, - GetConversationResponseModel, - GetConversationResponseModelStatus, - GetConversationsPageResponseModel, - GetKnowledgeBaseDependentAgentsResponseModel, - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem, - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available, - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown, - GetKnowledgeBaseFileResponseModel, - GetKnowledgeBaseListResponseModel, - GetKnowledgeBaseListResponseModelDocumentsItem, - GetKnowledgeBaseListResponseModelDocumentsItem_File, - GetKnowledgeBaseListResponseModelDocumentsItem_Text, - GetKnowledgeBaseListResponseModelDocumentsItem_Url, - GetKnowledgeBaseSummaryFileResponseModel, - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown, - GetKnowledgeBaseSummaryTextResponseModel, - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown, - GetKnowledgeBaseSummaryUrlResponseModel, - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown, - GetKnowledgeBaseTextResponseModel, - GetKnowledgeBaseUrlResponseModel, - GetLibraryVoicesResponse, - GetPhoneNumberInboundSipTrunkConfigResponseModel, - GetPhoneNumberOutboundSipTrunkConfigResponseModel, - GetPhoneNumberResponse, - GetPhoneNumberSipTrunkResponseModel, - GetPhoneNumberTwilioResponseModel, - GetProjectRequest, - GetProjectsRequest, - GetProjectsResponse, - GetPronunciationDictionariesMetadataResponseModel, - GetPronunciationDictionariesResponse, - GetPronunciationDictionaryMetadataResponse, - GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, - GetPronunciationDictionaryResponse, - GetSpeechHistoryResponse, - GetTestSuiteInvocationResponseModel, - GetTestsPageResponseModel, - GetTestsSummariesByIdsResponseModel, - GetToolDependentAgentsResponseModel, - GetToolDependentAgentsResponseModelAgentsItem, - GetToolDependentAgentsResponseModelAgentsItem_Available, - GetToolDependentAgentsResponseModelAgentsItem_Unknown, - GetUnitTestResponseModel, - GetUnitTestResponseModelDynamicVariablesValue, - GetVoicesResponse, - GetVoicesV2Response, - GetWorkspaceSecretsResponseModel, - HistoryAlignmentResponseModel, - HistoryAlignmentsResponseModel, - HistoryItemResponse, - HtmlExportOptions, - HttpValidationError, - ImageAvatar, - InboundSipTrunkConfigRequestModel, - InitialiseContext, - InitializeConnection, - InitializeConnectionMulti, - IntegrationType, - InvoiceResponse, - InvoiceResponseModelPaymentIntentStatus, - KeepContextAlive, - KnowledgeBaseDocumentChunkResponseModel, - KnowledgeBaseDocumentMetadataResponseModel, - KnowledgeBaseDocumentType, - KnowledgeBaseLocator, - LanguageAddedResponse, - LanguageDetectionToolConfig, - LanguageDetectionToolResultModel, - LanguagePresetInput, - LanguagePresetOutput, - LanguagePresetTranslation, - LanguageResponse, - LibraryVoiceResponse, - LibraryVoiceResponseModelCategory, - ListMcpToolsResponseModel, - LiteralJsonSchemaProperty, - LiteralJsonSchemaPropertyConstantValue, - LiteralJsonSchemaPropertyType, - Llm, - LlmCategoryUsage, - LlmInputOutputTokensUsage, - LlmParameterEvaluationStrategy, - LlmTokensCategoryUsage, - LlmUsageCalculatorLlmResponseModel, - LlmUsageCalculatorResponseModel, - LlmUsageInput, - LlmUsageOutput, - ManualVerificationFileResponse, - ManualVerificationResponse, - McpApprovalPolicy, - McpServerConfigInput, - McpServerConfigInputRequestHeadersValue, - McpServerConfigInputSecretToken, - McpServerConfigInputUrl, - McpServerConfigOutput, - McpServerConfigOutputRequestHeadersValue, - McpServerConfigOutputSecretToken, - McpServerConfigOutputUrl, - McpServerMetadataResponseModel, - McpServerResponseModel, - McpServerResponseModelDependentAgentsItem, - McpServerResponseModelDependentAgentsItem_Available, - McpServerResponseModelDependentAgentsItem_Unknown, - McpServerTransport, - McpServersResponseModel, - McpToolApprovalHash, - McpToolApprovalPolicy, - MetricRecord, - MetricType, - Model, - ModelRatesResponseModel, - ModelResponseModelConcurrencyGroup, - ModelSettingsResponseModel, - ModerationStatusResponseModel, - ModerationStatusResponseModelSafetyStatus, - ModerationStatusResponseModelWarningStatus, - MultichannelSpeechToTextResponseModel, - MultipartMusicResponse, - MusicPrompt, - NormalizedAlignment, - ObjectJsonSchemaPropertyInput, - ObjectJsonSchemaPropertyInputPropertiesValue, - ObjectJsonSchemaPropertyOutput, - ObjectJsonSchemaPropertyOutputPropertiesValue, - OrbAvatar, - OutboundCallRecipient, - OutboundCallRecipientResponseModel, - OutboundSipTrunkConfigRequestModel, - OutputFormat, - PdfExportOptions, - PendingCancellationResponseModel, - PendingSubscriptionSwitchResponseModel, - PendingSubscriptionSwitchResponseModelNextTier, - PhoneNumberAgentInfo, - PhoneNumberTransfer, - PhoneNumberTransferDestination, - PhoneNumberTransferTransferDestination, - PhoneNumberTransferTransferDestination_Phone, - PhoneNumberTransferTransferDestination_SipUri, - PlayDtmfResultErrorModel, - PlayDtmfResultSuccessModel, - PlayDtmfToolConfig, - PodcastBulletinMode, - PodcastBulletinModeData, - PodcastConversationMode, - PodcastConversationModeData, - PodcastProjectResponseModel, - PodcastTextSource, - PodcastUrlSource, - Position, - PostAgentAvatarResponseModel, - PostWorkspaceSecretResponseModel, - PrivacyConfig, - ProjectCreationMetaResponseModel, - ProjectCreationMetaResponseModelStatus, - ProjectCreationMetaResponseModelType, - ProjectExtendedResponse, - ProjectExtendedResponseModelAccessLevel, - ProjectExtendedResponseModelApplyTextNormalization, - ProjectExtendedResponseModelFiction, - ProjectExtendedResponseModelQualityPreset, - ProjectExtendedResponseModelSourceType, - ProjectExtendedResponseModelTargetAudience, - ProjectResponse, - ProjectResponseModelAccessLevel, - ProjectResponseModelFiction, - ProjectResponseModelSourceType, - ProjectResponseModelTargetAudience, - ProjectSnapshotExtendedResponseModel, - ProjectSnapshotResponse, - ProjectSnapshotsResponse, - ProjectState, - PromptAgent, - PromptAgentApiModelInput, - PromptAgentApiModelInputToolsItem, - PromptAgentApiModelInputToolsItem_Client, - PromptAgentApiModelInputToolsItem_Mcp, - PromptAgentApiModelInputToolsItem_System, - PromptAgentApiModelInputToolsItem_Webhook, - PromptAgentApiModelOutput, - PromptAgentApiModelOutputToolsItem, - PromptAgentApiModelOutputToolsItem_Client, - PromptAgentApiModelOutputToolsItem_Mcp, - PromptAgentApiModelOutputToolsItem_System, - PromptAgentApiModelOutputToolsItem_Webhook, - PromptAgentApiModelOverride, - PromptAgentApiModelOverrideConfig, - PromptAgentApiModelWorkflowOverride, - PromptAgentApiModelWorkflowOverrideToolsItem, - PromptAgentApiModelWorkflowOverrideToolsItem_Client, - PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, - PromptAgentApiModelWorkflowOverrideToolsItem_System, - PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, - PromptAgentDbModel, - PromptEvaluationCriteria, - PronunciationDictionaryAliasRuleRequestModel, - PronunciationDictionaryLocator, - PronunciationDictionaryLocatorResponseModel, - PronunciationDictionaryPhonemeRuleRequestModel, - PronunciationDictionaryRulesResponseModel, - PronunciationDictionaryVersionLocator, - PronunciationDictionaryVersionResponseModel, - PronunciationDictionaryVersionResponseModelPermissionOnResource, - PydanticPronunciationDictionaryVersionLocator, - QueryParamsJsonSchema, - RagChunkMetadata, - RagConfig, - RagConfigWorkflowOverride, - RagDocumentIndexResponseModel, - RagDocumentIndexUsage, - RagDocumentIndexesResponseModel, - RagIndexOverviewEmbeddingModelResponseModel, - RagIndexOverviewResponseModel, - RagIndexStatus, - RagRetrievalInfo, - ReaderResourceResponseModel, - ReaderResourceResponseModelResourceType, - RealtimeVoiceSettings, - RecordingResponse, - ReferencedToolCommonModel, - RegexParameterEvaluationStrategy, - RemoveMemberFromGroupRequest, - Render, - RenderStatus, - RenderType, - RequestPvcManualVerificationResponseModel, - ResourceAccessInfo, - ResourceAccessInfoRole, - ResourceMetadataResponseModel, - ResourceMetadataResponseModelAnonymousAccessLevelOverride, - ReviewStatus, - SafetyCommonModel, - SafetyEvaluation, - SafetyResponseModel, - SafetyRule, - SaveVoicePreviewRequest, - SecretDependencyType, - SegmentCreateResponse, - SegmentDeleteResponse, - SegmentDubResponse, - SegmentSubtitleFrame, - SegmentTranscriptionResponse, - SegmentTranslationResponse, - SegmentUpdateResponse, - SegmentedJsonExportOptions, - SendText, - SendTextMulti, - ShareOptionResponseModel, - ShareOptionResponseModelType, - SimilarVoice, - SimilarVoiceCategory, - SimilarVoicesForSpeakerResponse, - SingleTestRunRequestModel, - SipMediaEncryptionEnum, - SipTrunkCredentialsRequestModel, - SipTrunkOutboundCallResponse, - SipTrunkTransportEnum, - SipUriTransferDestination, - SkipTurnToolConfig, - SkipTurnToolResponseModel, - SongMetadata, - SongSection, - SpeakerAudioResponseModel, - SpeakerResponseModel, - SpeakerSegment, - SpeakerSeparationResponseModel, - SpeakerSeparationResponseModelStatus, - SpeakerTrack, - SpeakerUpdatedResponse, - SpeechHistoryItemResponse, - SpeechHistoryItemResponseModelSource, - SpeechHistoryItemResponseModelVoiceCategory, - SpeechToTextCharacterResponseModel, - SpeechToTextChunkResponseModel, - SpeechToTextWebhookResponseModel, - SpeechToTextWordResponseModel, - SpeechToTextWordResponseModelType, - SrtExportOptions, - StartPvcVoiceTrainingResponseModel, - StartSpeakerSeparationResponseModel, - StreamingAudioChunkWithTimestampsResponse, - Subscription, - SubscriptionExtrasResponseModel, - SubscriptionResponse, - SubscriptionResponseModelBillingPeriod, - SubscriptionResponseModelCharacterRefreshPeriod, - SubscriptionResponseModelCurrency, - SubscriptionStatusType, - SubscriptionUsageResponseModel, - SupportedVoice, - SystemToolConfigInput, - SystemToolConfigInputParams, - SystemToolConfigInputParams_EndCall, - SystemToolConfigInputParams_LanguageDetection, - SystemToolConfigInputParams_PlayKeypadTouchTone, - SystemToolConfigInputParams_SkipTurn, - SystemToolConfigInputParams_TransferToAgent, - SystemToolConfigInputParams_TransferToNumber, - SystemToolConfigInputParams_VoicemailDetection, - SystemToolConfigOutput, - SystemToolConfigOutputParams, - SystemToolConfigOutputParams_EndCall, - SystemToolConfigOutputParams_LanguageDetection, - SystemToolConfigOutputParams_PlayKeypadTouchTone, - SystemToolConfigOutputParams_SkipTurn, - SystemToolConfigOutputParams_TransferToAgent, - SystemToolConfigOutputParams_TransferToNumber, - SystemToolConfigOutputParams_VoicemailDetection, - TelephonyProvider, - TestConditionRationaleCommonModel, - TestConditionResultCommonModel, - TestRunMetadata, - TestRunMetadataTestType, - TestRunStatus, - TestToolResultModel, - TestsFeatureUsageCommonModel, - TextToSpeechApplyTextNormalizationEnum, - TextToSpeechOutputFormatEnum, - TextToSpeechStreamRequest, - TokenResponseModel, - Tool, - ToolAnnotations, - ToolMockConfig, - ToolRequestModel, - ToolRequestModelToolConfig, - ToolRequestModelToolConfig_Client, - ToolRequestModelToolConfig_Mcp, - ToolRequestModelToolConfig_System, - ToolRequestModelToolConfig_Webhook, - ToolResponseModel, - ToolResponseModelToolConfig, - ToolResponseModelToolConfig_Client, - ToolResponseModelToolConfig_Mcp, - ToolResponseModelToolConfig_System, - ToolResponseModelToolConfig_Webhook, - ToolType, - ToolUsageStatsResponseModel, - ToolsResponseModel, - TransferToAgentToolConfig, - TransferToAgentToolResultErrorModel, - TransferToAgentToolResultSuccessModel, - TransferToNumberResultErrorModel, - TransferToNumberResultSipSuccessModel, - TransferToNumberResultTwilioSuccessModel, - TransferToNumberToolConfigInput, - TransferToNumberToolConfigOutput, - TransferTypeEnum, - TtsConversationalConfigInput, - TtsConversationalConfigOutput, - TtsConversationalConfigOverride, - TtsConversationalConfigOverrideConfig, - TtsConversationalConfigWorkflowOverride, - TtsConversationalModel, - TtsModelFamily, - TtsOptimizeStreamingLatency, - TtsOutputFormat, - TurnConfig, - TurnConfigWorkflowOverride, - TurnMode, - TwilioOutboundCallResponse, - TxtExportOptions, - UnitTestRunResponseModel, - UnitTestSummaryResponseModel, - UnitTestToolCallEvaluationModelInput, - UnitTestToolCallEvaluationModelOutput, - UnitTestToolCallParameter, - UnitTestToolCallParameterEval, - UnitTestToolCallParameterEval_Exact, - UnitTestToolCallParameterEval_Llm, - UnitTestToolCallParameterEval_Regex, - UpdateAudioNativeProjectRequest, - UpdateChapterRequest, - UpdateProjectRequest, - UpdatePronunciationDictionariesRequest, - UpdateWorkspaceMemberResponseModel, - UrlAvatar, - UsageAggregationInterval, - UsageCharactersResponseModel, - User, - UserFeedback, - UserFeedbackScore, - UtteranceResponseModel, - ValidationError, - ValidationErrorLocItem, - VerificationAttemptResponse, - VerifiedVoiceLanguageResponseModel, - VerifyPvcVoiceCaptchaResponseModel, - Voice, - VoiceDesignPreviewResponse, - VoiceGenerationParameterOptionResponse, - VoiceGenerationParameterResponse, - VoiceMailDetectionResultSuccessModel, - VoicePreviewResponseModel, - VoiceResponseModelCategory, - VoiceResponseModelSafetyControl, - VoiceSample, - VoiceSamplePreviewResponseModel, - VoiceSampleVisualWaveformResponseModel, - VoiceSettings, - VoiceSharingModerationCheckResponseModel, - VoiceSharingResponse, - VoiceSharingResponseModelCategory, - VoiceSharingState, - VoiceVerificationResponse, - VoicemailDetectionToolConfig, - WebhookAuthMethodType, - WebhookToolApiSchemaConfigInput, - WebhookToolApiSchemaConfigInputMethod, - WebhookToolApiSchemaConfigInputRequestHeadersValue, - WebhookToolApiSchemaConfigOutput, - WebhookToolApiSchemaConfigOutputMethod, - WebhookToolApiSchemaConfigOutputRequestHeadersValue, - WebhookToolConfigInput, - WebhookToolConfigOutput, - WebhookUsageType, - WebsocketTtsClientMessageMulti, - WebsocketTtsServerMessageMulti, - WidgetConfig, - WidgetConfigInputAvatar, - WidgetConfigInputAvatar_Image, - WidgetConfigInputAvatar_Orb, - WidgetConfigInputAvatar_Url, - WidgetConfigOutputAvatar, - WidgetConfigOutputAvatar_Image, - WidgetConfigOutputAvatar_Orb, - WidgetConfigOutputAvatar_Url, - WidgetConfigResponse, - WidgetConfigResponseModelAvatar, - WidgetConfigResponseModelAvatar_Image, - WidgetConfigResponseModelAvatar_Orb, - WidgetConfigResponseModelAvatar_Url, - WidgetExpandable, - WidgetFeedbackMode, - WidgetLanguagePreset, - WidgetLanguagePresetResponse, - WidgetPlacement, - WidgetStyles, - WidgetTextContents, - WorkflowEdgeModel, - WorkflowEdgeModelBackwardCondition, - WorkflowEdgeModelBackwardCondition_Llm, - WorkflowEdgeModelBackwardCondition_Result, - WorkflowEdgeModelBackwardCondition_Unconditional, - WorkflowEdgeModelForwardCondition, - WorkflowEdgeModelForwardCondition_Llm, - WorkflowEdgeModelForwardCondition_Result, - WorkflowEdgeModelForwardCondition_Unconditional, - WorkflowEndNodeModel, - WorkflowFeaturesUsageCommonModel, - WorkflowLlmConditionModel, - WorkflowOverrideAgentNodeModel, - WorkflowPhoneNumberNodeModel, - WorkflowPhoneNumberNodeModelTransferDestination, - WorkflowPhoneNumberNodeModelTransferDestination_Phone, - WorkflowPhoneNumberNodeModelTransferDestination_SipUri, - WorkflowResultConditionModel, - WorkflowStandaloneAgentNodeModel, - WorkflowStartNodeModel, - WorkflowToolEdgeStepModel, - WorkflowToolLocator, - WorkflowToolMaxIterationsExceededStepModel, - WorkflowToolNestedToolsStepModelInput, - WorkflowToolNestedToolsStepModelInputResultsItem, - WorkflowToolNestedToolsStepModelOutput, - WorkflowToolNestedToolsStepModelOutputResultsItem, - WorkflowToolNodeModel, - WorkflowToolResponseModelInput, - WorkflowToolResponseModelInputStepsItem, - WorkflowToolResponseModelInputStepsItem_Edge, - WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, - WorkflowToolResponseModelInputStepsItem_NestedTools, - WorkflowToolResponseModelOutput, - WorkflowToolResponseModelOutputStepsItem, - WorkflowToolResponseModelOutputStepsItem_Edge, - WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, - WorkflowToolResponseModelOutputStepsItem_NestedTools, - WorkflowUnconditionalModel, - WorkspaceApiKeyListResponseModel, - WorkspaceApiKeyResponseModel, - WorkspaceApiKeyResponseModelPermissionsItem, - WorkspaceBatchCallsResponse, - WorkspaceCreateApiKeyResponseModel, - WorkspaceGroupByNameResponseModel, - WorkspaceResourceType, - WorkspaceServiceAccountListResponseModel, - WorkspaceServiceAccountResponseModel, - WorkspaceWebhookListResponseModel, - WorkspaceWebhookResponseModel, - WorkspaceWebhookUsageResponseModel, -) -from .errors import ( - BadRequestError, - ForbiddenError, - NotFoundError, - TooEarlyError, - UnauthorizedError, - UnprocessableEntityError, -) -from . import ( - audio_isolation, - audio_native, - conversational_ai, - dubbing, - forced_alignment, - history, - models, - music, - pronunciation_dictionaries, - samples, - service_accounts, - speech_to_speech, - speech_to_text, - studio, - text_to_dialogue, - text_to_sound_effects, - text_to_speech, - text_to_voice, - usage, - user, - v_1_text_to_speech_voice_id_multi_stream_input, - v_1_text_to_speech_voice_id_stream_input, - voices, - webhooks, - workspace, -) -from .audio_isolation import AudioIsolationConvertRequestFileFormat, AudioIsolationStreamRequestFileFormat -from .client import AsyncElevenLabs, ElevenLabs -from .dubbing import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator -from .environment import ElevenLabsEnvironment -from .history import HistoryListRequestSource -from .music import ( - MusicComposeDetailedRequestOutputFormat, - MusicComposeRequestOutputFormat, - MusicStreamRequestOutputFormat, -) -from .play import play, save, stream -from .pronunciation_dictionaries import ( - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, - PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, - PronunciationDictionariesListRequestSort, -) -from .speech_to_speech import ( - SpeechToSpeechConvertRequestFileFormat, - SpeechToSpeechConvertRequestOutputFormat, - SpeechToSpeechStreamRequestFileFormat, - SpeechToSpeechStreamRequestOutputFormat, -) -from .speech_to_text import ( - SpeechToTextConvertRequestFileFormat, - SpeechToTextConvertRequestTimestampsGranularity, - SpeechToTextConvertRequestWebhookMetadata, - SpeechToTextConvertResponse, -) -from .studio import ( - BodyCreatePodcastV1StudioPodcastsPostDurationScale, - BodyCreatePodcastV1StudioPodcastsPostMode, - BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, - BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, - BodyCreatePodcastV1StudioPodcastsPostQualityPreset, - BodyCreatePodcastV1StudioPodcastsPostSource, - BodyCreatePodcastV1StudioPodcastsPostSourceItem, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, -) -from .text_to_dialogue import ( - BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, - BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, - TextToDialogueConvertRequestOutputFormat, - TextToDialogueStreamRequestOutputFormat, -) -from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat -from .text_to_speech import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, - TextToSpeechConvertRequestOutputFormat, - TextToSpeechConvertWithTimestampsRequestOutputFormat, - TextToSpeechStreamRequestOutputFormat, - TextToSpeechStreamWithTimestampsRequestOutputFormat, -) -from .text_to_voice import ( - TextToVoiceCreatePreviewsRequestOutputFormat, - TextToVoiceDesignRequestOutputFormat, - VoiceDesignRequestModelModelId, -) -from .v_1_text_to_speech_voice_id_multi_stream_input import ReceiveMessageMulti, SendMessageMulti -from .v_1_text_to_speech_voice_id_stream_input import ReceiveMessage, SendMessage -from .version import __version__ -from .voices import VoicesGetSharedRequestCategory +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + AddChapterResponseModel, + AddKnowledgeBaseResponseModel, + AddProjectRequest, + AddProjectResponseModel, + AddPronunciationDictionaryResponseModel, + AddPronunciationDictionaryResponseModelPermissionOnResource, + AddSharingVoiceRequest, + AddVoiceIvcResponseModel, + AddVoiceResponseModel, + AddWorkspaceGroupMemberResponseModel, + AddWorkspaceInviteResponseModel, + AdditionalFormatResponseModel, + AdditionalFormats, + AdhocAgentConfigOverrideForTestRequestModel, + Age, + AgentCallLimits, + AgentConfig, + AgentConfigApiModelWorkflowOverride, + AgentConfigOverride, + AgentConfigOverrideConfig, + AgentFailureResponseExample, + AgentMetadataResponseModel, + AgentPlatformSettingsRequestModel, + AgentPlatformSettingsResponseModel, + AgentSimulatedChatTestResponseModel, + AgentSuccessfulResponseExample, + AgentSummaryResponseModel, + AgentTestingSettings, + AgentTransfer, + AgentWorkflowRequestModel, + AgentWorkflowRequestModelNodesValue, + AgentWorkflowRequestModelNodesValue_End, + AgentWorkflowRequestModelNodesValue_OverrideAgent, + AgentWorkflowRequestModelNodesValue_PhoneNumber, + AgentWorkflowRequestModelNodesValue_StandaloneAgent, + AgentWorkflowRequestModelNodesValue_Start, + AgentWorkflowRequestModelNodesValue_Tool, + AgentWorkspaceOverridesInput, + AgentWorkspaceOverridesOutput, + Alignment, + AllowlistItem, + ArrayJsonSchemaPropertyInput, + ArrayJsonSchemaPropertyInputItems, + ArrayJsonSchemaPropertyOutput, + ArrayJsonSchemaPropertyOutputItems, + AsrConversationalConfig, + AsrConversationalConfigWorkflowOverride, + AsrInputFormat, + AsrProvider, + AsrQuality, + AttachedTestModel, + AudioNativeCreateProjectResponseModel, + AudioNativeEditContentResponseModel, + AudioNativeProjectSettingsResponseModel, + AudioNativeProjectSettingsResponseModelStatus, + AudioOutput, + AudioOutputMulti, + AudioWithTimestampsResponse, + AuthConnectionLocator, + AuthSettings, + AuthorizationMethod, + BadRequestErrorBody, + BanReasonType, + BatchCallDetailedResponse, + BatchCallRecipientStatus, + BatchCallResponse, + BatchCallStatus, + BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, + BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, + BreakdownTypes, + BuiltInToolsInput, + BuiltInToolsOutput, + BuiltInToolsWorkflowOverride, + CaptionStyleCharacterAnimationModel, + CaptionStyleCharacterAnimationModelEnterType, + CaptionStyleCharacterAnimationModelExitType, + CaptionStyleHorizontalPlacementModel, + CaptionStyleHorizontalPlacementModelAlign, + CaptionStyleModel, + CaptionStyleModelTextAlign, + CaptionStyleModelTextStyle, + CaptionStyleModelTextWeight, + CaptionStyleSectionAnimationModel, + CaptionStyleSectionAnimationModelEnterType, + CaptionStyleSectionAnimationModelExitType, + CaptionStyleTemplateModel, + CaptionStyleVerticalPlacementModel, + CaptionStyleVerticalPlacementModelAlign, + CaptionStyleWordAnimationModel, + CaptionStyleWordAnimationModelEnterType, + CaptionStyleWordAnimationModelExitType, + ChapterContentBlockExtendableNodeResponseModel, + ChapterContentBlockInputModel, + ChapterContentBlockInputModelSubType, + ChapterContentBlockResponseModel, + ChapterContentBlockResponseModelNodesItem, + ChapterContentBlockResponseModelNodesItem_Other, + ChapterContentBlockResponseModelNodesItem_TtsNode, + ChapterContentBlockTtsNodeResponseModel, + ChapterContentInputModel, + ChapterContentParagraphTtsNodeInputModel, + ChapterContentResponseModel, + ChapterResponse, + ChapterSnapshotExtendedResponseModel, + ChapterSnapshotResponse, + ChapterSnapshotsResponse, + ChapterState, + ChapterStatisticsResponse, + ChapterWithContentResponseModel, + ChapterWithContentResponseModelState, + CharacterAlignmentModel, + CharacterAlignmentResponseModel, + CharacterUsageResponse, + ClientEvent, + ClientToolConfigInput, + ClientToolConfigOutput, + CloseConnection, + CloseContext, + CloseSocket, + ConvAiDynamicVariable, + ConvAiSecretLocator, + ConvAiStoredSecretDependencies, + ConvAiStoredSecretDependenciesAgentsItem, + ConvAiStoredSecretDependenciesAgentsItem_Available, + ConvAiStoredSecretDependenciesAgentsItem_Unknown, + ConvAiStoredSecretDependenciesToolsItem, + ConvAiStoredSecretDependenciesToolsItem_Available, + ConvAiStoredSecretDependenciesToolsItem_Unknown, + ConvAiUserSecretDbModel, + ConvAiWebhooks, + ConvAiWorkspaceStoredSecretConfig, + ConversationChargingCommonModel, + ConversationConfig, + ConversationConfigClientOverrideConfigInput, + ConversationConfigClientOverrideConfigOutput, + ConversationConfigClientOverrideInput, + ConversationConfigClientOverrideOutput, + ConversationConfigOverride, + ConversationConfigOverrideConfig, + ConversationConfigWorkflowOverride, + ConversationDeletionSettings, + ConversationHistoryAnalysisCommonModel, + ConversationHistoryBatchCallModel, + ConversationHistoryElevenAssistantCommonModel, + ConversationHistoryErrorCommonModel, + ConversationHistoryEvaluationCriteriaResultCommonModel, + ConversationHistoryFeedbackCommonModel, + ConversationHistoryMetadataCommonModel, + ConversationHistoryMetadataCommonModelPhoneCall, + ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, + ConversationHistoryMetadataCommonModelPhoneCall_Twilio, + ConversationHistoryMultivoiceMessageModel, + ConversationHistoryMultivoiceMessagePartModel, + ConversationHistoryRagUsageCommonModel, + ConversationHistorySipTrunkingPhoneCallModel, + ConversationHistorySipTrunkingPhoneCallModelDirection, + ConversationHistoryTranscriptCommonModelInput, + ConversationHistoryTranscriptCommonModelInputRole, + ConversationHistoryTranscriptCommonModelInputSourceMedium, + ConversationHistoryTranscriptCommonModelInputToolResultsItem, + ConversationHistoryTranscriptCommonModelOutput, + ConversationHistoryTranscriptCommonModelOutputRole, + ConversationHistoryTranscriptCommonModelOutputSourceMedium, + ConversationHistoryTranscriptCommonModelOutputToolResultsItem, + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ConversationHistoryTranscriptOtherToolsResultCommonModelType, + ConversationHistoryTranscriptSystemToolResultCommonModel, + ConversationHistoryTranscriptSystemToolResultCommonModelResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, + ConversationHistoryTranscriptToolCallClientDetails, + ConversationHistoryTranscriptToolCallCommonModel, + ConversationHistoryTranscriptToolCallCommonModelToolDetails, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, + ConversationHistoryTranscriptToolCallMcpDetails, + ConversationHistoryTranscriptToolCallWebhookDetails, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, + ConversationHistoryTwilioPhoneCallModel, + ConversationHistoryTwilioPhoneCallModelDirection, + ConversationInitiationClientDataConfigInput, + ConversationInitiationClientDataConfigOutput, + ConversationInitiationClientDataInternal, + ConversationInitiationClientDataInternalDynamicVariablesValue, + ConversationInitiationClientDataRequestInput, + ConversationInitiationClientDataRequestInputDynamicVariablesValue, + ConversationInitiationClientDataRequestOutput, + ConversationInitiationClientDataRequestOutputDynamicVariablesValue, + ConversationInitiationClientDataWebhook, + ConversationInitiationClientDataWebhookRequestHeadersValue, + ConversationInitiationSource, + ConversationInitiationSourceInfo, + ConversationSignedUrlResponseModel, + ConversationSimulationSpecification, + ConversationSimulationSpecificationDynamicVariablesValue, + ConversationSummaryResponseModel, + ConversationSummaryResponseModelDirection, + ConversationSummaryResponseModelStatus, + ConversationTokenDbModel, + ConversationTokenPurpose, + ConversationTurnMetrics, + ConversationalConfig, + ConversationalConfigApiModelWorkflowOverride, + ConvertChapterResponseModel, + ConvertProjectResponseModel, + CreateAgentResponseModel, + CreateAudioNativeProjectRequest, + CreatePhoneNumberResponseModel, + CreatePreviouslyGeneratedVoiceRequest, + CreatePronunciationDictionaryResponseModel, + CreateSipTrunkPhoneNumberRequest, + CreateTranscriptRequest, + CreateTwilioPhoneNumberRequest, + CreateUnitTestResponseModel, + CustomLlm, + CustomLlmRequestHeadersValue, + DashboardCallSuccessChartModel, + DashboardCriteriaChartModel, + DashboardDataCollectionChartModel, + DataCollectionResultCommonModel, + DeleteChapterRequest, + DeleteChapterResponseModel, + DeleteDubbingResponseModel, + DeleteHistoryItemResponse, + DeleteProjectRequest, + DeleteProjectResponseModel, + DeleteSampleResponse, + DeleteVoiceResponseModel, + DeleteVoiceSampleResponseModel, + DeleteWorkspaceGroupMemberResponseModel, + DeleteWorkspaceInviteResponseModel, + DependentAvailableAgentIdentifier, + DependentAvailableAgentIdentifierAccessLevel, + DependentAvailableToolIdentifier, + DependentAvailableToolIdentifierAccessLevel, + DependentPhoneNumberIdentifier, + DependentUnknownAgentIdentifier, + DependentUnknownToolIdentifier, + DetailedMusicResponse, + DialogueInput, + DialogueInputResponseModel, + DoDubbingResponse, + DocumentUsageModeEnum, + DocxExportOptions, + DubbedSegment, + DubbingMediaMetadata, + DubbingMediaReference, + DubbingMetadataPageResponseModel, + DubbingMetadataResponse, + DubbingReleaseChannel, + DubbingRenderResponseModel, + DubbingResource, + DynamicVariableAssignment, + DynamicVariableUpdateCommonModel, + DynamicVariablesConfig, + DynamicVariablesConfigDynamicVariablePlaceholdersValue, + DynamicVariablesConfigWorkflowOverride, + DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, + EditChapterResponseModel, + EditProjectResponseModel, + EditVoiceResponseModel, + EditVoiceSettingsRequest, + EditVoiceSettingsResponseModel, + EmbedVariant, + EmbeddingModelEnum, + EndCallToolConfig, + EndCallToolResultModel, + EvaluationSettings, + EvaluationSuccessResult, + ExactParameterEvaluationStrategy, + ExportOptions, + ExportOptions_Docx, + ExportOptions_Html, + ExportOptions_Pdf, + ExportOptions_SegmentedJson, + ExportOptions_Srt, + ExportOptions_Txt, + ExtendedSubscriptionResponseModelBillingPeriod, + ExtendedSubscriptionResponseModelCharacterRefreshPeriod, + ExtendedSubscriptionResponseModelCurrency, + ExtendedSubscriptionResponseModelPendingChange, + FeatureStatusCommonModel, + FeaturesUsageCommonModel, + FeedbackItem, + FinalOutput, + FinalOutputMulti, + FineTuningResponse, + FineTuningResponseModelStateValue, + FlushContext, + ForcedAlignmentCharacterResponseModel, + ForcedAlignmentResponseModel, + ForcedAlignmentWordResponseModel, + Gender, + GenerateVoiceRequest, + GenerationConfig, + GetAgentEmbedResponseModel, + GetAgentKnowledgebaseSizeResponseModel, + GetAgentLinkResponseModel, + GetAgentResponseModel, + GetAgentResponseModelPhoneNumbersItem, + GetAgentResponseModelPhoneNumbersItem_SipTrunk, + GetAgentResponseModelPhoneNumbersItem_Twilio, + GetAgentsPageResponseModel, + GetAudioNativeProjectSettingsResponseModel, + GetChapterRequest, + GetChapterSnapshotsRequest, + GetChaptersRequest, + GetChaptersResponse, + GetConvAiDashboardSettingsResponseModel, + GetConvAiDashboardSettingsResponseModelChartsItem, + GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess, + GetConvAiDashboardSettingsResponseModelChartsItem_Criteria, + GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection, + GetConvAiSettingsResponseModel, + GetConversationResponseModel, + GetConversationResponseModelStatus, + GetConversationsPageResponseModel, + GetKnowledgeBaseDependentAgentsResponseModel, + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem, + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available, + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown, + GetKnowledgeBaseFileResponseModel, + GetKnowledgeBaseListResponseModel, + GetKnowledgeBaseListResponseModelDocumentsItem, + GetKnowledgeBaseListResponseModelDocumentsItem_File, + GetKnowledgeBaseListResponseModelDocumentsItem_Text, + GetKnowledgeBaseListResponseModelDocumentsItem_Url, + GetKnowledgeBaseSummaryFileResponseModel, + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown, + GetKnowledgeBaseSummaryTextResponseModel, + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown, + GetKnowledgeBaseSummaryUrlResponseModel, + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown, + GetKnowledgeBaseTextResponseModel, + GetKnowledgeBaseUrlResponseModel, + GetLibraryVoicesResponse, + GetPhoneNumberInboundSipTrunkConfigResponseModel, + GetPhoneNumberOutboundSipTrunkConfigResponseModel, + GetPhoneNumberResponse, + GetPhoneNumberSipTrunkResponseModel, + GetPhoneNumberTwilioResponseModel, + GetProjectRequest, + GetProjectsRequest, + GetProjectsResponse, + GetPronunciationDictionariesMetadataResponseModel, + GetPronunciationDictionariesResponse, + GetPronunciationDictionaryMetadataResponse, + GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, + GetPronunciationDictionaryResponse, + GetSpeechHistoryResponse, + GetTestSuiteInvocationResponseModel, + GetTestsPageResponseModel, + GetTestsSummariesByIdsResponseModel, + GetToolDependentAgentsResponseModel, + GetToolDependentAgentsResponseModelAgentsItem, + GetToolDependentAgentsResponseModelAgentsItem_Available, + GetToolDependentAgentsResponseModelAgentsItem_Unknown, + GetUnitTestResponseModel, + GetUnitTestResponseModelDynamicVariablesValue, + GetVoicesResponse, + GetVoicesV2Response, + GetWorkspaceSecretsResponseModel, + HistoryAlignmentResponseModel, + HistoryAlignmentsResponseModel, + HistoryItemResponse, + HtmlExportOptions, + HttpValidationError, + ImageAvatar, + InboundSipTrunkConfigRequestModel, + InitialiseContext, + InitializeConnection, + InitializeConnectionMulti, + IntegrationType, + InvoiceResponse, + InvoiceResponseModelPaymentIntentStatus, + KeepContextAlive, + KnowledgeBaseDocumentChunkResponseModel, + KnowledgeBaseDocumentMetadataResponseModel, + KnowledgeBaseDocumentType, + KnowledgeBaseLocator, + LanguageAddedResponse, + LanguageDetectionToolConfig, + LanguageDetectionToolResultModel, + LanguagePresetInput, + LanguagePresetOutput, + LanguagePresetTranslation, + LanguageResponse, + LibraryVoiceResponse, + LibraryVoiceResponseModelCategory, + ListMcpToolsResponseModel, + LiteralJsonSchemaProperty, + LiteralJsonSchemaPropertyConstantValue, + LiteralJsonSchemaPropertyType, + Llm, + LlmCategoryUsage, + LlmInputOutputTokensUsage, + LlmParameterEvaluationStrategy, + LlmTokensCategoryUsage, + LlmUsageCalculatorLlmResponseModel, + LlmUsageCalculatorResponseModel, + LlmUsageInput, + LlmUsageOutput, + ManualVerificationFileResponse, + ManualVerificationResponse, + McpApprovalPolicy, + McpServerConfigInput, + McpServerConfigInputRequestHeadersValue, + McpServerConfigInputSecretToken, + McpServerConfigInputUrl, + McpServerConfigOutput, + McpServerConfigOutputRequestHeadersValue, + McpServerConfigOutputSecretToken, + McpServerConfigOutputUrl, + McpServerMetadataResponseModel, + McpServerResponseModel, + McpServerResponseModelDependentAgentsItem, + McpServerResponseModelDependentAgentsItem_Available, + McpServerResponseModelDependentAgentsItem_Unknown, + McpServerTransport, + McpServersResponseModel, + McpToolApprovalHash, + McpToolApprovalPolicy, + MetricRecord, + MetricType, + Model, + ModelRatesResponseModel, + ModelResponseModelConcurrencyGroup, + ModelSettingsResponseModel, + ModerationStatusResponseModel, + ModerationStatusResponseModelSafetyStatus, + ModerationStatusResponseModelWarningStatus, + MultichannelSpeechToTextResponseModel, + MultipartMusicResponse, + MusicPrompt, + NormalizedAlignment, + ObjectJsonSchemaPropertyInput, + ObjectJsonSchemaPropertyInputPropertiesValue, + ObjectJsonSchemaPropertyOutput, + ObjectJsonSchemaPropertyOutputPropertiesValue, + OrbAvatar, + OutboundCallRecipient, + OutboundCallRecipientResponseModel, + OutboundSipTrunkConfigRequestModel, + OutputFormat, + PdfExportOptions, + PendingCancellationResponseModel, + PendingSubscriptionSwitchResponseModel, + PendingSubscriptionSwitchResponseModelNextTier, + PhoneNumberAgentInfo, + PhoneNumberTransfer, + PhoneNumberTransferDestination, + PhoneNumberTransferTransferDestination, + PhoneNumberTransferTransferDestination_Phone, + PhoneNumberTransferTransferDestination_SipUri, + PlayDtmfResultErrorModel, + PlayDtmfResultSuccessModel, + PlayDtmfToolConfig, + PodcastBulletinMode, + PodcastBulletinModeData, + PodcastConversationMode, + PodcastConversationModeData, + PodcastProjectResponseModel, + PodcastTextSource, + PodcastUrlSource, + Position, + PostAgentAvatarResponseModel, + PostWorkspaceSecretResponseModel, + PrivacyConfig, + ProjectCreationMetaResponseModel, + ProjectCreationMetaResponseModelStatus, + ProjectCreationMetaResponseModelType, + ProjectExtendedResponse, + ProjectExtendedResponseModelAccessLevel, + ProjectExtendedResponseModelApplyTextNormalization, + ProjectExtendedResponseModelFiction, + ProjectExtendedResponseModelQualityPreset, + ProjectExtendedResponseModelSourceType, + ProjectExtendedResponseModelTargetAudience, + ProjectResponse, + ProjectResponseModelAccessLevel, + ProjectResponseModelFiction, + ProjectResponseModelSourceType, + ProjectResponseModelTargetAudience, + ProjectSnapshotExtendedResponseModel, + ProjectSnapshotResponse, + ProjectSnapshotsResponse, + ProjectState, + PromptAgent, + PromptAgentApiModelInput, + PromptAgentApiModelInputToolsItem, + PromptAgentApiModelInputToolsItem_Client, + PromptAgentApiModelInputToolsItem_Mcp, + PromptAgentApiModelInputToolsItem_System, + PromptAgentApiModelInputToolsItem_Webhook, + PromptAgentApiModelOutput, + PromptAgentApiModelOutputToolsItem, + PromptAgentApiModelOutputToolsItem_Client, + PromptAgentApiModelOutputToolsItem_Mcp, + PromptAgentApiModelOutputToolsItem_System, + PromptAgentApiModelOutputToolsItem_Webhook, + PromptAgentApiModelOverride, + PromptAgentApiModelOverrideConfig, + PromptAgentApiModelWorkflowOverride, + PromptAgentApiModelWorkflowOverrideToolsItem, + PromptAgentApiModelWorkflowOverrideToolsItem_Client, + PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideToolsItem_System, + PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + PromptAgentDbModel, + PromptEvaluationCriteria, + PronunciationDictionaryAliasRuleRequestModel, + PronunciationDictionaryLocator, + PronunciationDictionaryLocatorResponseModel, + PronunciationDictionaryPhonemeRuleRequestModel, + PronunciationDictionaryRulesResponseModel, + PronunciationDictionaryVersionLocator, + PronunciationDictionaryVersionResponseModel, + PronunciationDictionaryVersionResponseModelPermissionOnResource, + PydanticPronunciationDictionaryVersionLocator, + QueryParamsJsonSchema, + RagChunkMetadata, + RagConfig, + RagConfigWorkflowOverride, + RagDocumentIndexResponseModel, + RagDocumentIndexUsage, + RagDocumentIndexesResponseModel, + RagIndexOverviewEmbeddingModelResponseModel, + RagIndexOverviewResponseModel, + RagIndexStatus, + RagRetrievalInfo, + ReaderResourceResponseModel, + ReaderResourceResponseModelResourceType, + RealtimeVoiceSettings, + RecordingResponse, + ReferencedToolCommonModel, + RegexParameterEvaluationStrategy, + RemoveMemberFromGroupRequest, + Render, + RenderStatus, + RenderType, + RequestPvcManualVerificationResponseModel, + ResourceAccessInfo, + ResourceAccessInfoRole, + ResourceMetadataResponseModel, + ResourceMetadataResponseModelAnonymousAccessLevelOverride, + ReviewStatus, + SafetyCommonModel, + SafetyEvaluation, + SafetyResponseModel, + SafetyRule, + SaveVoicePreviewRequest, + SecretDependencyType, + SegmentCreateResponse, + SegmentDeleteResponse, + SegmentDubResponse, + SegmentSubtitleFrame, + SegmentTranscriptionResponse, + SegmentTranslationResponse, + SegmentUpdateResponse, + SegmentedJsonExportOptions, + SendText, + SendTextMulti, + ShareOptionResponseModel, + ShareOptionResponseModelType, + SimilarVoice, + SimilarVoiceCategory, + SimilarVoicesForSpeakerResponse, + SingleTestRunRequestModel, + SipMediaEncryptionEnum, + SipTrunkCredentialsRequestModel, + SipTrunkOutboundCallResponse, + SipTrunkTransportEnum, + SipUriTransferDestination, + SkipTurnToolConfig, + SkipTurnToolResponseModel, + SongMetadata, + SongSection, + SpeakerAudioResponseModel, + SpeakerResponseModel, + SpeakerSegment, + SpeakerSeparationResponseModel, + SpeakerSeparationResponseModelStatus, + SpeakerTrack, + SpeakerUpdatedResponse, + SpeechHistoryItemResponse, + SpeechHistoryItemResponseModelSource, + SpeechHistoryItemResponseModelVoiceCategory, + SpeechToTextCharacterResponseModel, + SpeechToTextChunkResponseModel, + SpeechToTextWebhookResponseModel, + SpeechToTextWordResponseModel, + SpeechToTextWordResponseModelType, + SrtExportOptions, + StartPvcVoiceTrainingResponseModel, + StartSpeakerSeparationResponseModel, + StreamingAudioChunkWithTimestampsResponse, + Subscription, + SubscriptionExtrasResponseModel, + SubscriptionResponse, + SubscriptionResponseModelBillingPeriod, + SubscriptionResponseModelCharacterRefreshPeriod, + SubscriptionResponseModelCurrency, + SubscriptionStatusType, + SubscriptionUsageResponseModel, + SupportedVoice, + SystemToolConfigInput, + SystemToolConfigInputParams, + SystemToolConfigInputParams_EndCall, + SystemToolConfigInputParams_LanguageDetection, + SystemToolConfigInputParams_PlayKeypadTouchTone, + SystemToolConfigInputParams_SkipTurn, + SystemToolConfigInputParams_TransferToAgent, + SystemToolConfigInputParams_TransferToNumber, + SystemToolConfigInputParams_VoicemailDetection, + SystemToolConfigOutput, + SystemToolConfigOutputParams, + SystemToolConfigOutputParams_EndCall, + SystemToolConfigOutputParams_LanguageDetection, + SystemToolConfigOutputParams_PlayKeypadTouchTone, + SystemToolConfigOutputParams_SkipTurn, + SystemToolConfigOutputParams_TransferToAgent, + SystemToolConfigOutputParams_TransferToNumber, + SystemToolConfigOutputParams_VoicemailDetection, + TelephonyProvider, + TestConditionRationaleCommonModel, + TestConditionResultCommonModel, + TestRunMetadata, + TestRunMetadataTestType, + TestRunStatus, + TestToolResultModel, + TestsFeatureUsageCommonModel, + TextToSpeechApplyTextNormalizationEnum, + TextToSpeechOutputFormatEnum, + TextToSpeechStreamRequest, + TokenResponseModel, + Tool, + ToolAnnotations, + ToolMockConfig, + ToolRequestModel, + ToolRequestModelToolConfig, + ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_Mcp, + ToolRequestModelToolConfig_System, + ToolRequestModelToolConfig_Webhook, + ToolResponseModel, + ToolResponseModelToolConfig, + ToolResponseModelToolConfig_Client, + ToolResponseModelToolConfig_Mcp, + ToolResponseModelToolConfig_System, + ToolResponseModelToolConfig_Webhook, + ToolType, + ToolUsageStatsResponseModel, + ToolsResponseModel, + TransferToAgentToolConfig, + TransferToAgentToolResultErrorModel, + TransferToAgentToolResultSuccessModel, + TransferToNumberResultErrorModel, + TransferToNumberResultSipSuccessModel, + TransferToNumberResultTwilioSuccessModel, + TransferToNumberToolConfigInput, + TransferToNumberToolConfigOutput, + TransferTypeEnum, + TtsConversationalConfigInput, + TtsConversationalConfigOutput, + TtsConversationalConfigOverride, + TtsConversationalConfigOverrideConfig, + TtsConversationalConfigWorkflowOverride, + TtsConversationalModel, + TtsModelFamily, + TtsOptimizeStreamingLatency, + TtsOutputFormat, + TurnConfig, + TurnConfigWorkflowOverride, + TurnMode, + TwilioOutboundCallResponse, + TxtExportOptions, + UnitTestRunResponseModel, + UnitTestSummaryResponseModel, + UnitTestToolCallEvaluationModelInput, + UnitTestToolCallEvaluationModelOutput, + UnitTestToolCallParameter, + UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Exact, + UnitTestToolCallParameterEval_Llm, + UnitTestToolCallParameterEval_Regex, + UpdateAudioNativeProjectRequest, + UpdateChapterRequest, + UpdateProjectRequest, + UpdatePronunciationDictionariesRequest, + UpdateWorkspaceMemberResponseModel, + UrlAvatar, + UsageAggregationInterval, + UsageCharactersResponseModel, + User, + UserFeedback, + UserFeedbackScore, + UtteranceResponseModel, + ValidationError, + ValidationErrorLocItem, + VerificationAttemptResponse, + VerifiedVoiceLanguageResponseModel, + VerifyPvcVoiceCaptchaResponseModel, + Voice, + VoiceDesignPreviewResponse, + VoiceGenerationParameterOptionResponse, + VoiceGenerationParameterResponse, + VoiceMailDetectionResultSuccessModel, + VoicePreviewResponseModel, + VoiceResponseModelCategory, + VoiceResponseModelSafetyControl, + VoiceSample, + VoiceSamplePreviewResponseModel, + VoiceSampleVisualWaveformResponseModel, + VoiceSettings, + VoiceSharingModerationCheckResponseModel, + VoiceSharingResponse, + VoiceSharingResponseModelCategory, + VoiceSharingState, + VoiceVerificationResponse, + VoicemailDetectionToolConfig, + WebhookAuthMethodType, + WebhookToolApiSchemaConfigInput, + WebhookToolApiSchemaConfigInputMethod, + WebhookToolApiSchemaConfigInputRequestHeadersValue, + WebhookToolApiSchemaConfigOutput, + WebhookToolApiSchemaConfigOutputMethod, + WebhookToolApiSchemaConfigOutputRequestHeadersValue, + WebhookToolConfigInput, + WebhookToolConfigOutput, + WebhookUsageType, + WebsocketTtsClientMessageMulti, + WebsocketTtsServerMessageMulti, + WidgetConfig, + WidgetConfigInputAvatar, + WidgetConfigInputAvatar_Image, + WidgetConfigInputAvatar_Orb, + WidgetConfigInputAvatar_Url, + WidgetConfigOutputAvatar, + WidgetConfigOutputAvatar_Image, + WidgetConfigOutputAvatar_Orb, + WidgetConfigOutputAvatar_Url, + WidgetConfigResponse, + WidgetConfigResponseModelAvatar, + WidgetConfigResponseModelAvatar_Image, + WidgetConfigResponseModelAvatar_Orb, + WidgetConfigResponseModelAvatar_Url, + WidgetExpandable, + WidgetFeedbackMode, + WidgetLanguagePreset, + WidgetLanguagePresetResponse, + WidgetPlacement, + WidgetStyles, + WidgetTextContents, + WorkflowEdgeModel, + WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Llm, + WorkflowEdgeModelBackwardCondition_Result, + WorkflowEdgeModelBackwardCondition_Unconditional, + WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Llm, + WorkflowEdgeModelForwardCondition_Result, + WorkflowEdgeModelForwardCondition_Unconditional, + WorkflowEndNodeModel, + WorkflowFeaturesUsageCommonModel, + WorkflowLlmConditionModel, + WorkflowOverrideAgentNodeModel, + WorkflowPhoneNumberNodeModel, + WorkflowPhoneNumberNodeModelTransferDestination, + WorkflowPhoneNumberNodeModelTransferDestination_Phone, + WorkflowPhoneNumberNodeModelTransferDestination_SipUri, + WorkflowResultConditionModel, + WorkflowStandaloneAgentNodeModel, + WorkflowStartNodeModel, + WorkflowToolEdgeStepModel, + WorkflowToolLocator, + WorkflowToolMaxIterationsExceededStepModel, + WorkflowToolNestedToolsStepModelInput, + WorkflowToolNestedToolsStepModelInputResultsItem, + WorkflowToolNestedToolsStepModelOutput, + WorkflowToolNestedToolsStepModelOutputResultsItem, + WorkflowToolNodeModel, + WorkflowToolResponseModelInput, + WorkflowToolResponseModelInputStepsItem, + WorkflowToolResponseModelInputStepsItem_Edge, + WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelInputStepsItem_NestedTools, + WorkflowToolResponseModelOutput, + WorkflowToolResponseModelOutputStepsItem, + WorkflowToolResponseModelOutputStepsItem_Edge, + WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelOutputStepsItem_NestedTools, + WorkflowUnconditionalModel, + WorkspaceApiKeyListResponseModel, + WorkspaceApiKeyResponseModel, + WorkspaceApiKeyResponseModelPermissionsItem, + WorkspaceBatchCallsResponse, + WorkspaceCreateApiKeyResponseModel, + WorkspaceGroupByNameResponseModel, + WorkspaceResourceType, + WorkspaceServiceAccountListResponseModel, + WorkspaceServiceAccountResponseModel, + WorkspaceWebhookListResponseModel, + WorkspaceWebhookResponseModel, + WorkspaceWebhookUsageResponseModel, + ) + from .errors import ( + BadRequestError, + ForbiddenError, + NotFoundError, + TooEarlyError, + UnauthorizedError, + UnprocessableEntityError, + ) + from . import ( + audio_isolation, + audio_native, + conversational_ai, + dubbing, + forced_alignment, + history, + models, + music, + pronunciation_dictionaries, + samples, + service_accounts, + speech_to_speech, + speech_to_text, + studio, + text_to_dialogue, + text_to_sound_effects, + text_to_speech, + text_to_voice, + usage, + user, + v_1_text_to_speech_voice_id_multi_stream_input, + v_1_text_to_speech_voice_id_stream_input, + voices, + webhooks, + workspace, + ) + from .audio_isolation import AudioIsolationConvertRequestFileFormat, AudioIsolationStreamRequestFileFormat + from .client import AsyncElevenLabs, ElevenLabs + from .dubbing import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator + from .environment import ElevenLabsEnvironment + from .history import HistoryListRequestSource + from .music import ( + MusicComposeDetailedRequestOutputFormat, + MusicComposeRequestOutputFormat, + MusicStreamRequestOutputFormat, + ) + from .play import play, save, stream + from .pronunciation_dictionaries import ( + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, + PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, + PronunciationDictionariesListRequestSort, + ) + from .speech_to_speech import ( + SpeechToSpeechConvertRequestFileFormat, + SpeechToSpeechConvertRequestOutputFormat, + SpeechToSpeechStreamRequestFileFormat, + SpeechToSpeechStreamRequestOutputFormat, + ) + from .speech_to_text import ( + SpeechToTextConvertRequestFileFormat, + SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertRequestWebhookMetadata, + SpeechToTextConvertResponse, + ) + from .studio import ( + BodyCreatePodcastV1StudioPodcastsPostDurationScale, + BodyCreatePodcastV1StudioPodcastsPostMode, + BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, + BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, + BodyCreatePodcastV1StudioPodcastsPostQualityPreset, + BodyCreatePodcastV1StudioPodcastsPostSource, + BodyCreatePodcastV1StudioPodcastsPostSourceItem, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, + ) + from .text_to_dialogue import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + TextToDialogueConvertRequestOutputFormat, + TextToDialogueStreamRequestOutputFormat, + ) + from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat + from .text_to_speech import ( + BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, + BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, + BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, + BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, + TextToSpeechConvertRequestOutputFormat, + TextToSpeechConvertWithTimestampsRequestOutputFormat, + TextToSpeechStreamRequestOutputFormat, + TextToSpeechStreamWithTimestampsRequestOutputFormat, + ) + from .text_to_voice import ( + TextToVoiceCreatePreviewsRequestOutputFormat, + TextToVoiceDesignRequestOutputFormat, + TextToVoiceRemixRequestOutputFormat, + VoiceDesignRequestModelModelId, + ) + from .v_1_text_to_speech_voice_id_multi_stream_input import ReceiveMessageMulti, SendMessageMulti + from .v_1_text_to_speech_voice_id_stream_input import ReceiveMessage, SendMessage + from .version import __version__ + from .voices import VoicesGetSharedRequestCategory +_dynamic_imports: typing.Dict[str, str] = { + "AddChapterResponseModel": ".types", + "AddKnowledgeBaseResponseModel": ".types", + "AddProjectRequest": ".types", + "AddProjectResponseModel": ".types", + "AddPronunciationDictionaryResponseModel": ".types", + "AddPronunciationDictionaryResponseModelPermissionOnResource": ".types", + "AddSharingVoiceRequest": ".types", + "AddVoiceIvcResponseModel": ".types", + "AddVoiceResponseModel": ".types", + "AddWorkspaceGroupMemberResponseModel": ".types", + "AddWorkspaceInviteResponseModel": ".types", + "AdditionalFormatResponseModel": ".types", + "AdditionalFormats": ".types", + "AdhocAgentConfigOverrideForTestRequestModel": ".types", + "Age": ".types", + "AgentCallLimits": ".types", + "AgentConfig": ".types", + "AgentConfigApiModelWorkflowOverride": ".types", + "AgentConfigOverride": ".types", + "AgentConfigOverrideConfig": ".types", + "AgentFailureResponseExample": ".types", + "AgentMetadataResponseModel": ".types", + "AgentPlatformSettingsRequestModel": ".types", + "AgentPlatformSettingsResponseModel": ".types", + "AgentSimulatedChatTestResponseModel": ".types", + "AgentSuccessfulResponseExample": ".types", + "AgentSummaryResponseModel": ".types", + "AgentTestingSettings": ".types", + "AgentTransfer": ".types", + "AgentWorkflowRequestModel": ".types", + "AgentWorkflowRequestModelNodesValue": ".types", + "AgentWorkflowRequestModelNodesValue_End": ".types", + "AgentWorkflowRequestModelNodesValue_OverrideAgent": ".types", + "AgentWorkflowRequestModelNodesValue_PhoneNumber": ".types", + "AgentWorkflowRequestModelNodesValue_StandaloneAgent": ".types", + "AgentWorkflowRequestModelNodesValue_Start": ".types", + "AgentWorkflowRequestModelNodesValue_Tool": ".types", + "AgentWorkspaceOverridesInput": ".types", + "AgentWorkspaceOverridesOutput": ".types", + "Alignment": ".types", + "AllowlistItem": ".types", + "ArrayJsonSchemaPropertyInput": ".types", + "ArrayJsonSchemaPropertyInputItems": ".types", + "ArrayJsonSchemaPropertyOutput": ".types", + "ArrayJsonSchemaPropertyOutputItems": ".types", + "AsrConversationalConfig": ".types", + "AsrConversationalConfigWorkflowOverride": ".types", + "AsrInputFormat": ".types", + "AsrProvider": ".types", + "AsrQuality": ".types", + "AsyncElevenLabs": ".client", + "AttachedTestModel": ".types", + "AudioIsolationConvertRequestFileFormat": ".audio_isolation", + "AudioIsolationStreamRequestFileFormat": ".audio_isolation", + "AudioNativeCreateProjectResponseModel": ".types", + "AudioNativeEditContentResponseModel": ".types", + "AudioNativeProjectSettingsResponseModel": ".types", + "AudioNativeProjectSettingsResponseModelStatus": ".types", + "AudioOutput": ".types", + "AudioOutputMulti": ".types", + "AudioWithTimestampsResponse": ".types", + "AuthConnectionLocator": ".types", + "AuthSettings": ".types", + "AuthorizationMethod": ".types", + "BadRequestError": ".errors", + "BadRequestErrorBody": ".types", + "BanReasonType": ".types", + "BatchCallDetailedResponse": ".types", + "BatchCallRecipientStatus": ".types", + "BatchCallResponse": ".types", + "BatchCallStatus": ".types", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem": ".pronunciation_dictionaries", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias": ".pronunciation_dictionaries", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme": ".pronunciation_dictionaries", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess": ".pronunciation_dictionaries", + "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostMode": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostMode_Conversation": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostQualityPreset": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostSource": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text": ".studio", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url": ".studio", + "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge": ".types", + "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender": ".types", + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".text_to_dialogue", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".text_to_dialogue", + "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".text_to_speech", + "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".text_to_speech", + "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".text_to_speech", + "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".text_to_speech", + "BreakdownTypes": ".types", + "BuiltInToolsInput": ".types", + "BuiltInToolsOutput": ".types", + "BuiltInToolsWorkflowOverride": ".types", + "CaptionStyleCharacterAnimationModel": ".types", + "CaptionStyleCharacterAnimationModelEnterType": ".types", + "CaptionStyleCharacterAnimationModelExitType": ".types", + "CaptionStyleHorizontalPlacementModel": ".types", + "CaptionStyleHorizontalPlacementModelAlign": ".types", + "CaptionStyleModel": ".types", + "CaptionStyleModelTextAlign": ".types", + "CaptionStyleModelTextStyle": ".types", + "CaptionStyleModelTextWeight": ".types", + "CaptionStyleSectionAnimationModel": ".types", + "CaptionStyleSectionAnimationModelEnterType": ".types", + "CaptionStyleSectionAnimationModelExitType": ".types", + "CaptionStyleTemplateModel": ".types", + "CaptionStyleVerticalPlacementModel": ".types", + "CaptionStyleVerticalPlacementModelAlign": ".types", + "CaptionStyleWordAnimationModel": ".types", + "CaptionStyleWordAnimationModelEnterType": ".types", + "CaptionStyleWordAnimationModelExitType": ".types", + "ChapterContentBlockExtendableNodeResponseModel": ".types", + "ChapterContentBlockInputModel": ".types", + "ChapterContentBlockInputModelSubType": ".types", + "ChapterContentBlockResponseModel": ".types", + "ChapterContentBlockResponseModelNodesItem": ".types", + "ChapterContentBlockResponseModelNodesItem_Other": ".types", + "ChapterContentBlockResponseModelNodesItem_TtsNode": ".types", + "ChapterContentBlockTtsNodeResponseModel": ".types", + "ChapterContentInputModel": ".types", + "ChapterContentParagraphTtsNodeInputModel": ".types", + "ChapterContentResponseModel": ".types", + "ChapterResponse": ".types", + "ChapterSnapshotExtendedResponseModel": ".types", + "ChapterSnapshotResponse": ".types", + "ChapterSnapshotsResponse": ".types", + "ChapterState": ".types", + "ChapterStatisticsResponse": ".types", + "ChapterWithContentResponseModel": ".types", + "ChapterWithContentResponseModelState": ".types", + "CharacterAlignmentModel": ".types", + "CharacterAlignmentResponseModel": ".types", + "CharacterUsageResponse": ".types", + "ClientEvent": ".types", + "ClientToolConfigInput": ".types", + "ClientToolConfigOutput": ".types", + "CloseConnection": ".types", + "CloseContext": ".types", + "CloseSocket": ".types", + "ConvAiDynamicVariable": ".types", + "ConvAiSecretLocator": ".types", + "ConvAiStoredSecretDependencies": ".types", + "ConvAiStoredSecretDependenciesAgentsItem": ".types", + "ConvAiStoredSecretDependenciesAgentsItem_Available": ".types", + "ConvAiStoredSecretDependenciesAgentsItem_Unknown": ".types", + "ConvAiStoredSecretDependenciesToolsItem": ".types", + "ConvAiStoredSecretDependenciesToolsItem_Available": ".types", + "ConvAiStoredSecretDependenciesToolsItem_Unknown": ".types", + "ConvAiUserSecretDbModel": ".types", + "ConvAiWebhooks": ".types", + "ConvAiWorkspaceStoredSecretConfig": ".types", + "ConversationChargingCommonModel": ".types", + "ConversationConfig": ".types", + "ConversationConfigClientOverrideConfigInput": ".types", + "ConversationConfigClientOverrideConfigOutput": ".types", + "ConversationConfigClientOverrideInput": ".types", + "ConversationConfigClientOverrideOutput": ".types", + "ConversationConfigOverride": ".types", + "ConversationConfigOverrideConfig": ".types", + "ConversationConfigWorkflowOverride": ".types", + "ConversationDeletionSettings": ".types", + "ConversationHistoryAnalysisCommonModel": ".types", + "ConversationHistoryBatchCallModel": ".types", + "ConversationHistoryElevenAssistantCommonModel": ".types", + "ConversationHistoryErrorCommonModel": ".types", + "ConversationHistoryEvaluationCriteriaResultCommonModel": ".types", + "ConversationHistoryFeedbackCommonModel": ".types", + "ConversationHistoryMetadataCommonModel": ".types", + "ConversationHistoryMetadataCommonModelPhoneCall": ".types", + "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking": ".types", + "ConversationHistoryMetadataCommonModelPhoneCall_Twilio": ".types", + "ConversationHistoryMultivoiceMessageModel": ".types", + "ConversationHistoryMultivoiceMessagePartModel": ".types", + "ConversationHistoryRagUsageCommonModel": ".types", + "ConversationHistorySipTrunkingPhoneCallModel": ".types", + "ConversationHistorySipTrunkingPhoneCallModelDirection": ".types", + "ConversationHistoryTranscriptCommonModelInput": ".types", + "ConversationHistoryTranscriptCommonModelInputRole": ".types", + "ConversationHistoryTranscriptCommonModelInputSourceMedium": ".types", + "ConversationHistoryTranscriptCommonModelInputToolResultsItem": ".types", + "ConversationHistoryTranscriptCommonModelOutput": ".types", + "ConversationHistoryTranscriptCommonModelOutputRole": ".types", + "ConversationHistoryTranscriptCommonModelOutputSourceMedium": ".types", + "ConversationHistoryTranscriptCommonModelOutputToolResultsItem": ".types", + "ConversationHistoryTranscriptOtherToolsResultCommonModel": ".types", + "ConversationHistoryTranscriptOtherToolsResultCommonModelType": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModel": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess": ".types", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess": ".types", + "ConversationHistoryTranscriptToolCallClientDetails": ".types", + "ConversationHistoryTranscriptToolCallCommonModel": ".types", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails": ".types", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client": ".types", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp": ".types", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook": ".types", + "ConversationHistoryTranscriptToolCallMcpDetails": ".types", + "ConversationHistoryTranscriptToolCallWebhookDetails": ".types", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput": ".types", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput": ".types", + "ConversationHistoryTwilioPhoneCallModel": ".types", + "ConversationHistoryTwilioPhoneCallModelDirection": ".types", + "ConversationInitiationClientDataConfigInput": ".types", + "ConversationInitiationClientDataConfigOutput": ".types", + "ConversationInitiationClientDataInternal": ".types", + "ConversationInitiationClientDataInternalDynamicVariablesValue": ".types", + "ConversationInitiationClientDataRequestInput": ".types", + "ConversationInitiationClientDataRequestInputDynamicVariablesValue": ".types", + "ConversationInitiationClientDataRequestOutput": ".types", + "ConversationInitiationClientDataRequestOutputDynamicVariablesValue": ".types", + "ConversationInitiationClientDataWebhook": ".types", + "ConversationInitiationClientDataWebhookRequestHeadersValue": ".types", + "ConversationInitiationSource": ".types", + "ConversationInitiationSourceInfo": ".types", + "ConversationSignedUrlResponseModel": ".types", + "ConversationSimulationSpecification": ".types", + "ConversationSimulationSpecificationDynamicVariablesValue": ".types", + "ConversationSummaryResponseModel": ".types", + "ConversationSummaryResponseModelDirection": ".types", + "ConversationSummaryResponseModelStatus": ".types", + "ConversationTokenDbModel": ".types", + "ConversationTokenPurpose": ".types", + "ConversationTurnMetrics": ".types", + "ConversationalConfig": ".types", + "ConversationalConfigApiModelWorkflowOverride": ".types", + "ConvertChapterResponseModel": ".types", + "ConvertProjectResponseModel": ".types", + "CreateAgentResponseModel": ".types", + "CreateAudioNativeProjectRequest": ".types", + "CreatePhoneNumberResponseModel": ".types", + "CreatePreviouslyGeneratedVoiceRequest": ".types", + "CreatePronunciationDictionaryResponseModel": ".types", + "CreateSipTrunkPhoneNumberRequest": ".types", + "CreateTranscriptRequest": ".types", + "CreateTwilioPhoneNumberRequest": ".types", + "CreateUnitTestResponseModel": ".types", + "CustomLlm": ".types", + "CustomLlmRequestHeadersValue": ".types", + "DashboardCallSuccessChartModel": ".types", + "DashboardCriteriaChartModel": ".types", + "DashboardDataCollectionChartModel": ".types", + "DataCollectionResultCommonModel": ".types", + "DeleteChapterRequest": ".types", + "DeleteChapterResponseModel": ".types", + "DeleteDubbingResponseModel": ".types", + "DeleteHistoryItemResponse": ".types", + "DeleteProjectRequest": ".types", + "DeleteProjectResponseModel": ".types", + "DeleteSampleResponse": ".types", + "DeleteVoiceResponseModel": ".types", + "DeleteVoiceSampleResponseModel": ".types", + "DeleteWorkspaceGroupMemberResponseModel": ".types", + "DeleteWorkspaceInviteResponseModel": ".types", + "DependentAvailableAgentIdentifier": ".types", + "DependentAvailableAgentIdentifierAccessLevel": ".types", + "DependentAvailableToolIdentifier": ".types", + "DependentAvailableToolIdentifierAccessLevel": ".types", + "DependentPhoneNumberIdentifier": ".types", + "DependentUnknownAgentIdentifier": ".types", + "DependentUnknownToolIdentifier": ".types", + "DetailedMusicResponse": ".types", + "DialogueInput": ".types", + "DialogueInputResponseModel": ".types", + "DoDubbingResponse": ".types", + "DocumentUsageModeEnum": ".types", + "DocxExportOptions": ".types", + "DubbedSegment": ".types", + "DubbingListRequestDubbingStatus": ".dubbing", + "DubbingListRequestFilterByCreator": ".dubbing", + "DubbingMediaMetadata": ".types", + "DubbingMediaReference": ".types", + "DubbingMetadataPageResponseModel": ".types", + "DubbingMetadataResponse": ".types", + "DubbingReleaseChannel": ".types", + "DubbingRenderResponseModel": ".types", + "DubbingResource": ".types", + "DynamicVariableAssignment": ".types", + "DynamicVariableUpdateCommonModel": ".types", + "DynamicVariablesConfig": ".types", + "DynamicVariablesConfigDynamicVariablePlaceholdersValue": ".types", + "DynamicVariablesConfigWorkflowOverride": ".types", + "DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue": ".types", + "EditChapterResponseModel": ".types", + "EditProjectResponseModel": ".types", + "EditVoiceResponseModel": ".types", + "EditVoiceSettingsRequest": ".types", + "EditVoiceSettingsResponseModel": ".types", + "ElevenLabs": ".client", + "ElevenLabsEnvironment": ".environment", + "EmbedVariant": ".types", + "EmbeddingModelEnum": ".types", + "EndCallToolConfig": ".types", + "EndCallToolResultModel": ".types", + "EvaluationSettings": ".types", + "EvaluationSuccessResult": ".types", + "ExactParameterEvaluationStrategy": ".types", + "ExportOptions": ".types", + "ExportOptions_Docx": ".types", + "ExportOptions_Html": ".types", + "ExportOptions_Pdf": ".types", + "ExportOptions_SegmentedJson": ".types", + "ExportOptions_Srt": ".types", + "ExportOptions_Txt": ".types", + "ExtendedSubscriptionResponseModelBillingPeriod": ".types", + "ExtendedSubscriptionResponseModelCharacterRefreshPeriod": ".types", + "ExtendedSubscriptionResponseModelCurrency": ".types", + "ExtendedSubscriptionResponseModelPendingChange": ".types", + "FeatureStatusCommonModel": ".types", + "FeaturesUsageCommonModel": ".types", + "FeedbackItem": ".types", + "FinalOutput": ".types", + "FinalOutputMulti": ".types", + "FineTuningResponse": ".types", + "FineTuningResponseModelStateValue": ".types", + "FlushContext": ".types", + "ForbiddenError": ".errors", + "ForcedAlignmentCharacterResponseModel": ".types", + "ForcedAlignmentResponseModel": ".types", + "ForcedAlignmentWordResponseModel": ".types", + "Gender": ".types", + "GenerateVoiceRequest": ".types", + "GenerationConfig": ".types", + "GetAgentEmbedResponseModel": ".types", + "GetAgentKnowledgebaseSizeResponseModel": ".types", + "GetAgentLinkResponseModel": ".types", + "GetAgentResponseModel": ".types", + "GetAgentResponseModelPhoneNumbersItem": ".types", + "GetAgentResponseModelPhoneNumbersItem_SipTrunk": ".types", + "GetAgentResponseModelPhoneNumbersItem_Twilio": ".types", + "GetAgentsPageResponseModel": ".types", + "GetAudioNativeProjectSettingsResponseModel": ".types", + "GetChapterRequest": ".types", + "GetChapterSnapshotsRequest": ".types", + "GetChaptersRequest": ".types", + "GetChaptersResponse": ".types", + "GetConvAiDashboardSettingsResponseModel": ".types", + "GetConvAiDashboardSettingsResponseModelChartsItem": ".types", + "GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess": ".types", + "GetConvAiDashboardSettingsResponseModelChartsItem_Criteria": ".types", + "GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection": ".types", + "GetConvAiSettingsResponseModel": ".types", + "GetConversationResponseModel": ".types", + "GetConversationResponseModelStatus": ".types", + "GetConversationsPageResponseModel": ".types", + "GetKnowledgeBaseDependentAgentsResponseModel": ".types", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem": ".types", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available": ".types", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown": ".types", + "GetKnowledgeBaseFileResponseModel": ".types", + "GetKnowledgeBaseListResponseModel": ".types", + "GetKnowledgeBaseListResponseModelDocumentsItem": ".types", + "GetKnowledgeBaseListResponseModelDocumentsItem_File": ".types", + "GetKnowledgeBaseListResponseModelDocumentsItem_Text": ".types", + "GetKnowledgeBaseListResponseModelDocumentsItem_Url": ".types", + "GetKnowledgeBaseSummaryFileResponseModel": ".types", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem": ".types", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available": ".types", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown": ".types", + "GetKnowledgeBaseSummaryTextResponseModel": ".types", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem": ".types", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available": ".types", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown": ".types", + "GetKnowledgeBaseSummaryUrlResponseModel": ".types", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem": ".types", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available": ".types", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown": ".types", + "GetKnowledgeBaseTextResponseModel": ".types", + "GetKnowledgeBaseUrlResponseModel": ".types", + "GetLibraryVoicesResponse": ".types", + "GetPhoneNumberInboundSipTrunkConfigResponseModel": ".types", + "GetPhoneNumberOutboundSipTrunkConfigResponseModel": ".types", + "GetPhoneNumberResponse": ".types", + "GetPhoneNumberSipTrunkResponseModel": ".types", + "GetPhoneNumberTwilioResponseModel": ".types", + "GetProjectRequest": ".types", + "GetProjectsRequest": ".types", + "GetProjectsResponse": ".types", + "GetPronunciationDictionariesMetadataResponseModel": ".types", + "GetPronunciationDictionariesResponse": ".types", + "GetPronunciationDictionaryMetadataResponse": ".types", + "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource": ".types", + "GetPronunciationDictionaryResponse": ".types", + "GetSpeechHistoryResponse": ".types", + "GetTestSuiteInvocationResponseModel": ".types", + "GetTestsPageResponseModel": ".types", + "GetTestsSummariesByIdsResponseModel": ".types", + "GetToolDependentAgentsResponseModel": ".types", + "GetToolDependentAgentsResponseModelAgentsItem": ".types", + "GetToolDependentAgentsResponseModelAgentsItem_Available": ".types", + "GetToolDependentAgentsResponseModelAgentsItem_Unknown": ".types", + "GetUnitTestResponseModel": ".types", + "GetUnitTestResponseModelDynamicVariablesValue": ".types", + "GetVoicesResponse": ".types", + "GetVoicesV2Response": ".types", + "GetWorkspaceSecretsResponseModel": ".types", + "HistoryAlignmentResponseModel": ".types", + "HistoryAlignmentsResponseModel": ".types", + "HistoryItemResponse": ".types", + "HistoryListRequestSource": ".history", + "HtmlExportOptions": ".types", + "HttpValidationError": ".types", + "ImageAvatar": ".types", + "InboundSipTrunkConfigRequestModel": ".types", + "InitialiseContext": ".types", + "InitializeConnection": ".types", + "InitializeConnectionMulti": ".types", + "IntegrationType": ".types", + "InvoiceResponse": ".types", + "InvoiceResponseModelPaymentIntentStatus": ".types", + "KeepContextAlive": ".types", + "KnowledgeBaseDocumentChunkResponseModel": ".types", + "KnowledgeBaseDocumentMetadataResponseModel": ".types", + "KnowledgeBaseDocumentType": ".types", + "KnowledgeBaseLocator": ".types", + "LanguageAddedResponse": ".types", + "LanguageDetectionToolConfig": ".types", + "LanguageDetectionToolResultModel": ".types", + "LanguagePresetInput": ".types", + "LanguagePresetOutput": ".types", + "LanguagePresetTranslation": ".types", + "LanguageResponse": ".types", + "LibraryVoiceResponse": ".types", + "LibraryVoiceResponseModelCategory": ".types", + "ListMcpToolsResponseModel": ".types", + "LiteralJsonSchemaProperty": ".types", + "LiteralJsonSchemaPropertyConstantValue": ".types", + "LiteralJsonSchemaPropertyType": ".types", + "Llm": ".types", + "LlmCategoryUsage": ".types", + "LlmInputOutputTokensUsage": ".types", + "LlmParameterEvaluationStrategy": ".types", + "LlmTokensCategoryUsage": ".types", + "LlmUsageCalculatorLlmResponseModel": ".types", + "LlmUsageCalculatorResponseModel": ".types", + "LlmUsageInput": ".types", + "LlmUsageOutput": ".types", + "ManualVerificationFileResponse": ".types", + "ManualVerificationResponse": ".types", + "McpApprovalPolicy": ".types", + "McpServerConfigInput": ".types", + "McpServerConfigInputRequestHeadersValue": ".types", + "McpServerConfigInputSecretToken": ".types", + "McpServerConfigInputUrl": ".types", + "McpServerConfigOutput": ".types", + "McpServerConfigOutputRequestHeadersValue": ".types", + "McpServerConfigOutputSecretToken": ".types", + "McpServerConfigOutputUrl": ".types", + "McpServerMetadataResponseModel": ".types", + "McpServerResponseModel": ".types", + "McpServerResponseModelDependentAgentsItem": ".types", + "McpServerResponseModelDependentAgentsItem_Available": ".types", + "McpServerResponseModelDependentAgentsItem_Unknown": ".types", + "McpServerTransport": ".types", + "McpServersResponseModel": ".types", + "McpToolApprovalHash": ".types", + "McpToolApprovalPolicy": ".types", + "MetricRecord": ".types", + "MetricType": ".types", + "Model": ".types", + "ModelRatesResponseModel": ".types", + "ModelResponseModelConcurrencyGroup": ".types", + "ModelSettingsResponseModel": ".types", + "ModerationStatusResponseModel": ".types", + "ModerationStatusResponseModelSafetyStatus": ".types", + "ModerationStatusResponseModelWarningStatus": ".types", + "MultichannelSpeechToTextResponseModel": ".types", + "MultipartMusicResponse": ".types", + "MusicComposeDetailedRequestOutputFormat": ".music", + "MusicComposeRequestOutputFormat": ".music", + "MusicPrompt": ".types", + "MusicStreamRequestOutputFormat": ".music", + "NormalizedAlignment": ".types", + "NotFoundError": ".errors", + "ObjectJsonSchemaPropertyInput": ".types", + "ObjectJsonSchemaPropertyInputPropertiesValue": ".types", + "ObjectJsonSchemaPropertyOutput": ".types", + "ObjectJsonSchemaPropertyOutputPropertiesValue": ".types", + "OrbAvatar": ".types", + "OutboundCallRecipient": ".types", + "OutboundCallRecipientResponseModel": ".types", + "OutboundSipTrunkConfigRequestModel": ".types", + "OutputFormat": ".types", + "PdfExportOptions": ".types", + "PendingCancellationResponseModel": ".types", + "PendingSubscriptionSwitchResponseModel": ".types", + "PendingSubscriptionSwitchResponseModelNextTier": ".types", + "PhoneNumberAgentInfo": ".types", + "PhoneNumberTransfer": ".types", + "PhoneNumberTransferDestination": ".types", + "PhoneNumberTransferTransferDestination": ".types", + "PhoneNumberTransferTransferDestination_Phone": ".types", + "PhoneNumberTransferTransferDestination_SipUri": ".types", + "PlayDtmfResultErrorModel": ".types", + "PlayDtmfResultSuccessModel": ".types", + "PlayDtmfToolConfig": ".types", + "PodcastBulletinMode": ".types", + "PodcastBulletinModeData": ".types", + "PodcastConversationMode": ".types", + "PodcastConversationModeData": ".types", + "PodcastProjectResponseModel": ".types", + "PodcastTextSource": ".types", + "PodcastUrlSource": ".types", + "Position": ".types", + "PostAgentAvatarResponseModel": ".types", + "PostWorkspaceSecretResponseModel": ".types", + "PrivacyConfig": ".types", + "ProjectCreationMetaResponseModel": ".types", + "ProjectCreationMetaResponseModelStatus": ".types", + "ProjectCreationMetaResponseModelType": ".types", + "ProjectExtendedResponse": ".types", + "ProjectExtendedResponseModelAccessLevel": ".types", + "ProjectExtendedResponseModelApplyTextNormalization": ".types", + "ProjectExtendedResponseModelFiction": ".types", + "ProjectExtendedResponseModelQualityPreset": ".types", + "ProjectExtendedResponseModelSourceType": ".types", + "ProjectExtendedResponseModelTargetAudience": ".types", + "ProjectResponse": ".types", + "ProjectResponseModelAccessLevel": ".types", + "ProjectResponseModelFiction": ".types", + "ProjectResponseModelSourceType": ".types", + "ProjectResponseModelTargetAudience": ".types", + "ProjectSnapshotExtendedResponseModel": ".types", + "ProjectSnapshotResponse": ".types", + "ProjectSnapshotsResponse": ".types", + "ProjectState": ".types", + "PromptAgent": ".types", + "PromptAgentApiModelInput": ".types", + "PromptAgentApiModelInputToolsItem": ".types", + "PromptAgentApiModelInputToolsItem_Client": ".types", + "PromptAgentApiModelInputToolsItem_Mcp": ".types", + "PromptAgentApiModelInputToolsItem_System": ".types", + "PromptAgentApiModelInputToolsItem_Webhook": ".types", + "PromptAgentApiModelOutput": ".types", + "PromptAgentApiModelOutputToolsItem": ".types", + "PromptAgentApiModelOutputToolsItem_Client": ".types", + "PromptAgentApiModelOutputToolsItem_Mcp": ".types", + "PromptAgentApiModelOutputToolsItem_System": ".types", + "PromptAgentApiModelOutputToolsItem_Webhook": ".types", + "PromptAgentApiModelOverride": ".types", + "PromptAgentApiModelOverrideConfig": ".types", + "PromptAgentApiModelWorkflowOverride": ".types", + "PromptAgentApiModelWorkflowOverrideToolsItem": ".types", + "PromptAgentApiModelWorkflowOverrideToolsItem_Client": ".types", + "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp": ".types", + "PromptAgentApiModelWorkflowOverrideToolsItem_System": ".types", + "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook": ".types", + "PromptAgentDbModel": ".types", + "PromptEvaluationCriteria": ".types", + "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess": ".pronunciation_dictionaries", + "PronunciationDictionariesListRequestSort": ".pronunciation_dictionaries", + "PronunciationDictionaryAliasRuleRequestModel": ".types", + "PronunciationDictionaryLocator": ".types", + "PronunciationDictionaryLocatorResponseModel": ".types", + "PronunciationDictionaryPhonemeRuleRequestModel": ".types", + "PronunciationDictionaryRulesResponseModel": ".types", + "PronunciationDictionaryVersionLocator": ".types", + "PronunciationDictionaryVersionResponseModel": ".types", + "PronunciationDictionaryVersionResponseModelPermissionOnResource": ".types", + "PydanticPronunciationDictionaryVersionLocator": ".types", + "QueryParamsJsonSchema": ".types", + "RagChunkMetadata": ".types", + "RagConfig": ".types", + "RagConfigWorkflowOverride": ".types", + "RagDocumentIndexResponseModel": ".types", + "RagDocumentIndexUsage": ".types", + "RagDocumentIndexesResponseModel": ".types", + "RagIndexOverviewEmbeddingModelResponseModel": ".types", + "RagIndexOverviewResponseModel": ".types", + "RagIndexStatus": ".types", + "RagRetrievalInfo": ".types", + "ReaderResourceResponseModel": ".types", + "ReaderResourceResponseModelResourceType": ".types", + "RealtimeVoiceSettings": ".types", + "ReceiveMessage": ".v_1_text_to_speech_voice_id_stream_input", + "ReceiveMessageMulti": ".v_1_text_to_speech_voice_id_multi_stream_input", + "RecordingResponse": ".types", + "ReferencedToolCommonModel": ".types", + "RegexParameterEvaluationStrategy": ".types", + "RemoveMemberFromGroupRequest": ".types", + "Render": ".types", + "RenderStatus": ".types", + "RenderType": ".types", + "RequestPvcManualVerificationResponseModel": ".types", + "ResourceAccessInfo": ".types", + "ResourceAccessInfoRole": ".types", + "ResourceMetadataResponseModel": ".types", + "ResourceMetadataResponseModelAnonymousAccessLevelOverride": ".types", + "ReviewStatus": ".types", + "SafetyCommonModel": ".types", + "SafetyEvaluation": ".types", + "SafetyResponseModel": ".types", + "SafetyRule": ".types", + "SaveVoicePreviewRequest": ".types", + "SecretDependencyType": ".types", + "SegmentCreateResponse": ".types", + "SegmentDeleteResponse": ".types", + "SegmentDubResponse": ".types", + "SegmentSubtitleFrame": ".types", + "SegmentTranscriptionResponse": ".types", + "SegmentTranslationResponse": ".types", + "SegmentUpdateResponse": ".types", + "SegmentedJsonExportOptions": ".types", + "SendMessage": ".v_1_text_to_speech_voice_id_stream_input", + "SendMessageMulti": ".v_1_text_to_speech_voice_id_multi_stream_input", + "SendText": ".types", + "SendTextMulti": ".types", + "ShareOptionResponseModel": ".types", + "ShareOptionResponseModelType": ".types", + "SimilarVoice": ".types", + "SimilarVoiceCategory": ".types", + "SimilarVoicesForSpeakerResponse": ".types", + "SingleTestRunRequestModel": ".types", + "SipMediaEncryptionEnum": ".types", + "SipTrunkCredentialsRequestModel": ".types", + "SipTrunkOutboundCallResponse": ".types", + "SipTrunkTransportEnum": ".types", + "SipUriTransferDestination": ".types", + "SkipTurnToolConfig": ".types", + "SkipTurnToolResponseModel": ".types", + "SongMetadata": ".types", + "SongSection": ".types", + "SpeakerAudioResponseModel": ".types", + "SpeakerResponseModel": ".types", + "SpeakerSegment": ".types", + "SpeakerSeparationResponseModel": ".types", + "SpeakerSeparationResponseModelStatus": ".types", + "SpeakerTrack": ".types", + "SpeakerUpdatedResponse": ".types", + "SpeechHistoryItemResponse": ".types", + "SpeechHistoryItemResponseModelSource": ".types", + "SpeechHistoryItemResponseModelVoiceCategory": ".types", + "SpeechToSpeechConvertRequestFileFormat": ".speech_to_speech", + "SpeechToSpeechConvertRequestOutputFormat": ".speech_to_speech", + "SpeechToSpeechStreamRequestFileFormat": ".speech_to_speech", + "SpeechToSpeechStreamRequestOutputFormat": ".speech_to_speech", + "SpeechToTextCharacterResponseModel": ".types", + "SpeechToTextChunkResponseModel": ".types", + "SpeechToTextConvertRequestFileFormat": ".speech_to_text", + "SpeechToTextConvertRequestTimestampsGranularity": ".speech_to_text", + "SpeechToTextConvertRequestWebhookMetadata": ".speech_to_text", + "SpeechToTextConvertResponse": ".speech_to_text", + "SpeechToTextWebhookResponseModel": ".types", + "SpeechToTextWordResponseModel": ".types", + "SpeechToTextWordResponseModelType": ".types", + "SrtExportOptions": ".types", + "StartPvcVoiceTrainingResponseModel": ".types", + "StartSpeakerSeparationResponseModel": ".types", + "StreamingAudioChunkWithTimestampsResponse": ".types", + "Subscription": ".types", + "SubscriptionExtrasResponseModel": ".types", + "SubscriptionResponse": ".types", + "SubscriptionResponseModelBillingPeriod": ".types", + "SubscriptionResponseModelCharacterRefreshPeriod": ".types", + "SubscriptionResponseModelCurrency": ".types", + "SubscriptionStatusType": ".types", + "SubscriptionUsageResponseModel": ".types", + "SupportedVoice": ".types", + "SystemToolConfigInput": ".types", + "SystemToolConfigInputParams": ".types", + "SystemToolConfigInputParams_EndCall": ".types", + "SystemToolConfigInputParams_LanguageDetection": ".types", + "SystemToolConfigInputParams_PlayKeypadTouchTone": ".types", + "SystemToolConfigInputParams_SkipTurn": ".types", + "SystemToolConfigInputParams_TransferToAgent": ".types", + "SystemToolConfigInputParams_TransferToNumber": ".types", + "SystemToolConfigInputParams_VoicemailDetection": ".types", + "SystemToolConfigOutput": ".types", + "SystemToolConfigOutputParams": ".types", + "SystemToolConfigOutputParams_EndCall": ".types", + "SystemToolConfigOutputParams_LanguageDetection": ".types", + "SystemToolConfigOutputParams_PlayKeypadTouchTone": ".types", + "SystemToolConfigOutputParams_SkipTurn": ".types", + "SystemToolConfigOutputParams_TransferToAgent": ".types", + "SystemToolConfigOutputParams_TransferToNumber": ".types", + "SystemToolConfigOutputParams_VoicemailDetection": ".types", + "TelephonyProvider": ".types", + "TestConditionRationaleCommonModel": ".types", + "TestConditionResultCommonModel": ".types", + "TestRunMetadata": ".types", + "TestRunMetadataTestType": ".types", + "TestRunStatus": ".types", + "TestToolResultModel": ".types", + "TestsFeatureUsageCommonModel": ".types", + "TextToDialogueConvertRequestOutputFormat": ".text_to_dialogue", + "TextToDialogueStreamRequestOutputFormat": ".text_to_dialogue", + "TextToSoundEffectsConvertRequestOutputFormat": ".text_to_sound_effects", + "TextToSpeechApplyTextNormalizationEnum": ".types", + "TextToSpeechConvertRequestOutputFormat": ".text_to_speech", + "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".text_to_speech", + "TextToSpeechOutputFormatEnum": ".types", + "TextToSpeechStreamRequest": ".types", + "TextToSpeechStreamRequestOutputFormat": ".text_to_speech", + "TextToSpeechStreamWithTimestampsRequestOutputFormat": ".text_to_speech", + "TextToVoiceCreatePreviewsRequestOutputFormat": ".text_to_voice", + "TextToVoiceDesignRequestOutputFormat": ".text_to_voice", + "TextToVoiceRemixRequestOutputFormat": ".text_to_voice", + "TokenResponseModel": ".types", + "TooEarlyError": ".errors", + "Tool": ".types", + "ToolAnnotations": ".types", + "ToolMockConfig": ".types", + "ToolRequestModel": ".types", + "ToolRequestModelToolConfig": ".types", + "ToolRequestModelToolConfig_Client": ".types", + "ToolRequestModelToolConfig_Mcp": ".types", + "ToolRequestModelToolConfig_System": ".types", + "ToolRequestModelToolConfig_Webhook": ".types", + "ToolResponseModel": ".types", + "ToolResponseModelToolConfig": ".types", + "ToolResponseModelToolConfig_Client": ".types", + "ToolResponseModelToolConfig_Mcp": ".types", + "ToolResponseModelToolConfig_System": ".types", + "ToolResponseModelToolConfig_Webhook": ".types", + "ToolType": ".types", + "ToolUsageStatsResponseModel": ".types", + "ToolsResponseModel": ".types", + "TransferToAgentToolConfig": ".types", + "TransferToAgentToolResultErrorModel": ".types", + "TransferToAgentToolResultSuccessModel": ".types", + "TransferToNumberResultErrorModel": ".types", + "TransferToNumberResultSipSuccessModel": ".types", + "TransferToNumberResultTwilioSuccessModel": ".types", + "TransferToNumberToolConfigInput": ".types", + "TransferToNumberToolConfigOutput": ".types", + "TransferTypeEnum": ".types", + "TtsConversationalConfigInput": ".types", + "TtsConversationalConfigOutput": ".types", + "TtsConversationalConfigOverride": ".types", + "TtsConversationalConfigOverrideConfig": ".types", + "TtsConversationalConfigWorkflowOverride": ".types", + "TtsConversationalModel": ".types", + "TtsModelFamily": ".types", + "TtsOptimizeStreamingLatency": ".types", + "TtsOutputFormat": ".types", + "TurnConfig": ".types", + "TurnConfigWorkflowOverride": ".types", + "TurnMode": ".types", + "TwilioOutboundCallResponse": ".types", + "TxtExportOptions": ".types", + "UnauthorizedError": ".errors", + "UnitTestRunResponseModel": ".types", + "UnitTestSummaryResponseModel": ".types", + "UnitTestToolCallEvaluationModelInput": ".types", + "UnitTestToolCallEvaluationModelOutput": ".types", + "UnitTestToolCallParameter": ".types", + "UnitTestToolCallParameterEval": ".types", + "UnitTestToolCallParameterEval_Exact": ".types", + "UnitTestToolCallParameterEval_Llm": ".types", + "UnitTestToolCallParameterEval_Regex": ".types", + "UnprocessableEntityError": ".errors", + "UpdateAudioNativeProjectRequest": ".types", + "UpdateChapterRequest": ".types", + "UpdateProjectRequest": ".types", + "UpdatePronunciationDictionariesRequest": ".types", + "UpdateWorkspaceMemberResponseModel": ".types", + "UrlAvatar": ".types", + "UsageAggregationInterval": ".types", + "UsageCharactersResponseModel": ".types", + "User": ".types", + "UserFeedback": ".types", + "UserFeedbackScore": ".types", + "UtteranceResponseModel": ".types", + "ValidationError": ".types", + "ValidationErrorLocItem": ".types", + "VerificationAttemptResponse": ".types", + "VerifiedVoiceLanguageResponseModel": ".types", + "VerifyPvcVoiceCaptchaResponseModel": ".types", + "Voice": ".types", + "VoiceDesignPreviewResponse": ".types", + "VoiceDesignRequestModelModelId": ".text_to_voice", + "VoiceGenerationParameterOptionResponse": ".types", + "VoiceGenerationParameterResponse": ".types", + "VoiceMailDetectionResultSuccessModel": ".types", + "VoicePreviewResponseModel": ".types", + "VoiceResponseModelCategory": ".types", + "VoiceResponseModelSafetyControl": ".types", + "VoiceSample": ".types", + "VoiceSamplePreviewResponseModel": ".types", + "VoiceSampleVisualWaveformResponseModel": ".types", + "VoiceSettings": ".types", + "VoiceSharingModerationCheckResponseModel": ".types", + "VoiceSharingResponse": ".types", + "VoiceSharingResponseModelCategory": ".types", + "VoiceSharingState": ".types", + "VoiceVerificationResponse": ".types", + "VoicemailDetectionToolConfig": ".types", + "VoicesGetSharedRequestCategory": ".voices", + "WebhookAuthMethodType": ".types", + "WebhookToolApiSchemaConfigInput": ".types", + "WebhookToolApiSchemaConfigInputMethod": ".types", + "WebhookToolApiSchemaConfigInputRequestHeadersValue": ".types", + "WebhookToolApiSchemaConfigOutput": ".types", + "WebhookToolApiSchemaConfigOutputMethod": ".types", + "WebhookToolApiSchemaConfigOutputRequestHeadersValue": ".types", + "WebhookToolConfigInput": ".types", + "WebhookToolConfigOutput": ".types", + "WebhookUsageType": ".types", + "WebsocketTtsClientMessageMulti": ".types", + "WebsocketTtsServerMessageMulti": ".types", + "WidgetConfig": ".types", + "WidgetConfigInputAvatar": ".types", + "WidgetConfigInputAvatar_Image": ".types", + "WidgetConfigInputAvatar_Orb": ".types", + "WidgetConfigInputAvatar_Url": ".types", + "WidgetConfigOutputAvatar": ".types", + "WidgetConfigOutputAvatar_Image": ".types", + "WidgetConfigOutputAvatar_Orb": ".types", + "WidgetConfigOutputAvatar_Url": ".types", + "WidgetConfigResponse": ".types", + "WidgetConfigResponseModelAvatar": ".types", + "WidgetConfigResponseModelAvatar_Image": ".types", + "WidgetConfigResponseModelAvatar_Orb": ".types", + "WidgetConfigResponseModelAvatar_Url": ".types", + "WidgetExpandable": ".types", + "WidgetFeedbackMode": ".types", + "WidgetLanguagePreset": ".types", + "WidgetLanguagePresetResponse": ".types", + "WidgetPlacement": ".types", + "WidgetStyles": ".types", + "WidgetTextContents": ".types", + "WorkflowEdgeModel": ".types", + "WorkflowEdgeModelBackwardCondition": ".types", + "WorkflowEdgeModelBackwardCondition_Llm": ".types", + "WorkflowEdgeModelBackwardCondition_Result": ".types", + "WorkflowEdgeModelBackwardCondition_Unconditional": ".types", + "WorkflowEdgeModelForwardCondition": ".types", + "WorkflowEdgeModelForwardCondition_Llm": ".types", + "WorkflowEdgeModelForwardCondition_Result": ".types", + "WorkflowEdgeModelForwardCondition_Unconditional": ".types", + "WorkflowEndNodeModel": ".types", + "WorkflowFeaturesUsageCommonModel": ".types", + "WorkflowLlmConditionModel": ".types", + "WorkflowOverrideAgentNodeModel": ".types", + "WorkflowPhoneNumberNodeModel": ".types", + "WorkflowPhoneNumberNodeModelTransferDestination": ".types", + "WorkflowPhoneNumberNodeModelTransferDestination_Phone": ".types", + "WorkflowPhoneNumberNodeModelTransferDestination_SipUri": ".types", + "WorkflowResultConditionModel": ".types", + "WorkflowStandaloneAgentNodeModel": ".types", + "WorkflowStartNodeModel": ".types", + "WorkflowToolEdgeStepModel": ".types", + "WorkflowToolLocator": ".types", + "WorkflowToolMaxIterationsExceededStepModel": ".types", + "WorkflowToolNestedToolsStepModelInput": ".types", + "WorkflowToolNestedToolsStepModelInputResultsItem": ".types", + "WorkflowToolNestedToolsStepModelOutput": ".types", + "WorkflowToolNestedToolsStepModelOutputResultsItem": ".types", + "WorkflowToolNodeModel": ".types", + "WorkflowToolResponseModelInput": ".types", + "WorkflowToolResponseModelInputStepsItem": ".types", + "WorkflowToolResponseModelInputStepsItem_Edge": ".types", + "WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded": ".types", + "WorkflowToolResponseModelInputStepsItem_NestedTools": ".types", + "WorkflowToolResponseModelOutput": ".types", + "WorkflowToolResponseModelOutputStepsItem": ".types", + "WorkflowToolResponseModelOutputStepsItem_Edge": ".types", + "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded": ".types", + "WorkflowToolResponseModelOutputStepsItem_NestedTools": ".types", + "WorkflowUnconditionalModel": ".types", + "WorkspaceApiKeyListResponseModel": ".types", + "WorkspaceApiKeyResponseModel": ".types", + "WorkspaceApiKeyResponseModelPermissionsItem": ".types", + "WorkspaceBatchCallsResponse": ".types", + "WorkspaceCreateApiKeyResponseModel": ".types", + "WorkspaceGroupByNameResponseModel": ".types", + "WorkspaceResourceType": ".types", + "WorkspaceServiceAccountListResponseModel": ".types", + "WorkspaceServiceAccountResponseModel": ".types", + "WorkspaceWebhookListResponseModel": ".types", + "WorkspaceWebhookResponseModel": ".types", + "WorkspaceWebhookUsageResponseModel": ".types", + "__version__": ".version", + "audio_isolation": ".", + "audio_native": ".", + "conversational_ai": ".", + "dubbing": ".", + "forced_alignment": ".", + "history": ".", + "models": ".", + "music": ".", + "play": ".play", + "pronunciation_dictionaries": ".", + "samples": ".", + "save": ".play", + "service_accounts": ".", + "speech_to_speech": ".", + "speech_to_text": ".", + "stream": ".play", + "studio": ".", + "text_to_dialogue": ".", + "text_to_sound_effects": ".", + "text_to_speech": ".", + "text_to_voice": ".", + "usage": ".", + "user": ".", + "v_1_text_to_speech_voice_id_multi_stream_input": ".", + "v_1_text_to_speech_voice_id_stream_input": ".", + "voices": ".", + "webhooks": ".", + "workspace": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "AddChapterResponseModel", @@ -1639,6 +2579,7 @@ "TextToSpeechStreamWithTimestampsRequestOutputFormat", "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", + "TextToVoiceRemixRequestOutputFormat", "TokenResponseModel", "TooEarlyError", "Tool", diff --git a/src/elevenlabs/audio_isolation/__init__.py b/src/elevenlabs/audio_isolation/__init__.py index 6602e7aa..6d26c81a 100644 --- a/src/elevenlabs/audio_isolation/__init__.py +++ b/src/elevenlabs/audio_isolation/__init__.py @@ -2,6 +2,34 @@ # isort: skip_file -from .types import AudioIsolationConvertRequestFileFormat, AudioIsolationStreamRequestFileFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import AudioIsolationConvertRequestFileFormat, AudioIsolationStreamRequestFileFormat +_dynamic_imports: typing.Dict[str, str] = { + "AudioIsolationConvertRequestFileFormat": ".types", + "AudioIsolationStreamRequestFileFormat": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["AudioIsolationConvertRequestFileFormat", "AudioIsolationStreamRequestFileFormat"] diff --git a/src/elevenlabs/audio_isolation/types/__init__.py b/src/elevenlabs/audio_isolation/types/__init__.py index 61975f84..2003734e 100644 --- a/src/elevenlabs/audio_isolation/types/__init__.py +++ b/src/elevenlabs/audio_isolation/types/__init__.py @@ -2,7 +2,35 @@ # isort: skip_file -from .audio_isolation_convert_request_file_format import AudioIsolationConvertRequestFileFormat -from .audio_isolation_stream_request_file_format import AudioIsolationStreamRequestFileFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .audio_isolation_convert_request_file_format import AudioIsolationConvertRequestFileFormat + from .audio_isolation_stream_request_file_format import AudioIsolationStreamRequestFileFormat +_dynamic_imports: typing.Dict[str, str] = { + "AudioIsolationConvertRequestFileFormat": ".audio_isolation_convert_request_file_format", + "AudioIsolationStreamRequestFileFormat": ".audio_isolation_stream_request_file_format", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["AudioIsolationConvertRequestFileFormat", "AudioIsolationStreamRequestFileFormat"] diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index 54d9566a..dcd099d0 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -1,35 +1,39 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import httpx -from .audio_isolation.client import AsyncAudioIsolationClient, AudioIsolationClient -from .audio_native.client import AsyncAudioNativeClient, AudioNativeClient -from .conversational_ai.client import AsyncConversationalAiClient, ConversationalAiClient from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.request_options import RequestOptions -from .dubbing.client import AsyncDubbingClient, DubbingClient from .environment import ElevenLabsEnvironment -from .forced_alignment.client import AsyncForcedAlignmentClient, ForcedAlignmentClient -from .history.client import AsyncHistoryClient, HistoryClient -from .models.client import AsyncModelsClient, ModelsClient -from .music.client import AsyncMusicClient, MusicClient -from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient from .raw_base_client import AsyncRawBaseElevenLabs, RawBaseElevenLabs -from .samples.client import AsyncSamplesClient, SamplesClient -from .service_accounts.client import AsyncServiceAccountsClient, ServiceAccountsClient -from .speech_to_speech.client import AsyncSpeechToSpeechClient, SpeechToSpeechClient -from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient -from .studio.client import AsyncStudioClient, StudioClient -from .text_to_dialogue.client import AsyncTextToDialogueClient, TextToDialogueClient -from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient -from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient -from .text_to_voice.client import AsyncTextToVoiceClient, TextToVoiceClient -from .usage.client import AsyncUsageClient, UsageClient -from .user.client import AsyncUserClient, UserClient -from .voices.client import AsyncVoicesClient, VoicesClient -from .webhooks.client import AsyncWebhooksClient, WebhooksClient -from .workspace.client import AsyncWorkspaceClient, WorkspaceClient + +if typing.TYPE_CHECKING: + from .audio_isolation.client import AsyncAudioIsolationClient, AudioIsolationClient + from .audio_native.client import AsyncAudioNativeClient, AudioNativeClient + from .conversational_ai.client import AsyncConversationalAiClient, ConversationalAiClient + from .dubbing.client import AsyncDubbingClient, DubbingClient + from .forced_alignment.client import AsyncForcedAlignmentClient, ForcedAlignmentClient + from .history.client import AsyncHistoryClient, HistoryClient + from .models.client import AsyncModelsClient, ModelsClient + from .music.client import AsyncMusicClient, MusicClient + from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient + from .samples.client import AsyncSamplesClient, SamplesClient + from .service_accounts.client import AsyncServiceAccountsClient, ServiceAccountsClient + from .speech_to_speech.client import AsyncSpeechToSpeechClient, SpeechToSpeechClient + from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient + from .studio.client import AsyncStudioClient, StudioClient + from .text_to_dialogue.client import AsyncTextToDialogueClient, TextToDialogueClient + from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient + from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient + from .text_to_voice.client import AsyncTextToVoiceClient, TextToVoiceClient + from .usage.client import AsyncUsageClient, UsageClient + from .user.client import AsyncUserClient, UserClient + from .voices.client import AsyncVoicesClient, VoicesClient + from .webhooks.client import AsyncWebhooksClient, WebhooksClient + from .workspace.client import AsyncWorkspaceClient, WorkspaceClient class BaseElevenLabs: @@ -51,6 +55,9 @@ class BaseElevenLabs: api_key : typing.Optional[str] + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 240 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -75,6 +82,7 @@ def __init__( base_url: typing.Optional[str] = None, environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION, api_key: typing.Optional[str] = None, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, @@ -85,6 +93,7 @@ def __init__( self._client_wrapper = SyncClientWrapper( base_url=_get_base_url(http://github.com/base_url=base_url,%20environment=environment), api_key=api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -93,29 +102,29 @@ def __init__( timeout=_defaulted_timeout, ) self._raw_client = RawBaseElevenLabs(client_wrapper=self._client_wrapper) - self.history = HistoryClient(client_wrapper=self._client_wrapper) - self.text_to_sound_effects = TextToSoundEffectsClient(client_wrapper=self._client_wrapper) - self.audio_isolation = AudioIsolationClient(client_wrapper=self._client_wrapper) - self.samples = SamplesClient(client_wrapper=self._client_wrapper) - self.text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper) - self.text_to_dialogue = TextToDialogueClient(client_wrapper=self._client_wrapper) - self.speech_to_speech = SpeechToSpeechClient(client_wrapper=self._client_wrapper) - self.text_to_voice = TextToVoiceClient(client_wrapper=self._client_wrapper) - self.user = UserClient(client_wrapper=self._client_wrapper) - self.voices = VoicesClient(client_wrapper=self._client_wrapper) - self.studio = StudioClient(client_wrapper=self._client_wrapper) - self.dubbing = DubbingClient(client_wrapper=self._client_wrapper) - self.models = ModelsClient(client_wrapper=self._client_wrapper) - self.audio_native = AudioNativeClient(client_wrapper=self._client_wrapper) - self.usage = UsageClient(client_wrapper=self._client_wrapper) - self.pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) - self.service_accounts = ServiceAccountsClient(client_wrapper=self._client_wrapper) - self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper) - self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) - self.forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper) - self.conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper) - self.music = MusicClient(client_wrapper=self._client_wrapper) - self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) + self._history: typing.Optional[HistoryClient] = None + self._text_to_sound_effects: typing.Optional[TextToSoundEffectsClient] = None + self._audio_isolation: typing.Optional[AudioIsolationClient] = None + self._samples: typing.Optional[SamplesClient] = None + self._text_to_speech: typing.Optional[TextToSpeechClient] = None + self._text_to_dialogue: typing.Optional[TextToDialogueClient] = None + self._speech_to_speech: typing.Optional[SpeechToSpeechClient] = None + self._text_to_voice: typing.Optional[TextToVoiceClient] = None + self._user: typing.Optional[UserClient] = None + self._voices: typing.Optional[VoicesClient] = None + self._studio: typing.Optional[StudioClient] = None + self._dubbing: typing.Optional[DubbingClient] = None + self._models: typing.Optional[ModelsClient] = None + self._audio_native: typing.Optional[AudioNativeClient] = None + self._usage: typing.Optional[UsageClient] = None + self._pronunciation_dictionaries: typing.Optional[PronunciationDictionariesClient] = None + self._service_accounts: typing.Optional[ServiceAccountsClient] = None + self._webhooks: typing.Optional[WebhooksClient] = None + self._speech_to_text: typing.Optional[SpeechToTextClient] = None + self._forced_alignment: typing.Optional[ForcedAlignmentClient] = None + self._conversational_ai: typing.Optional[ConversationalAiClient] = None + self._music: typing.Optional[MusicClient] = None + self._workspace: typing.Optional[WorkspaceClient] = None @property def with_raw_response(self) -> RawBaseElevenLabs: @@ -153,6 +162,190 @@ def save_a_voice_preview(self, *, request_options: typing.Optional[RequestOption _response = self._raw_client.save_a_voice_preview(request_options=request_options) return _response.data + @property + def history(self): + if self._history is None: + from .history.client import HistoryClient # noqa: E402 + + self._history = HistoryClient(client_wrapper=self._client_wrapper) + return self._history + + @property + def text_to_sound_effects(self): + if self._text_to_sound_effects is None: + from .text_to_sound_effects.client import TextToSoundEffectsClient # noqa: E402 + + self._text_to_sound_effects = TextToSoundEffectsClient(client_wrapper=self._client_wrapper) + return self._text_to_sound_effects + + @property + def audio_isolation(self): + if self._audio_isolation is None: + from .audio_isolation.client import AudioIsolationClient # noqa: E402 + + self._audio_isolation = AudioIsolationClient(client_wrapper=self._client_wrapper) + return self._audio_isolation + + @property + def samples(self): + if self._samples is None: + from .samples.client import SamplesClient # noqa: E402 + + self._samples = SamplesClient(client_wrapper=self._client_wrapper) + return self._samples + + @property + def text_to_speech(self): + if self._text_to_speech is None: + from .text_to_speech.client import TextToSpeechClient # noqa: E402 + + self._text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper) + return self._text_to_speech + + @property + def text_to_dialogue(self): + if self._text_to_dialogue is None: + from .text_to_dialogue.client import TextToDialogueClient # noqa: E402 + + self._text_to_dialogue = TextToDialogueClient(client_wrapper=self._client_wrapper) + return self._text_to_dialogue + + @property + def speech_to_speech(self): + if self._speech_to_speech is None: + from .speech_to_speech.client import SpeechToSpeechClient # noqa: E402 + + self._speech_to_speech = SpeechToSpeechClient(client_wrapper=self._client_wrapper) + return self._speech_to_speech + + @property + def text_to_voice(self): + if self._text_to_voice is None: + from .text_to_voice.client import TextToVoiceClient # noqa: E402 + + self._text_to_voice = TextToVoiceClient(client_wrapper=self._client_wrapper) + return self._text_to_voice + + @property + def user(self): + if self._user is None: + from .user.client import UserClient # noqa: E402 + + self._user = UserClient(client_wrapper=self._client_wrapper) + return self._user + + @property + def voices(self): + if self._voices is None: + from .voices.client import VoicesClient # noqa: E402 + + self._voices = VoicesClient(client_wrapper=self._client_wrapper) + return self._voices + + @property + def studio(self): + if self._studio is None: + from .studio.client import StudioClient # noqa: E402 + + self._studio = StudioClient(client_wrapper=self._client_wrapper) + return self._studio + + @property + def dubbing(self): + if self._dubbing is None: + from .dubbing.client import DubbingClient # noqa: E402 + + self._dubbing = DubbingClient(client_wrapper=self._client_wrapper) + return self._dubbing + + @property + def models(self): + if self._models is None: + from .models.client import ModelsClient # noqa: E402 + + self._models = ModelsClient(client_wrapper=self._client_wrapper) + return self._models + + @property + def audio_native(self): + if self._audio_native is None: + from .audio_native.client import AudioNativeClient # noqa: E402 + + self._audio_native = AudioNativeClient(client_wrapper=self._client_wrapper) + return self._audio_native + + @property + def usage(self): + if self._usage is None: + from .usage.client import UsageClient # noqa: E402 + + self._usage = UsageClient(client_wrapper=self._client_wrapper) + return self._usage + + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import PronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries + + @property + def service_accounts(self): + if self._service_accounts is None: + from .service_accounts.client import ServiceAccountsClient # noqa: E402 + + self._service_accounts = ServiceAccountsClient(client_wrapper=self._client_wrapper) + return self._service_accounts + + @property + def webhooks(self): + if self._webhooks is None: + from .webhooks.client import WebhooksClient # noqa: E402 + + self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper) + return self._webhooks + + @property + def speech_to_text(self): + if self._speech_to_text is None: + from .speech_to_text.client import SpeechToTextClient # noqa: E402 + + self._speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) + return self._speech_to_text + + @property + def forced_alignment(self): + if self._forced_alignment is None: + from .forced_alignment.client import ForcedAlignmentClient # noqa: E402 + + self._forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper) + return self._forced_alignment + + @property + def conversational_ai(self): + if self._conversational_ai is None: + from .conversational_ai.client import ConversationalAiClient # noqa: E402 + + self._conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper) + return self._conversational_ai + + @property + def music(self): + if self._music is None: + from .music.client import MusicClient # noqa: E402 + + self._music = MusicClient(client_wrapper=self._client_wrapper) + return self._music + + @property + def workspace(self): + if self._workspace is None: + from .workspace.client import WorkspaceClient # noqa: E402 + + self._workspace = WorkspaceClient(client_wrapper=self._client_wrapper) + return self._workspace + class AsyncBaseElevenLabs: """ @@ -173,6 +366,9 @@ class AsyncBaseElevenLabs: api_key : typing.Optional[str] + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 240 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -197,6 +393,7 @@ def __init__( base_url: typing.Optional[str] = None, environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION, api_key: typing.Optional[str] = None, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, @@ -207,6 +404,7 @@ def __init__( self._client_wrapper = AsyncClientWrapper( base_url=_get_base_url(http://github.com/base_url=base_url,%20environment=environment), api_key=api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -215,29 +413,29 @@ def __init__( timeout=_defaulted_timeout, ) self._raw_client = AsyncRawBaseElevenLabs(client_wrapper=self._client_wrapper) - self.history = AsyncHistoryClient(client_wrapper=self._client_wrapper) - self.text_to_sound_effects = AsyncTextToSoundEffectsClient(client_wrapper=self._client_wrapper) - self.audio_isolation = AsyncAudioIsolationClient(client_wrapper=self._client_wrapper) - self.samples = AsyncSamplesClient(client_wrapper=self._client_wrapper) - self.text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper) - self.text_to_dialogue = AsyncTextToDialogueClient(client_wrapper=self._client_wrapper) - self.speech_to_speech = AsyncSpeechToSpeechClient(client_wrapper=self._client_wrapper) - self.text_to_voice = AsyncTextToVoiceClient(client_wrapper=self._client_wrapper) - self.user = AsyncUserClient(client_wrapper=self._client_wrapper) - self.voices = AsyncVoicesClient(client_wrapper=self._client_wrapper) - self.studio = AsyncStudioClient(client_wrapper=self._client_wrapper) - self.dubbing = AsyncDubbingClient(client_wrapper=self._client_wrapper) - self.models = AsyncModelsClient(client_wrapper=self._client_wrapper) - self.audio_native = AsyncAudioNativeClient(client_wrapper=self._client_wrapper) - self.usage = AsyncUsageClient(client_wrapper=self._client_wrapper) - self.pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) - self.service_accounts = AsyncServiceAccountsClient(client_wrapper=self._client_wrapper) - self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) - self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) - self.forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper) - self.conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper) - self.music = AsyncMusicClient(client_wrapper=self._client_wrapper) - self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) + self._history: typing.Optional[AsyncHistoryClient] = None + self._text_to_sound_effects: typing.Optional[AsyncTextToSoundEffectsClient] = None + self._audio_isolation: typing.Optional[AsyncAudioIsolationClient] = None + self._samples: typing.Optional[AsyncSamplesClient] = None + self._text_to_speech: typing.Optional[AsyncTextToSpeechClient] = None + self._text_to_dialogue: typing.Optional[AsyncTextToDialogueClient] = None + self._speech_to_speech: typing.Optional[AsyncSpeechToSpeechClient] = None + self._text_to_voice: typing.Optional[AsyncTextToVoiceClient] = None + self._user: typing.Optional[AsyncUserClient] = None + self._voices: typing.Optional[AsyncVoicesClient] = None + self._studio: typing.Optional[AsyncStudioClient] = None + self._dubbing: typing.Optional[AsyncDubbingClient] = None + self._models: typing.Optional[AsyncModelsClient] = None + self._audio_native: typing.Optional[AsyncAudioNativeClient] = None + self._usage: typing.Optional[AsyncUsageClient] = None + self._pronunciation_dictionaries: typing.Optional[AsyncPronunciationDictionariesClient] = None + self._service_accounts: typing.Optional[AsyncServiceAccountsClient] = None + self._webhooks: typing.Optional[AsyncWebhooksClient] = None + self._speech_to_text: typing.Optional[AsyncSpeechToTextClient] = None + self._forced_alignment: typing.Optional[AsyncForcedAlignmentClient] = None + self._conversational_ai: typing.Optional[AsyncConversationalAiClient] = None + self._music: typing.Optional[AsyncMusicClient] = None + self._workspace: typing.Optional[AsyncWorkspaceClient] = None @property def with_raw_response(self) -> AsyncRawBaseElevenLabs: @@ -283,6 +481,190 @@ async def main() -> None: _response = await self._raw_client.save_a_voice_preview(request_options=request_options) return _response.data + @property + def history(self): + if self._history is None: + from .history.client import AsyncHistoryClient # noqa: E402 + + self._history = AsyncHistoryClient(client_wrapper=self._client_wrapper) + return self._history + + @property + def text_to_sound_effects(self): + if self._text_to_sound_effects is None: + from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient # noqa: E402 + + self._text_to_sound_effects = AsyncTextToSoundEffectsClient(client_wrapper=self._client_wrapper) + return self._text_to_sound_effects + + @property + def audio_isolation(self): + if self._audio_isolation is None: + from .audio_isolation.client import AsyncAudioIsolationClient # noqa: E402 + + self._audio_isolation = AsyncAudioIsolationClient(client_wrapper=self._client_wrapper) + return self._audio_isolation + + @property + def samples(self): + if self._samples is None: + from .samples.client import AsyncSamplesClient # noqa: E402 + + self._samples = AsyncSamplesClient(client_wrapper=self._client_wrapper) + return self._samples + + @property + def text_to_speech(self): + if self._text_to_speech is None: + from .text_to_speech.client import AsyncTextToSpeechClient # noqa: E402 + + self._text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper) + return self._text_to_speech + + @property + def text_to_dialogue(self): + if self._text_to_dialogue is None: + from .text_to_dialogue.client import AsyncTextToDialogueClient # noqa: E402 + + self._text_to_dialogue = AsyncTextToDialogueClient(client_wrapper=self._client_wrapper) + return self._text_to_dialogue + + @property + def speech_to_speech(self): + if self._speech_to_speech is None: + from .speech_to_speech.client import AsyncSpeechToSpeechClient # noqa: E402 + + self._speech_to_speech = AsyncSpeechToSpeechClient(client_wrapper=self._client_wrapper) + return self._speech_to_speech + + @property + def text_to_voice(self): + if self._text_to_voice is None: + from .text_to_voice.client import AsyncTextToVoiceClient # noqa: E402 + + self._text_to_voice = AsyncTextToVoiceClient(client_wrapper=self._client_wrapper) + return self._text_to_voice + + @property + def user(self): + if self._user is None: + from .user.client import AsyncUserClient # noqa: E402 + + self._user = AsyncUserClient(client_wrapper=self._client_wrapper) + return self._user + + @property + def voices(self): + if self._voices is None: + from .voices.client import AsyncVoicesClient # noqa: E402 + + self._voices = AsyncVoicesClient(client_wrapper=self._client_wrapper) + return self._voices + + @property + def studio(self): + if self._studio is None: + from .studio.client import AsyncStudioClient # noqa: E402 + + self._studio = AsyncStudioClient(client_wrapper=self._client_wrapper) + return self._studio + + @property + def dubbing(self): + if self._dubbing is None: + from .dubbing.client import AsyncDubbingClient # noqa: E402 + + self._dubbing = AsyncDubbingClient(client_wrapper=self._client_wrapper) + return self._dubbing + + @property + def models(self): + if self._models is None: + from .models.client import AsyncModelsClient # noqa: E402 + + self._models = AsyncModelsClient(client_wrapper=self._client_wrapper) + return self._models + + @property + def audio_native(self): + if self._audio_native is None: + from .audio_native.client import AsyncAudioNativeClient # noqa: E402 + + self._audio_native = AsyncAudioNativeClient(client_wrapper=self._client_wrapper) + return self._audio_native + + @property + def usage(self): + if self._usage is None: + from .usage.client import AsyncUsageClient # noqa: E402 + + self._usage = AsyncUsageClient(client_wrapper=self._client_wrapper) + return self._usage + + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries + + @property + def service_accounts(self): + if self._service_accounts is None: + from .service_accounts.client import AsyncServiceAccountsClient # noqa: E402 + + self._service_accounts = AsyncServiceAccountsClient(client_wrapper=self._client_wrapper) + return self._service_accounts + + @property + def webhooks(self): + if self._webhooks is None: + from .webhooks.client import AsyncWebhooksClient # noqa: E402 + + self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) + return self._webhooks + + @property + def speech_to_text(self): + if self._speech_to_text is None: + from .speech_to_text.client import AsyncSpeechToTextClient # noqa: E402 + + self._speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) + return self._speech_to_text + + @property + def forced_alignment(self): + if self._forced_alignment is None: + from .forced_alignment.client import AsyncForcedAlignmentClient # noqa: E402 + + self._forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper) + return self._forced_alignment + + @property + def conversational_ai(self): + if self._conversational_ai is None: + from .conversational_ai.client import AsyncConversationalAiClient # noqa: E402 + + self._conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper) + return self._conversational_ai + + @property + def music(self): + if self._music is None: + from .music.client import AsyncMusicClient # noqa: E402 + + self._music = AsyncMusicClient(client_wrapper=self._client_wrapper) + return self._music + + @property + def workspace(self): + if self._workspace is None: + from .workspace.client import AsyncWorkspaceClient # noqa: E402 + + self._workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) + return self._workspace + def _get_base_url(http://github.com/*,%20base_url:%20typing.Optional[str]%20=%20None,%20environment:%20ElevenLabsEnvironment) -> str: if base_url is not None: diff --git a/src/elevenlabs/client.py b/src/elevenlabs/client.py index a1c37c9e..9ab0472c 100644 --- a/src/elevenlabs/client.py +++ b/src/elevenlabs/client.py @@ -58,9 +58,9 @@ def __init__( timeout=timeout, httpx_client=httpx_client ) - self.text_to_speech = RealtimeTextToSpeechClient(client_wrapper=self._client_wrapper) - self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper) - self.music = MusicClient(client_wrapper=self._client_wrapper) + self._text_to_speech = RealtimeTextToSpeechClient(client_wrapper=self._client_wrapper) + self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper) + self._music = MusicClient(client_wrapper=self._client_wrapper) class AsyncElevenLabs(AsyncBaseElevenLabs): @@ -103,5 +103,5 @@ def __init__( timeout=timeout, httpx_client=httpx_client ) - self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) - self.music = AsyncMusicClient(client_wrapper=self._client_wrapper) + self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) + self._music = AsyncMusicClient(client_wrapper=self._client_wrapper) diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py index 4c24a3df..fac306be 100644 --- a/src/elevenlabs/conversational_ai/__init__.py +++ b/src/elevenlabs/conversational_ai/__init__.py @@ -2,38 +2,93 @@ # isort: skip_file -from . import ( - agents, - batch_calls, - conversations, - dashboard, - knowledge_base, - llm_usage, - mcp_servers, - phone_numbers, - secrets, - settings, - sip_trunk, - tests, - tools, - twilio, -) -from .conversations import ConversationsListRequestSummaryMode -from .phone_numbers import ( - PhoneNumbersCreateRequestBody, - PhoneNumbersCreateRequestBody_SipTrunk, - PhoneNumbersCreateRequestBody_Twilio, - PhoneNumbersGetResponse, - PhoneNumbersGetResponse_SipTrunk, - PhoneNumbersGetResponse_Twilio, - PhoneNumbersListResponseItem, - PhoneNumbersListResponseItem_SipTrunk, - PhoneNumbersListResponseItem_Twilio, - PhoneNumbersUpdateResponse, - PhoneNumbersUpdateResponse_SipTrunk, - PhoneNumbersUpdateResponse_Twilio, -) -from .tests import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import ( + agents, + batch_calls, + conversations, + dashboard, + knowledge_base, + llm_usage, + mcp_servers, + phone_numbers, + secrets, + settings, + sip_trunk, + tests, + tools, + twilio, + ) + from .conversations import ConversationsListRequestSummaryMode + from .phone_numbers import ( + PhoneNumbersCreateRequestBody, + PhoneNumbersCreateRequestBody_SipTrunk, + PhoneNumbersCreateRequestBody_Twilio, + PhoneNumbersGetResponse, + PhoneNumbersGetResponse_SipTrunk, + PhoneNumbersGetResponse_Twilio, + PhoneNumbersListResponseItem, + PhoneNumbersListResponseItem_SipTrunk, + PhoneNumbersListResponseItem_Twilio, + PhoneNumbersUpdateResponse, + PhoneNumbersUpdateResponse_SipTrunk, + PhoneNumbersUpdateResponse_Twilio, + ) + from .tests import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue +_dynamic_imports: typing.Dict[str, str] = { + "ConversationsListRequestSummaryMode": ".conversations", + "CreateUnitTestRequestDynamicVariablesValue": ".tests", + "PhoneNumbersCreateRequestBody": ".phone_numbers", + "PhoneNumbersCreateRequestBody_SipTrunk": ".phone_numbers", + "PhoneNumbersCreateRequestBody_Twilio": ".phone_numbers", + "PhoneNumbersGetResponse": ".phone_numbers", + "PhoneNumbersGetResponse_SipTrunk": ".phone_numbers", + "PhoneNumbersGetResponse_Twilio": ".phone_numbers", + "PhoneNumbersListResponseItem": ".phone_numbers", + "PhoneNumbersListResponseItem_SipTrunk": ".phone_numbers", + "PhoneNumbersListResponseItem_Twilio": ".phone_numbers", + "PhoneNumbersUpdateResponse": ".phone_numbers", + "PhoneNumbersUpdateResponse_SipTrunk": ".phone_numbers", + "PhoneNumbersUpdateResponse_Twilio": ".phone_numbers", + "UpdateUnitTestRequestDynamicVariablesValue": ".tests", + "agents": ".", + "batch_calls": ".", + "conversations": ".", + "dashboard": ".", + "knowledge_base": ".", + "llm_usage": ".", + "mcp_servers": ".", + "phone_numbers": ".", + "secrets": ".", + "settings": ".", + "sip_trunk": ".", + "tests": ".", + "tools": ".", + "twilio": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ConversationsListRequestSummaryMode", diff --git a/src/elevenlabs/conversational_ai/agents/__init__.py b/src/elevenlabs/conversational_ai/agents/__init__.py index fa76fa00..b1a2da37 100644 --- a/src/elevenlabs/conversational_ai/agents/__init__.py +++ b/src/elevenlabs/conversational_ai/agents/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import knowledge_base, link, llm_usage, widget +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import knowledge_base, link, llm_usage, widget +_dynamic_imports: typing.Dict[str, str] = {"knowledge_base": ".", "link": ".", "llm_usage": ".", "widget": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["knowledge_base", "link", "llm_usage", "widget"] diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 262d530e..3e0b121a 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -15,12 +17,13 @@ from ...types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from ...types.prompt_evaluation_criteria import PromptEvaluationCriteria from ...types.single_test_run_request_model import SingleTestRunRequestModel -from .knowledge_base.client import AsyncKnowledgeBaseClient, KnowledgeBaseClient -from .link.client import AsyncLinkClient, LinkClient -from .llm_usage.client import AsyncLlmUsageClient, LlmUsageClient from .raw_client import AsyncRawAgentsClient, RawAgentsClient -from .widget.client import AsyncWidgetClient, WidgetClient +if typing.TYPE_CHECKING: + from .knowledge_base.client import AsyncKnowledgeBaseClient, KnowledgeBaseClient + from .link.client import AsyncLinkClient, LinkClient + from .llm_usage.client import AsyncLlmUsageClient, LlmUsageClient + from .widget.client import AsyncWidgetClient, WidgetClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -28,13 +31,11 @@ class AgentsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawAgentsClient(client_wrapper=client_wrapper) - self.widget = WidgetClient(client_wrapper=client_wrapper) - - self.link = LinkClient(client_wrapper=client_wrapper) - - self.knowledge_base = KnowledgeBaseClient(client_wrapper=client_wrapper) - - self.llm_usage = LlmUsageClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._widget: typing.Optional[WidgetClient] = None + self._link: typing.Optional[LinkClient] = None + self._knowledge_base: typing.Optional[KnowledgeBaseClient] = None + self._llm_usage: typing.Optional[LlmUsageClient] = None @property def with_raw_response(self) -> RawAgentsClient: @@ -364,6 +365,7 @@ def simulate_conversation( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) @@ -427,6 +429,7 @@ def simulate_conversation_stream( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) @@ -491,17 +494,47 @@ def run_tests( ) return _response.data + @property + def widget(self): + if self._widget is None: + from .widget.client import WidgetClient # noqa: E402 -class AsyncAgentsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper) - self.widget = AsyncWidgetClient(client_wrapper=client_wrapper) + self._widget = WidgetClient(client_wrapper=self._client_wrapper) + return self._widget - self.link = AsyncLinkClient(client_wrapper=client_wrapper) + @property + def link(self): + if self._link is None: + from .link.client import LinkClient # noqa: E402 + + self._link = LinkClient(client_wrapper=self._client_wrapper) + return self._link - self.knowledge_base = AsyncKnowledgeBaseClient(client_wrapper=client_wrapper) + @property + def knowledge_base(self): + if self._knowledge_base is None: + from .knowledge_base.client import KnowledgeBaseClient # noqa: E402 - self.llm_usage = AsyncLlmUsageClient(client_wrapper=client_wrapper) + self._knowledge_base = KnowledgeBaseClient(client_wrapper=self._client_wrapper) + return self._knowledge_base + + @property + def llm_usage(self): + if self._llm_usage is None: + from .llm_usage.client import LlmUsageClient # noqa: E402 + + self._llm_usage = LlmUsageClient(client_wrapper=self._client_wrapper) + return self._llm_usage + + +class AsyncAgentsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._widget: typing.Optional[AsyncWidgetClient] = None + self._link: typing.Optional[AsyncLinkClient] = None + self._knowledge_base: typing.Optional[AsyncKnowledgeBaseClient] = None + self._llm_usage: typing.Optional[AsyncLlmUsageClient] = None @property def with_raw_response(self) -> AsyncRawAgentsClient: @@ -886,6 +919,7 @@ async def main() -> None: simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) @@ -957,6 +991,7 @@ async def main() -> None: simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", language="en", + disable_first_message_interruptions=False, ), ), ) @@ -1031,3 +1066,35 @@ async def main() -> None: agent_id, tests=tests, agent_config_override=agent_config_override, request_options=request_options ) return _response.data + + @property + def widget(self): + if self._widget is None: + from .widget.client import AsyncWidgetClient # noqa: E402 + + self._widget = AsyncWidgetClient(client_wrapper=self._client_wrapper) + return self._widget + + @property + def link(self): + if self._link is None: + from .link.client import AsyncLinkClient # noqa: E402 + + self._link = AsyncLinkClient(client_wrapper=self._client_wrapper) + return self._link + + @property + def knowledge_base(self): + if self._knowledge_base is None: + from .knowledge_base.client import AsyncKnowledgeBaseClient # noqa: E402 + + self._knowledge_base = AsyncKnowledgeBaseClient(client_wrapper=self._client_wrapper) + return self._knowledge_base + + @property + def llm_usage(self): + if self._llm_usage is None: + from .llm_usage.client import AsyncLlmUsageClient # noqa: E402 + + self._llm_usage = AsyncLlmUsageClient(client_wrapper=self._client_wrapper) + return self._llm_usage diff --git a/src/elevenlabs/conversational_ai/agents/widget/__init__.py b/src/elevenlabs/conversational_ai/agents/widget/__init__.py index 9cc7846b..02db3278 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/__init__.py +++ b/src/elevenlabs/conversational_ai/agents/widget/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import avatar +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import avatar +_dynamic_imports: typing.Dict[str, str] = {"avatar": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["avatar"] diff --git a/src/elevenlabs/conversational_ai/agents/widget/client.py b/src/elevenlabs/conversational_ai/agents/widget/client.py index 5e09adac..478f877c 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/client.py +++ b/src/elevenlabs/conversational_ai/agents/widget/client.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ....core.request_options import RequestOptions from ....types.get_agent_embed_response_model import GetAgentEmbedResponseModel -from .avatar.client import AsyncAvatarClient, AvatarClient from .raw_client import AsyncRawWidgetClient, RawWidgetClient +if typing.TYPE_CHECKING: + from .avatar.client import AsyncAvatarClient, AvatarClient + class WidgetClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawWidgetClient(client_wrapper=client_wrapper) - self.avatar = AvatarClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._avatar: typing.Optional[AvatarClient] = None @property def with_raw_response(self) -> RawWidgetClient: @@ -67,11 +72,20 @@ def get( ) return _response.data + @property + def avatar(self): + if self._avatar is None: + from .avatar.client import AvatarClient # noqa: E402 + + self._avatar = AvatarClient(client_wrapper=self._client_wrapper) + return self._avatar + class AsyncWidgetClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawWidgetClient(client_wrapper=client_wrapper) - self.avatar = AsyncAvatarClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._avatar: typing.Optional[AsyncAvatarClient] = None @property def with_raw_response(self) -> AsyncRawWidgetClient: @@ -133,3 +147,11 @@ async def main() -> None: agent_id, conversation_signature=conversation_signature, request_options=request_options ) return _response.data + + @property + def avatar(self): + if self._avatar is None: + from .avatar.client import AsyncAvatarClient # noqa: E402 + + self._avatar = AsyncAvatarClient(client_wrapper=self._client_wrapper) + return self._avatar diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py index 60aee9e9..365aae15 100644 --- a/src/elevenlabs/conversational_ai/client.py +++ b/src/elevenlabs/conversational_ai/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .. import core @@ -10,22 +12,23 @@ from ..types.rag_document_index_response_model import RagDocumentIndexResponseModel from ..types.rag_document_indexes_response_model import RagDocumentIndexesResponseModel from ..types.rag_index_overview_response_model import RagIndexOverviewResponseModel -from .agents.client import AgentsClient, AsyncAgentsClient -from .batch_calls.client import AsyncBatchCallsClient, BatchCallsClient -from .conversations.client import AsyncConversationsClient, ConversationsClient -from .dashboard.client import AsyncDashboardClient, DashboardClient -from .knowledge_base.client import AsyncKnowledgeBaseClient, KnowledgeBaseClient -from .llm_usage.client import AsyncLlmUsageClient, LlmUsageClient -from .mcp_servers.client import AsyncMcpServersClient, McpServersClient -from .phone_numbers.client import AsyncPhoneNumbersClient, PhoneNumbersClient from .raw_client import AsyncRawConversationalAiClient, RawConversationalAiClient -from .secrets.client import AsyncSecretsClient, SecretsClient -from .settings.client import AsyncSettingsClient, SettingsClient -from .sip_trunk.client import AsyncSipTrunkClient, SipTrunkClient -from .tests.client import AsyncTestsClient, TestsClient -from .tools.client import AsyncToolsClient, ToolsClient -from .twilio.client import AsyncTwilioClient, TwilioClient +if typing.TYPE_CHECKING: + from .agents.client import AgentsClient, AsyncAgentsClient + from .batch_calls.client import AsyncBatchCallsClient, BatchCallsClient + from .conversations.client import AsyncConversationsClient, ConversationsClient + from .dashboard.client import AsyncDashboardClient, DashboardClient + from .knowledge_base.client import AsyncKnowledgeBaseClient, KnowledgeBaseClient + from .llm_usage.client import AsyncLlmUsageClient, LlmUsageClient + from .mcp_servers.client import AsyncMcpServersClient, McpServersClient + from .phone_numbers.client import AsyncPhoneNumbersClient, PhoneNumbersClient + from .secrets.client import AsyncSecretsClient, SecretsClient + from .settings.client import AsyncSettingsClient, SettingsClient + from .sip_trunk.client import AsyncSipTrunkClient, SipTrunkClient + from .tests.client import AsyncTestsClient, TestsClient + from .tools.client import AsyncToolsClient, ToolsClient + from .twilio.client import AsyncTwilioClient, TwilioClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -33,33 +36,21 @@ class ConversationalAiClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawConversationalAiClient(client_wrapper=client_wrapper) - self.conversations = ConversationsClient(client_wrapper=client_wrapper) - - self.twilio = TwilioClient(client_wrapper=client_wrapper) - - self.agents = AgentsClient(client_wrapper=client_wrapper) - - self.tests = TestsClient(client_wrapper=client_wrapper) - - self.phone_numbers = PhoneNumbersClient(client_wrapper=client_wrapper) - - self.llm_usage = LlmUsageClient(client_wrapper=client_wrapper) - - self.knowledge_base = KnowledgeBaseClient(client_wrapper=client_wrapper) - - self.tools = ToolsClient(client_wrapper=client_wrapper) - - self.settings = SettingsClient(client_wrapper=client_wrapper) - - self.secrets = SecretsClient(client_wrapper=client_wrapper) - - self.batch_calls = BatchCallsClient(client_wrapper=client_wrapper) - - self.sip_trunk = SipTrunkClient(client_wrapper=client_wrapper) - - self.mcp_servers = McpServersClient(client_wrapper=client_wrapper) - - self.dashboard = DashboardClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._conversations: typing.Optional[ConversationsClient] = None + self._twilio: typing.Optional[TwilioClient] = None + self._agents: typing.Optional[AgentsClient] = None + self._tests: typing.Optional[TestsClient] = None + self._phone_numbers: typing.Optional[PhoneNumbersClient] = None + self._llm_usage: typing.Optional[LlmUsageClient] = None + self._knowledge_base: typing.Optional[KnowledgeBaseClient] = None + self._tools: typing.Optional[ToolsClient] = None + self._settings: typing.Optional[SettingsClient] = None + self._secrets: typing.Optional[SecretsClient] = None + self._batch_calls: typing.Optional[BatchCallsClient] = None + self._sip_trunk: typing.Optional[SipTrunkClient] = None + self._mcp_servers: typing.Optional[McpServersClient] = None + self._dashboard: typing.Optional[DashboardClient] = None @property def with_raw_response(self) -> RawConversationalAiClient: @@ -257,37 +248,137 @@ def update_secret( _response = self._raw_client.update_secret(secret_id, name=name, value=value, request_options=request_options) return _response.data + @property + def conversations(self): + if self._conversations is None: + from .conversations.client import ConversationsClient # noqa: E402 -class AsyncConversationalAiClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawConversationalAiClient(client_wrapper=client_wrapper) - self.conversations = AsyncConversationsClient(client_wrapper=client_wrapper) + self._conversations = ConversationsClient(client_wrapper=self._client_wrapper) + return self._conversations + + @property + def twilio(self): + if self._twilio is None: + from .twilio.client import TwilioClient # noqa: E402 + + self._twilio = TwilioClient(client_wrapper=self._client_wrapper) + return self._twilio + + @property + def agents(self): + if self._agents is None: + from .agents.client import AgentsClient # noqa: E402 - self.twilio = AsyncTwilioClient(client_wrapper=client_wrapper) + self._agents = AgentsClient(client_wrapper=self._client_wrapper) + return self._agents - self.agents = AsyncAgentsClient(client_wrapper=client_wrapper) + @property + def tests(self): + if self._tests is None: + from .tests.client import TestsClient # noqa: E402 + + self._tests = TestsClient(client_wrapper=self._client_wrapper) + return self._tests + + @property + def phone_numbers(self): + if self._phone_numbers is None: + from .phone_numbers.client import PhoneNumbersClient # noqa: E402 + + self._phone_numbers = PhoneNumbersClient(client_wrapper=self._client_wrapper) + return self._phone_numbers + + @property + def llm_usage(self): + if self._llm_usage is None: + from .llm_usage.client import LlmUsageClient # noqa: E402 - self.tests = AsyncTestsClient(client_wrapper=client_wrapper) + self._llm_usage = LlmUsageClient(client_wrapper=self._client_wrapper) + return self._llm_usage - self.phone_numbers = AsyncPhoneNumbersClient(client_wrapper=client_wrapper) + @property + def knowledge_base(self): + if self._knowledge_base is None: + from .knowledge_base.client import KnowledgeBaseClient # noqa: E402 - self.llm_usage = AsyncLlmUsageClient(client_wrapper=client_wrapper) + self._knowledge_base = KnowledgeBaseClient(client_wrapper=self._client_wrapper) + return self._knowledge_base - self.knowledge_base = AsyncKnowledgeBaseClient(client_wrapper=client_wrapper) + @property + def tools(self): + if self._tools is None: + from .tools.client import ToolsClient # noqa: E402 - self.tools = AsyncToolsClient(client_wrapper=client_wrapper) + self._tools = ToolsClient(client_wrapper=self._client_wrapper) + return self._tools - self.settings = AsyncSettingsClient(client_wrapper=client_wrapper) + @property + def settings(self): + if self._settings is None: + from .settings.client import SettingsClient # noqa: E402 - self.secrets = AsyncSecretsClient(client_wrapper=client_wrapper) + self._settings = SettingsClient(client_wrapper=self._client_wrapper) + return self._settings - self.batch_calls = AsyncBatchCallsClient(client_wrapper=client_wrapper) + @property + def secrets(self): + if self._secrets is None: + from .secrets.client import SecretsClient # noqa: E402 - self.sip_trunk = AsyncSipTrunkClient(client_wrapper=client_wrapper) + self._secrets = SecretsClient(client_wrapper=self._client_wrapper) + return self._secrets - self.mcp_servers = AsyncMcpServersClient(client_wrapper=client_wrapper) + @property + def batch_calls(self): + if self._batch_calls is None: + from .batch_calls.client import BatchCallsClient # noqa: E402 - self.dashboard = AsyncDashboardClient(client_wrapper=client_wrapper) + self._batch_calls = BatchCallsClient(client_wrapper=self._client_wrapper) + return self._batch_calls + + @property + def sip_trunk(self): + if self._sip_trunk is None: + from .sip_trunk.client import SipTrunkClient # noqa: E402 + + self._sip_trunk = SipTrunkClient(client_wrapper=self._client_wrapper) + return self._sip_trunk + + @property + def mcp_servers(self): + if self._mcp_servers is None: + from .mcp_servers.client import McpServersClient # noqa: E402 + + self._mcp_servers = McpServersClient(client_wrapper=self._client_wrapper) + return self._mcp_servers + + @property + def dashboard(self): + if self._dashboard is None: + from .dashboard.client import DashboardClient # noqa: E402 + + self._dashboard = DashboardClient(client_wrapper=self._client_wrapper) + return self._dashboard + + +class AsyncConversationalAiClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawConversationalAiClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._conversations: typing.Optional[AsyncConversationsClient] = None + self._twilio: typing.Optional[AsyncTwilioClient] = None + self._agents: typing.Optional[AsyncAgentsClient] = None + self._tests: typing.Optional[AsyncTestsClient] = None + self._phone_numbers: typing.Optional[AsyncPhoneNumbersClient] = None + self._llm_usage: typing.Optional[AsyncLlmUsageClient] = None + self._knowledge_base: typing.Optional[AsyncKnowledgeBaseClient] = None + self._tools: typing.Optional[AsyncToolsClient] = None + self._settings: typing.Optional[AsyncSettingsClient] = None + self._secrets: typing.Optional[AsyncSecretsClient] = None + self._batch_calls: typing.Optional[AsyncBatchCallsClient] = None + self._sip_trunk: typing.Optional[AsyncSipTrunkClient] = None + self._mcp_servers: typing.Optional[AsyncMcpServersClient] = None + self._dashboard: typing.Optional[AsyncDashboardClient] = None @property def with_raw_response(self) -> AsyncRawConversationalAiClient: @@ -526,3 +617,115 @@ async def main() -> None: secret_id, name=name, value=value, request_options=request_options ) return _response.data + + @property + def conversations(self): + if self._conversations is None: + from .conversations.client import AsyncConversationsClient # noqa: E402 + + self._conversations = AsyncConversationsClient(client_wrapper=self._client_wrapper) + return self._conversations + + @property + def twilio(self): + if self._twilio is None: + from .twilio.client import AsyncTwilioClient # noqa: E402 + + self._twilio = AsyncTwilioClient(client_wrapper=self._client_wrapper) + return self._twilio + + @property + def agents(self): + if self._agents is None: + from .agents.client import AsyncAgentsClient # noqa: E402 + + self._agents = AsyncAgentsClient(client_wrapper=self._client_wrapper) + return self._agents + + @property + def tests(self): + if self._tests is None: + from .tests.client import AsyncTestsClient # noqa: E402 + + self._tests = AsyncTestsClient(client_wrapper=self._client_wrapper) + return self._tests + + @property + def phone_numbers(self): + if self._phone_numbers is None: + from .phone_numbers.client import AsyncPhoneNumbersClient # noqa: E402 + + self._phone_numbers = AsyncPhoneNumbersClient(client_wrapper=self._client_wrapper) + return self._phone_numbers + + @property + def llm_usage(self): + if self._llm_usage is None: + from .llm_usage.client import AsyncLlmUsageClient # noqa: E402 + + self._llm_usage = AsyncLlmUsageClient(client_wrapper=self._client_wrapper) + return self._llm_usage + + @property + def knowledge_base(self): + if self._knowledge_base is None: + from .knowledge_base.client import AsyncKnowledgeBaseClient # noqa: E402 + + self._knowledge_base = AsyncKnowledgeBaseClient(client_wrapper=self._client_wrapper) + return self._knowledge_base + + @property + def tools(self): + if self._tools is None: + from .tools.client import AsyncToolsClient # noqa: E402 + + self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) + return self._tools + + @property + def settings(self): + if self._settings is None: + from .settings.client import AsyncSettingsClient # noqa: E402 + + self._settings = AsyncSettingsClient(client_wrapper=self._client_wrapper) + return self._settings + + @property + def secrets(self): + if self._secrets is None: + from .secrets.client import AsyncSecretsClient # noqa: E402 + + self._secrets = AsyncSecretsClient(client_wrapper=self._client_wrapper) + return self._secrets + + @property + def batch_calls(self): + if self._batch_calls is None: + from .batch_calls.client import AsyncBatchCallsClient # noqa: E402 + + self._batch_calls = AsyncBatchCallsClient(client_wrapper=self._client_wrapper) + return self._batch_calls + + @property + def sip_trunk(self): + if self._sip_trunk is None: + from .sip_trunk.client import AsyncSipTrunkClient # noqa: E402 + + self._sip_trunk = AsyncSipTrunkClient(client_wrapper=self._client_wrapper) + return self._sip_trunk + + @property + def mcp_servers(self): + if self._mcp_servers is None: + from .mcp_servers.client import AsyncMcpServersClient # noqa: E402 + + self._mcp_servers = AsyncMcpServersClient(client_wrapper=self._client_wrapper) + return self._mcp_servers + + @property + def dashboard(self): + if self._dashboard is None: + from .dashboard.client import AsyncDashboardClient # noqa: E402 + + self._dashboard = AsyncDashboardClient(client_wrapper=self._client_wrapper) + return self._dashboard diff --git a/src/elevenlabs/conversational_ai/conversations/__init__.py b/src/elevenlabs/conversational_ai/conversations/__init__.py index b74bd4ce..c881102e 100644 --- a/src/elevenlabs/conversational_ai/conversations/__init__.py +++ b/src/elevenlabs/conversational_ai/conversations/__init__.py @@ -2,7 +2,36 @@ # isort: skip_file -from .types import ConversationsListRequestSummaryMode -from . import audio, feedback +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ConversationsListRequestSummaryMode + from . import audio, feedback +_dynamic_imports: typing.Dict[str, str] = { + "ConversationsListRequestSummaryMode": ".types", + "audio": ".", + "feedback": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ConversationsListRequestSummaryMode", "audio", "feedback"] diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index 894436ac..fa353585 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -9,18 +11,20 @@ from ...types.get_conversation_response_model import GetConversationResponseModel from ...types.get_conversations_page_response_model import GetConversationsPageResponseModel from ...types.token_response_model import TokenResponseModel -from .audio.client import AsyncAudioClient, AudioClient -from .feedback.client import AsyncFeedbackClient, FeedbackClient from .raw_client import AsyncRawConversationsClient, RawConversationsClient from .types.conversations_list_request_summary_mode import ConversationsListRequestSummaryMode +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + from .feedback.client import AsyncFeedbackClient, FeedbackClient + class ConversationsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawConversationsClient(client_wrapper=client_wrapper) - self.audio = AudioClient(client_wrapper=client_wrapper) - - self.feedback = FeedbackClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AudioClient] = None + self._feedback: typing.Optional[FeedbackClient] = None @property def with_raw_response(self) -> RawConversationsClient: @@ -255,13 +259,29 @@ def delete( _response = self._raw_client.delete(conversation_id, request_options=request_options) return _response.data + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def feedback(self): + if self._feedback is None: + from .feedback.client import FeedbackClient # noqa: E402 + + self._feedback = FeedbackClient(client_wrapper=self._client_wrapper) + return self._feedback + class AsyncConversationsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawConversationsClient(client_wrapper=client_wrapper) - self.audio = AsyncAudioClient(client_wrapper=client_wrapper) - - self.feedback = AsyncFeedbackClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AsyncAudioClient] = None + self._feedback: typing.Optional[AsyncFeedbackClient] = None @property def with_raw_response(self) -> AsyncRawConversationsClient: @@ -535,3 +555,19 @@ async def main() -> None: """ _response = await self._raw_client.delete(conversation_id, request_options=request_options) return _response.data + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def feedback(self): + if self._feedback is None: + from .feedback.client import AsyncFeedbackClient # noqa: E402 + + self._feedback = AsyncFeedbackClient(client_wrapper=self._client_wrapper) + return self._feedback diff --git a/src/elevenlabs/conversational_ai/conversations/types/__init__.py b/src/elevenlabs/conversational_ai/conversations/types/__init__.py index ff647546..c11f2cc9 100644 --- a/src/elevenlabs/conversational_ai/conversations/types/__init__.py +++ b/src/elevenlabs/conversational_ai/conversations/types/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .conversations_list_request_summary_mode import ConversationsListRequestSummaryMode +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .conversations_list_request_summary_mode import ConversationsListRequestSummaryMode +_dynamic_imports: typing.Dict[str, str] = { + "ConversationsListRequestSummaryMode": ".conversations_list_request_summary_mode" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ConversationsListRequestSummaryMode"] diff --git a/src/elevenlabs/conversational_ai/dashboard/__init__.py b/src/elevenlabs/conversational_ai/dashboard/__init__.py index 537589e2..0fdd1366 100644 --- a/src/elevenlabs/conversational_ai/dashboard/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/__init__.py @@ -2,13 +2,44 @@ # isort: skip_file -from . import settings -from .settings import ( - PatchConvAiDashboardSettingsRequestChartsItem, - PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, - PatchConvAiDashboardSettingsRequestChartsItem_Criteria, - PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import settings + from .settings import ( + PatchConvAiDashboardSettingsRequestChartsItem, + PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, + PatchConvAiDashboardSettingsRequestChartsItem_Criteria, + PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PatchConvAiDashboardSettingsRequestChartsItem": ".settings", + "PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess": ".settings", + "PatchConvAiDashboardSettingsRequestChartsItem_Criteria": ".settings", + "PatchConvAiDashboardSettingsRequestChartsItem_DataCollection": ".settings", + "settings": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "PatchConvAiDashboardSettingsRequestChartsItem", diff --git a/src/elevenlabs/conversational_ai/dashboard/client.py b/src/elevenlabs/conversational_ai/dashboard/client.py index ea2c3d6c..55ea128e 100644 --- a/src/elevenlabs/conversational_ai/dashboard/client.py +++ b/src/elevenlabs/conversational_ai/dashboard/client.py @@ -1,14 +1,21 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import typing + from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .raw_client import AsyncRawDashboardClient, RawDashboardClient -from .settings.client import AsyncSettingsClient, SettingsClient + +if typing.TYPE_CHECKING: + from .settings.client import AsyncSettingsClient, SettingsClient class DashboardClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawDashboardClient(client_wrapper=client_wrapper) - self.settings = SettingsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._settings: typing.Optional[SettingsClient] = None @property def with_raw_response(self) -> RawDashboardClient: @@ -21,11 +28,20 @@ def with_raw_response(self) -> RawDashboardClient: """ return self._raw_client + @property + def settings(self): + if self._settings is None: + from .settings.client import SettingsClient # noqa: E402 + + self._settings = SettingsClient(client_wrapper=self._client_wrapper) + return self._settings + class AsyncDashboardClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawDashboardClient(client_wrapper=client_wrapper) - self.settings = AsyncSettingsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._settings: typing.Optional[AsyncSettingsClient] = None @property def with_raw_response(self) -> AsyncRawDashboardClient: @@ -37,3 +53,11 @@ def with_raw_response(self) -> AsyncRawDashboardClient: AsyncRawDashboardClient """ return self._raw_client + + @property + def settings(self): + if self._settings is None: + from .settings.client import AsyncSettingsClient # noqa: E402 + + self._settings = AsyncSettingsClient(client_wrapper=self._client_wrapper) + return self._settings diff --git a/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py b/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py index 56676bd9..6212a875 100644 --- a/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .types import ( - PatchConvAiDashboardSettingsRequestChartsItem, - PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, - PatchConvAiDashboardSettingsRequestChartsItem_Criteria, - PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + PatchConvAiDashboardSettingsRequestChartsItem, + PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, + PatchConvAiDashboardSettingsRequestChartsItem_Criteria, + PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PatchConvAiDashboardSettingsRequestChartsItem": ".types", + "PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess": ".types", + "PatchConvAiDashboardSettingsRequestChartsItem_Criteria": ".types", + "PatchConvAiDashboardSettingsRequestChartsItem_DataCollection": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "PatchConvAiDashboardSettingsRequestChartsItem", diff --git a/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py b/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py index 999149de..397cc9fb 100644 --- a/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .patch_conv_ai_dashboard_settings_request_charts_item import ( - PatchConvAiDashboardSettingsRequestChartsItem, - PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, - PatchConvAiDashboardSettingsRequestChartsItem_Criteria, - PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .patch_conv_ai_dashboard_settings_request_charts_item import ( + PatchConvAiDashboardSettingsRequestChartsItem, + PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess, + PatchConvAiDashboardSettingsRequestChartsItem_Criteria, + PatchConvAiDashboardSettingsRequestChartsItem_DataCollection, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PatchConvAiDashboardSettingsRequestChartsItem": ".patch_conv_ai_dashboard_settings_request_charts_item", + "PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess": ".patch_conv_ai_dashboard_settings_request_charts_item", + "PatchConvAiDashboardSettingsRequestChartsItem_Criteria": ".patch_conv_ai_dashboard_settings_request_charts_item", + "PatchConvAiDashboardSettingsRequestChartsItem_DataCollection": ".patch_conv_ai_dashboard_settings_request_charts_item", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "PatchConvAiDashboardSettingsRequestChartsItem", diff --git a/src/elevenlabs/conversational_ai/knowledge_base/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/__init__.py index f800ab36..369c9df2 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/__init__.py @@ -2,17 +2,53 @@ # isort: skip_file -from . import document, documents -from .documents import ( - DocumentsGetResponse, - DocumentsGetResponse_File, - DocumentsGetResponse_Text, - DocumentsGetResponse_Url, - DocumentsUpdateResponse, - DocumentsUpdateResponse_File, - DocumentsUpdateResponse_Text, - DocumentsUpdateResponse_Url, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import document, documents + from .documents import ( + DocumentsGetResponse, + DocumentsGetResponse_File, + DocumentsGetResponse_Text, + DocumentsGetResponse_Url, + DocumentsUpdateResponse, + DocumentsUpdateResponse_File, + DocumentsUpdateResponse_Text, + DocumentsUpdateResponse_Url, + ) +_dynamic_imports: typing.Dict[str, str] = { + "DocumentsGetResponse": ".documents", + "DocumentsGetResponse_File": ".documents", + "DocumentsGetResponse_Text": ".documents", + "DocumentsGetResponse_Url": ".documents", + "DocumentsUpdateResponse": ".documents", + "DocumentsUpdateResponse_File": ".documents", + "DocumentsUpdateResponse_Text": ".documents", + "DocumentsUpdateResponse_Url": ".documents", + "document": ".", + "documents": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "DocumentsGetResponse", diff --git a/src/elevenlabs/conversational_ai/knowledge_base/client.py b/src/elevenlabs/conversational_ai/knowledge_base/client.py index b64f9c04..847e3d2e 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/client.py @@ -1,22 +1,26 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.get_knowledge_base_list_response_model import GetKnowledgeBaseListResponseModel from ...types.knowledge_base_document_type import KnowledgeBaseDocumentType -from .document.client import AsyncDocumentClient, DocumentClient -from .documents.client import AsyncDocumentsClient, DocumentsClient from .raw_client import AsyncRawKnowledgeBaseClient, RawKnowledgeBaseClient +if typing.TYPE_CHECKING: + from .document.client import AsyncDocumentClient, DocumentClient + from .documents.client import AsyncDocumentsClient, DocumentsClient + class KnowledgeBaseClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawKnowledgeBaseClient(client_wrapper=client_wrapper) - self.documents = DocumentsClient(client_wrapper=client_wrapper) - - self.document = DocumentClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._documents: typing.Optional[DocumentsClient] = None + self._document: typing.Optional[DocumentClient] = None @property def with_raw_response(self) -> RawKnowledgeBaseClient: @@ -93,13 +97,29 @@ def list( ) return _response.data + @property + def documents(self): + if self._documents is None: + from .documents.client import DocumentsClient # noqa: E402 + + self._documents = DocumentsClient(client_wrapper=self._client_wrapper) + return self._documents + + @property + def document(self): + if self._document is None: + from .document.client import DocumentClient # noqa: E402 + + self._document = DocumentClient(client_wrapper=self._client_wrapper) + return self._document + class AsyncKnowledgeBaseClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawKnowledgeBaseClient(client_wrapper=client_wrapper) - self.documents = AsyncDocumentsClient(client_wrapper=client_wrapper) - - self.document = AsyncDocumentClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._documents: typing.Optional[AsyncDocumentsClient] = None + self._document: typing.Optional[AsyncDocumentClient] = None @property def with_raw_response(self) -> AsyncRawKnowledgeBaseClient: @@ -183,3 +203,19 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def documents(self): + if self._documents is None: + from .documents.client import AsyncDocumentsClient # noqa: E402 + + self._documents = AsyncDocumentsClient(client_wrapper=self._client_wrapper) + return self._documents + + @property + def document(self): + if self._document is None: + from .document.client import AsyncDocumentClient # noqa: E402 + + self._document = AsyncDocumentClient(client_wrapper=self._client_wrapper) + return self._document diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py index 2bd0a775..4a871403 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py @@ -2,17 +2,52 @@ # isort: skip_file -from .types import ( - DocumentsGetResponse, - DocumentsGetResponse_File, - DocumentsGetResponse_Text, - DocumentsGetResponse_Url, - DocumentsUpdateResponse, - DocumentsUpdateResponse_File, - DocumentsUpdateResponse_Text, - DocumentsUpdateResponse_Url, -) -from . import chunk +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + DocumentsGetResponse, + DocumentsGetResponse_File, + DocumentsGetResponse_Text, + DocumentsGetResponse_Url, + DocumentsUpdateResponse, + DocumentsUpdateResponse_File, + DocumentsUpdateResponse_Text, + DocumentsUpdateResponse_Url, + ) + from . import chunk +_dynamic_imports: typing.Dict[str, str] = { + "DocumentsGetResponse": ".types", + "DocumentsGetResponse_File": ".types", + "DocumentsGetResponse_Text": ".types", + "DocumentsGetResponse_Url": ".types", + "DocumentsUpdateResponse": ".types", + "DocumentsUpdateResponse_File": ".types", + "DocumentsUpdateResponse_Text": ".types", + "DocumentsUpdateResponse_Url": ".types", + "chunk": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "DocumentsGetResponse", diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py index 8c03d4bd..5483f9ac 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .... import core @@ -7,11 +9,12 @@ from ....core.request_options import RequestOptions from ....types.add_knowledge_base_response_model import AddKnowledgeBaseResponseModel from ....types.get_knowledge_base_dependent_agents_response_model import GetKnowledgeBaseDependentAgentsResponseModel -from .chunk.client import AsyncChunkClient, ChunkClient from .raw_client import AsyncRawDocumentsClient, RawDocumentsClient from .types.documents_get_response import DocumentsGetResponse from .types.documents_update_response import DocumentsUpdateResponse +if typing.TYPE_CHECKING: + from .chunk.client import AsyncChunkClient, ChunkClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -19,7 +22,8 @@ class DocumentsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawDocumentsClient(client_wrapper=client_wrapper) - self.chunk = ChunkClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._chunk: typing.Optional[ChunkClient] = None @property def with_raw_response(self) -> RawDocumentsClient: @@ -334,11 +338,20 @@ def get_content(self, documentation_id: str, *, request_options: typing.Optional _response = self._raw_client.get_content(documentation_id, request_options=request_options) return _response.data + @property + def chunk(self): + if self._chunk is None: + from .chunk.client import ChunkClient # noqa: E402 + + self._chunk = ChunkClient(client_wrapper=self._client_wrapper) + return self._chunk + class AsyncDocumentsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawDocumentsClient(client_wrapper=client_wrapper) - self.chunk = AsyncChunkClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._chunk: typing.Optional[AsyncChunkClient] = None @property def with_raw_response(self) -> AsyncRawDocumentsClient: @@ -718,3 +731,11 @@ async def main() -> None: """ _response = await self._raw_client.get_content(documentation_id, request_options=request_options) return _response.data + + @property + def chunk(self): + if self._chunk is None: + from .chunk.client import AsyncChunkClient # noqa: E402 + + self._chunk = AsyncChunkClient(client_wrapper=self._client_wrapper) + return self._chunk diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py index 0211b65c..d018ba4d 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py @@ -2,18 +2,52 @@ # isort: skip_file -from .documents_get_response import ( - DocumentsGetResponse, - DocumentsGetResponse_File, - DocumentsGetResponse_Text, - DocumentsGetResponse_Url, -) -from .documents_update_response import ( - DocumentsUpdateResponse, - DocumentsUpdateResponse_File, - DocumentsUpdateResponse_Text, - DocumentsUpdateResponse_Url, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .documents_get_response import ( + DocumentsGetResponse, + DocumentsGetResponse_File, + DocumentsGetResponse_Text, + DocumentsGetResponse_Url, + ) + from .documents_update_response import ( + DocumentsUpdateResponse, + DocumentsUpdateResponse_File, + DocumentsUpdateResponse_Text, + DocumentsUpdateResponse_Url, + ) +_dynamic_imports: typing.Dict[str, str] = { + "DocumentsGetResponse": ".documents_get_response", + "DocumentsGetResponse_File": ".documents_get_response", + "DocumentsGetResponse_Text": ".documents_get_response", + "DocumentsGetResponse_Url": ".documents_get_response", + "DocumentsUpdateResponse": ".documents_update_response", + "DocumentsUpdateResponse_File": ".documents_update_response", + "DocumentsUpdateResponse_Text": ".documents_update_response", + "DocumentsUpdateResponse_Url": ".documents_update_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "DocumentsGetResponse", diff --git a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py index 5f741e85..86253bde 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import approval_policy, tool_approvals, tools +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import approval_policy, tool_approvals, tools +_dynamic_imports: typing.Dict[str, str] = {"approval_policy": ".", "tool_approvals": ".", "tools": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["approval_policy", "tool_approvals", "tools"] diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py index 64be8f36..095b1be3 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -7,11 +9,12 @@ from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel -from .approval_policy.client import ApprovalPolicyClient, AsyncApprovalPolicyClient from .raw_client import AsyncRawMcpServersClient, RawMcpServersClient -from .tool_approvals.client import AsyncToolApprovalsClient, ToolApprovalsClient -from .tools.client import AsyncToolsClient, ToolsClient +if typing.TYPE_CHECKING: + from .approval_policy.client import ApprovalPolicyClient, AsyncApprovalPolicyClient + from .tool_approvals.client import AsyncToolApprovalsClient, ToolApprovalsClient + from .tools.client import AsyncToolsClient, ToolsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -19,11 +22,10 @@ class McpServersClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawMcpServersClient(client_wrapper=client_wrapper) - self.tools = ToolsClient(client_wrapper=client_wrapper) - - self.approval_policy = ApprovalPolicyClient(client_wrapper=client_wrapper) - - self.tool_approvals = ToolApprovalsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._tools: typing.Optional[ToolsClient] = None + self._approval_policy: typing.Optional[ApprovalPolicyClient] = None + self._tool_approvals: typing.Optional[ToolApprovalsClient] = None @property def with_raw_response(self) -> RawMcpServersClient: @@ -131,15 +133,38 @@ def get( _response = self._raw_client.get(mcp_server_id, request_options=request_options) return _response.data + @property + def tools(self): + if self._tools is None: + from .tools.client import ToolsClient # noqa: E402 + + self._tools = ToolsClient(client_wrapper=self._client_wrapper) + return self._tools + + @property + def approval_policy(self): + if self._approval_policy is None: + from .approval_policy.client import ApprovalPolicyClient # noqa: E402 + + self._approval_policy = ApprovalPolicyClient(client_wrapper=self._client_wrapper) + return self._approval_policy + + @property + def tool_approvals(self): + if self._tool_approvals is None: + from .tool_approvals.client import ToolApprovalsClient # noqa: E402 + + self._tool_approvals = ToolApprovalsClient(client_wrapper=self._client_wrapper) + return self._tool_approvals + class AsyncMcpServersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawMcpServersClient(client_wrapper=client_wrapper) - self.tools = AsyncToolsClient(client_wrapper=client_wrapper) - - self.approval_policy = AsyncApprovalPolicyClient(client_wrapper=client_wrapper) - - self.tool_approvals = AsyncToolApprovalsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._tools: typing.Optional[AsyncToolsClient] = None + self._approval_policy: typing.Optional[AsyncApprovalPolicyClient] = None + self._tool_approvals: typing.Optional[AsyncToolApprovalsClient] = None @property def with_raw_response(self) -> AsyncRawMcpServersClient: @@ -270,3 +295,27 @@ async def main() -> None: """ _response = await self._raw_client.get(mcp_server_id, request_options=request_options) return _response.data + + @property + def tools(self): + if self._tools is None: + from .tools.client import AsyncToolsClient # noqa: E402 + + self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) + return self._tools + + @property + def approval_policy(self): + if self._approval_policy is None: + from .approval_policy.client import AsyncApprovalPolicyClient # noqa: E402 + + self._approval_policy = AsyncApprovalPolicyClient(client_wrapper=self._client_wrapper) + return self._approval_policy + + @property + def tool_approvals(self): + if self._tool_approvals is None: + from .tool_approvals.client import AsyncToolApprovalsClient # noqa: E402 + + self._tool_approvals = AsyncToolApprovalsClient(client_wrapper=self._client_wrapper) + return self._tool_approvals diff --git a/src/elevenlabs/conversational_ai/phone_numbers/__init__.py b/src/elevenlabs/conversational_ai/phone_numbers/__init__.py index 04b7908f..84c73f96 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/__init__.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/__init__.py @@ -2,20 +2,58 @@ # isort: skip_file -from .types import ( - PhoneNumbersCreateRequestBody, - PhoneNumbersCreateRequestBody_SipTrunk, - PhoneNumbersCreateRequestBody_Twilio, - PhoneNumbersGetResponse, - PhoneNumbersGetResponse_SipTrunk, - PhoneNumbersGetResponse_Twilio, - PhoneNumbersListResponseItem, - PhoneNumbersListResponseItem_SipTrunk, - PhoneNumbersListResponseItem_Twilio, - PhoneNumbersUpdateResponse, - PhoneNumbersUpdateResponse_SipTrunk, - PhoneNumbersUpdateResponse_Twilio, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + PhoneNumbersCreateRequestBody, + PhoneNumbersCreateRequestBody_SipTrunk, + PhoneNumbersCreateRequestBody_Twilio, + PhoneNumbersGetResponse, + PhoneNumbersGetResponse_SipTrunk, + PhoneNumbersGetResponse_Twilio, + PhoneNumbersListResponseItem, + PhoneNumbersListResponseItem_SipTrunk, + PhoneNumbersListResponseItem_Twilio, + PhoneNumbersUpdateResponse, + PhoneNumbersUpdateResponse_SipTrunk, + PhoneNumbersUpdateResponse_Twilio, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PhoneNumbersCreateRequestBody": ".types", + "PhoneNumbersCreateRequestBody_SipTrunk": ".types", + "PhoneNumbersCreateRequestBody_Twilio": ".types", + "PhoneNumbersGetResponse": ".types", + "PhoneNumbersGetResponse_SipTrunk": ".types", + "PhoneNumbersGetResponse_Twilio": ".types", + "PhoneNumbersListResponseItem": ".types", + "PhoneNumbersListResponseItem_SipTrunk": ".types", + "PhoneNumbersListResponseItem_Twilio": ".types", + "PhoneNumbersUpdateResponse": ".types", + "PhoneNumbersUpdateResponse_SipTrunk": ".types", + "PhoneNumbersUpdateResponse_Twilio": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "PhoneNumbersCreateRequestBody", diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py b/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py index 88a11dcb..c89d051d 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py @@ -2,26 +2,64 @@ # isort: skip_file -from .phone_numbers_create_request_body import ( - PhoneNumbersCreateRequestBody, - PhoneNumbersCreateRequestBody_SipTrunk, - PhoneNumbersCreateRequestBody_Twilio, -) -from .phone_numbers_get_response import ( - PhoneNumbersGetResponse, - PhoneNumbersGetResponse_SipTrunk, - PhoneNumbersGetResponse_Twilio, -) -from .phone_numbers_list_response_item import ( - PhoneNumbersListResponseItem, - PhoneNumbersListResponseItem_SipTrunk, - PhoneNumbersListResponseItem_Twilio, -) -from .phone_numbers_update_response import ( - PhoneNumbersUpdateResponse, - PhoneNumbersUpdateResponse_SipTrunk, - PhoneNumbersUpdateResponse_Twilio, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .phone_numbers_create_request_body import ( + PhoneNumbersCreateRequestBody, + PhoneNumbersCreateRequestBody_SipTrunk, + PhoneNumbersCreateRequestBody_Twilio, + ) + from .phone_numbers_get_response import ( + PhoneNumbersGetResponse, + PhoneNumbersGetResponse_SipTrunk, + PhoneNumbersGetResponse_Twilio, + ) + from .phone_numbers_list_response_item import ( + PhoneNumbersListResponseItem, + PhoneNumbersListResponseItem_SipTrunk, + PhoneNumbersListResponseItem_Twilio, + ) + from .phone_numbers_update_response import ( + PhoneNumbersUpdateResponse, + PhoneNumbersUpdateResponse_SipTrunk, + PhoneNumbersUpdateResponse_Twilio, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PhoneNumbersCreateRequestBody": ".phone_numbers_create_request_body", + "PhoneNumbersCreateRequestBody_SipTrunk": ".phone_numbers_create_request_body", + "PhoneNumbersCreateRequestBody_Twilio": ".phone_numbers_create_request_body", + "PhoneNumbersGetResponse": ".phone_numbers_get_response", + "PhoneNumbersGetResponse_SipTrunk": ".phone_numbers_get_response", + "PhoneNumbersGetResponse_Twilio": ".phone_numbers_get_response", + "PhoneNumbersListResponseItem": ".phone_numbers_list_response_item", + "PhoneNumbersListResponseItem_SipTrunk": ".phone_numbers_list_response_item", + "PhoneNumbersListResponseItem_Twilio": ".phone_numbers_list_response_item", + "PhoneNumbersUpdateResponse": ".phone_numbers_update_response", + "PhoneNumbersUpdateResponse_SipTrunk": ".phone_numbers_update_response", + "PhoneNumbersUpdateResponse_Twilio": ".phone_numbers_update_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "PhoneNumbersCreateRequestBody", diff --git a/src/elevenlabs/conversational_ai/tests/__init__.py b/src/elevenlabs/conversational_ai/tests/__init__.py index 95047906..e1f1df81 100644 --- a/src/elevenlabs/conversational_ai/tests/__init__.py +++ b/src/elevenlabs/conversational_ai/tests/__init__.py @@ -2,7 +2,36 @@ # isort: skip_file -from .types import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue -from . import invocations +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import CreateUnitTestRequestDynamicVariablesValue, UpdateUnitTestRequestDynamicVariablesValue + from . import invocations +_dynamic_imports: typing.Dict[str, str] = { + "CreateUnitTestRequestDynamicVariablesValue": ".types", + "UpdateUnitTestRequestDynamicVariablesValue": ".types", + "invocations": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreateUnitTestRequestDynamicVariablesValue", "UpdateUnitTestRequestDynamicVariablesValue", "invocations"] diff --git a/src/elevenlabs/conversational_ai/tests/client.py b/src/elevenlabs/conversational_ai/tests/client.py index 83bd1ab2..265df7a1 100644 --- a/src/elevenlabs/conversational_ai/tests/client.py +++ b/src/elevenlabs/conversational_ai/tests/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -12,11 +14,12 @@ from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from ...types.get_unit_test_response_model import GetUnitTestResponseModel from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput -from .invocations.client import AsyncInvocationsClient, InvocationsClient from .raw_client import AsyncRawTestsClient, RawTestsClient from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue +if typing.TYPE_CHECKING: + from .invocations.client import AsyncInvocationsClient, InvocationsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -24,7 +27,8 @@ class TestsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawTestsClient(client_wrapper=client_wrapper) - self.invocations = InvocationsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._invocations: typing.Optional[InvocationsClient] = None @property def with_raw_response(self) -> RawTestsClient: @@ -366,11 +370,20 @@ def list( ) return _response.data + @property + def invocations(self): + if self._invocations is None: + from .invocations.client import InvocationsClient # noqa: E402 + + self._invocations = InvocationsClient(client_wrapper=self._client_wrapper) + return self._invocations + class AsyncTestsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawTestsClient(client_wrapper=client_wrapper) - self.invocations = AsyncInvocationsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._invocations: typing.Optional[AsyncInvocationsClient] = None @property def with_raw_response(self) -> AsyncRawTestsClient: @@ -761,3 +774,11 @@ async def main() -> None: cursor=cursor, page_size=page_size, search=search, request_options=request_options ) return _response.data + + @property + def invocations(self): + if self._invocations is None: + from .invocations.client import AsyncInvocationsClient # noqa: E402 + + self._invocations = AsyncInvocationsClient(client_wrapper=self._client_wrapper) + return self._invocations diff --git a/src/elevenlabs/conversational_ai/tests/types/__init__.py b/src/elevenlabs/conversational_ai/tests/types/__init__.py index 69b19600..d066d8c6 100644 --- a/src/elevenlabs/conversational_ai/tests/types/__init__.py +++ b/src/elevenlabs/conversational_ai/tests/types/__init__.py @@ -2,7 +2,35 @@ # isort: skip_file -from .create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue -from .update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue + from .update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue +_dynamic_imports: typing.Dict[str, str] = { + "CreateUnitTestRequestDynamicVariablesValue": ".create_unit_test_request_dynamic_variables_value", + "UpdateUnitTestRequestDynamicVariablesValue": ".update_unit_test_request_dynamic_variables_value", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreateUnitTestRequestDynamicVariablesValue", "UpdateUnitTestRequestDynamicVariablesValue"] diff --git a/src/elevenlabs/core/__init__.py b/src/elevenlabs/core/__init__.py index 869898d7..18228526 100644 --- a/src/elevenlabs/core/__init__.py +++ b/src/elevenlabs/core/__init__.py @@ -2,27 +2,81 @@ # isort: skip_file -from .api_error import ApiError -from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper -from .datetime_utils import serialize_datetime -from .file import File, convert_file_dict_to_httpx_tuples, with_content_type -from .http_client import AsyncHttpClient, HttpClient -from .http_response import AsyncHttpResponse, HttpResponse -from .jsonable_encoder import jsonable_encoder -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata -from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .api_error import ApiError + from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper + from .datetime_utils import serialize_datetime + from .file import File, convert_file_dict_to_httpx_tuples, with_content_type + from .http_client import AsyncHttpClient, HttpClient + from .http_response import AsyncHttpResponse, HttpResponse + from .jsonable_encoder import jsonable_encoder + from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, + ) + from .query_encoder import encode_query + from .remove_none_from_dict import remove_none_from_dict + from .request_options import RequestOptions + from .serialization import FieldMetadata, convert_and_respect_annotation_metadata + from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".api_error", + "AsyncClientWrapper": ".client_wrapper", + "AsyncHttpClient": ".http_client", + "AsyncHttpResponse": ".http_response", + "BaseClientWrapper": ".client_wrapper", + "FieldMetadata": ".serialization", + "File": ".file", + "HttpClient": ".http_client", + "HttpResponse": ".http_response", + "IS_PYDANTIC_V2": ".pydantic_utilities", + "RequestOptions": ".request_options", + "SyncClientWrapper": ".client_wrapper", + "UncheckedBaseModel": ".unchecked_base_model", + "UnionMetadata": ".unchecked_base_model", + "UniversalBaseModel": ".pydantic_utilities", + "UniversalRootModel": ".pydantic_utilities", + "construct_type": ".unchecked_base_model", + "convert_and_respect_annotation_metadata": ".serialization", + "convert_file_dict_to_httpx_tuples": ".file", + "encode_query": ".query_encoder", + "jsonable_encoder": ".jsonable_encoder", + "parse_obj_as": ".pydantic_utilities", + "remove_none_from_dict": ".remove_none_from_dict", + "serialize_datetime": ".datetime_utils", + "universal_field_validator": ".pydantic_utilities", + "universal_root_validator": ".pydantic_utilities", + "update_forward_refs": ".pydantic_utilities", + "with_content_type": ".file", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 531a5c5a..c5d83f29 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -7,22 +7,34 @@ class BaseClientWrapper: - def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeout: typing.Optional[float] = None): + def __init__( + self, + *, + api_key: typing.Optional[str] = None, + headers: typing.Optional[typing.Dict[str, str]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + ): self._api_key = api_key + self._headers = headers self._base_url = base_url self._timeout = timeout def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.14.0", + "User-Agent": "elevenlabs/v2.15.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.14.0", + "X-Fern-SDK-Version": "v2.15.0", + **(self.get_custom_headers() or {}), } if self._api_key is not None: headers["xi-api-key"] = self._api_key return headers + def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]: + return self._headers + def get_base_url(http://github.com/self) -> str: return self._base_url @@ -35,11 +47,12 @@ def __init__( self, *, api_key: typing.Optional[str] = None, + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client, ): - super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers, @@ -53,11 +66,12 @@ def __init__( self, *, api_key: typing.Optional[str] = None, + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient, ): - super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers, diff --git a/src/elevenlabs/core/force_multipart.py b/src/elevenlabs/core/force_multipart.py index ae24ccff..5440913f 100644 --- a/src/elevenlabs/core/force_multipart.py +++ b/src/elevenlabs/core/force_multipart.py @@ -1,7 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from typing import Any, Dict -class ForceMultipartDict(dict): + +class ForceMultipartDict(Dict[str, Any]): """ A dictionary subclass that always evaluates to True in boolean contexts. @@ -9,7 +11,7 @@ class ForceMultipartDict(dict): the dictionary is empty, which would normally evaluate to False. """ - def __bool__(self): + def __bool__(self) -> bool: return True diff --git a/src/elevenlabs/core/http_response.py b/src/elevenlabs/core/http_response.py index 48a1798a..2479747e 100644 --- a/src/elevenlabs/core/http_response.py +++ b/src/elevenlabs/core/http_response.py @@ -4,8 +4,8 @@ import httpx +# Generic to represent the underlying type of the data wrapped by the HTTP response. T = TypeVar("T") -"""Generic to represent the underlying type of the data wrapped by the HTTP response.""" class BaseHttpResponse: diff --git a/src/elevenlabs/core/pydantic_utilities.py b/src/elevenlabs/core/pydantic_utilities.py index 0360ef49..dd7d89f5 100644 --- a/src/elevenlabs/core/pydantic_utilities.py +++ b/src/elevenlabs/core/pydantic_utilities.py @@ -59,9 +59,9 @@ class UniversalBaseModel(pydantic.BaseModel): protected_namespaces=(), ) - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore[attr-defined] - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> Any: # type: ignore[name-defined] - serialized = handler(self) + @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] + def serialize_model(self) -> Any: # type: ignore[name-defined] + serialized = self.model_dump() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data @@ -147,7 +147,10 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") + return cast( + Dict[str, Any], + convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"), + ) def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]: diff --git a/src/elevenlabs/core/unchecked_base_model.py b/src/elevenlabs/core/unchecked_base_model.py index 2c2d92a7..ae59845f 100644 --- a/src/elevenlabs/core/unchecked_base_model.py +++ b/src/elevenlabs/core/unchecked_base_model.py @@ -124,12 +124,50 @@ def construct( return m +def _validate_collection_items_compatible(collection: typing.Any, target_type: typing.Type[typing.Any]) -> bool: + """ + Validate that all items in a collection are compatible with the target type. + + Args: + collection: The collection to validate (list, set, or dict values) + target_type: The target type to validate against + + Returns: + True if all items are compatible, False otherwise + """ + if inspect.isclass(target_type) and issubclass(target_type, pydantic.BaseModel): + for item in collection: + try: + # Try to validate the item against the target type + if isinstance(item, dict): + parse_obj_as(target_type, item) + else: + # If it's not a dict, it might already be the right type + if not isinstance(item, target_type): + return False + except Exception: + return False + return True + + def _convert_undiscriminated_union_type(union_type: typing.Type[typing.Any], object_: typing.Any) -> typing.Any: inner_types = get_args(union_type) if typing.Any in inner_types: return object_ for inner_type in inner_types: + # Handle lists of objects that need parsing + if get_origin(inner_type) is list and isinstance(object_, list): + list_inner_type = get_args(inner_type)[0] + try: + if inspect.isclass(list_inner_type) and issubclass(list_inner_type, pydantic.BaseModel): + # Validate that all items in the list are compatible with the target type + if _validate_collection_items_compatible(object_, list_inner_type): + parsed_list = [parse_obj_as(object_=item, type_=list_inner_type) for item in object_] + return parsed_list + except Exception: + pass + try: if inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel): # Attempt a validated parse until one works @@ -148,7 +186,7 @@ def _convert_undiscriminated_union_type(union_type: typing.Type[typing.Any], obj def _convert_union_type(type_: typing.Type[typing.Any], object_: typing.Any) -> typing.Any: base_type = get_origin(type_) or type_ union_type = type_ - if base_type == typing_extensions.Annotated: + if base_type == typing_extensions.Annotated: # type: ignore[comparison-overlap] union_type = get_args(type_)[0] annotated_metadata = get_args(type_)[1:] for metadata in annotated_metadata: @@ -179,11 +217,11 @@ def construct_type(*, type_: typing.Type[typing.Any], object_: typing.Any) -> ty return None base_type = get_origin(type_) or type_ - is_annotated = base_type == typing_extensions.Annotated + is_annotated = base_type == typing_extensions.Annotated # type: ignore[comparison-overlap] maybe_annotation_members = get_args(type_) is_annotated_union = is_annotated and is_union(get_origin(maybe_annotation_members[0])) - if base_type == typing.Any: + if base_type == typing.Any: # type: ignore[comparison-overlap] return object_ if base_type == dict: diff --git a/src/elevenlabs/dubbing/__init__.py b/src/elevenlabs/dubbing/__init__.py index 46e10552..7b4f57e0 100644 --- a/src/elevenlabs/dubbing/__init__.py +++ b/src/elevenlabs/dubbing/__init__.py @@ -2,9 +2,41 @@ # isort: skip_file -from .types import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator -from . import audio, resource, transcript -from .transcript import TranscriptGetTranscriptForDubRequestFormatType +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator + from . import audio, resource, transcript + from .transcript import TranscriptGetTranscriptForDubRequestFormatType +_dynamic_imports: typing.Dict[str, str] = { + "DubbingListRequestDubbingStatus": ".types", + "DubbingListRequestFilterByCreator": ".types", + "TranscriptGetTranscriptForDubRequestFormatType": ".transcript", + "audio": ".", + "resource": ".", + "transcript": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "DubbingListRequestDubbingStatus", diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 5d6b3e9e..60ac17f5 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .. import core @@ -9,13 +11,14 @@ from ..types.do_dubbing_response import DoDubbingResponse from ..types.dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel from ..types.dubbing_metadata_response import DubbingMetadataResponse -from .audio.client import AsyncAudioClient, AudioClient from .raw_client import AsyncRawDubbingClient, RawDubbingClient -from .resource.client import AsyncResourceClient, ResourceClient -from .transcript.client import AsyncTranscriptClient, TranscriptClient from .types.dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .types.dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + from .resource.client import AsyncResourceClient, ResourceClient + from .transcript.client import AsyncTranscriptClient, TranscriptClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -23,11 +26,10 @@ class DubbingClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawDubbingClient(client_wrapper=client_wrapper) - self.resource = ResourceClient(client_wrapper=client_wrapper) - - self.audio = AudioClient(client_wrapper=client_wrapper) - - self.transcript = TranscriptClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._resource: typing.Optional[ResourceClient] = None + self._audio: typing.Optional[AudioClient] = None + self._transcript: typing.Optional[TranscriptClient] = None @property def with_raw_response(self) -> RawDubbingClient: @@ -290,15 +292,38 @@ def delete( _response = self._raw_client.delete(dubbing_id, request_options=request_options) return _response.data + @property + def resource(self): + if self._resource is None: + from .resource.client import ResourceClient # noqa: E402 + + self._resource = ResourceClient(client_wrapper=self._client_wrapper) + return self._resource + + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def transcript(self): + if self._transcript is None: + from .transcript.client import TranscriptClient # noqa: E402 + + self._transcript = TranscriptClient(client_wrapper=self._client_wrapper) + return self._transcript + class AsyncDubbingClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawDubbingClient(client_wrapper=client_wrapper) - self.resource = AsyncResourceClient(client_wrapper=client_wrapper) - - self.audio = AsyncAudioClient(client_wrapper=client_wrapper) - - self.transcript = AsyncTranscriptClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._resource: typing.Optional[AsyncResourceClient] = None + self._audio: typing.Optional[AsyncAudioClient] = None + self._transcript: typing.Optional[AsyncTranscriptClient] = None @property def with_raw_response(self) -> AsyncRawDubbingClient: @@ -592,3 +617,27 @@ async def main() -> None: """ _response = await self._raw_client.delete(dubbing_id, request_options=request_options) return _response.data + + @property + def resource(self): + if self._resource is None: + from .resource.client import AsyncResourceClient # noqa: E402 + + self._resource = AsyncResourceClient(client_wrapper=self._client_wrapper) + return self._resource + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def transcript(self): + if self._transcript is None: + from .transcript.client import AsyncTranscriptClient # noqa: E402 + + self._transcript = AsyncTranscriptClient(client_wrapper=self._client_wrapper) + return self._transcript diff --git a/src/elevenlabs/dubbing/resource/__init__.py b/src/elevenlabs/dubbing/resource/__init__.py index 80d5a1a4..4ea7122d 100644 --- a/src/elevenlabs/dubbing/resource/__init__.py +++ b/src/elevenlabs/dubbing/resource/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import language, segment, speaker +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import language, segment, speaker +_dynamic_imports: typing.Dict[str, str] = {"language": ".", "segment": ".", "speaker": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["language", "segment", "speaker"] diff --git a/src/elevenlabs/dubbing/resource/client.py b/src/elevenlabs/dubbing/resource/client.py index 94f8c650..cc9de76b 100644 --- a/src/elevenlabs/dubbing/resource/client.py +++ b/src/elevenlabs/dubbing/resource/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -10,11 +12,12 @@ from ...types.segment_dub_response import SegmentDubResponse from ...types.segment_transcription_response import SegmentTranscriptionResponse from ...types.segment_translation_response import SegmentTranslationResponse -from .language.client import AsyncLanguageClient, LanguageClient from .raw_client import AsyncRawResourceClient, RawResourceClient -from .segment.client import AsyncSegmentClient, SegmentClient -from .speaker.client import AsyncSpeakerClient, SpeakerClient +if typing.TYPE_CHECKING: + from .language.client import AsyncLanguageClient, LanguageClient + from .segment.client import AsyncSegmentClient, SegmentClient + from .speaker.client import AsyncSpeakerClient, SpeakerClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -22,11 +25,10 @@ class ResourceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawResourceClient(client_wrapper=client_wrapper) - self.language = LanguageClient(client_wrapper=client_wrapper) - - self.segment = SegmentClient(client_wrapper=client_wrapper) - - self.speaker = SpeakerClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._language: typing.Optional[LanguageClient] = None + self._segment: typing.Optional[SegmentClient] = None + self._speaker: typing.Optional[SpeakerClient] = None @property def with_raw_response(self) -> RawResourceClient: @@ -261,15 +263,38 @@ def render( ) return _response.data + @property + def language(self): + if self._language is None: + from .language.client import LanguageClient # noqa: E402 + + self._language = LanguageClient(client_wrapper=self._client_wrapper) + return self._language + + @property + def segment(self): + if self._segment is None: + from .segment.client import SegmentClient # noqa: E402 + + self._segment = SegmentClient(client_wrapper=self._client_wrapper) + return self._segment + + @property + def speaker(self): + if self._speaker is None: + from .speaker.client import SpeakerClient # noqa: E402 + + self._speaker = SpeakerClient(client_wrapper=self._client_wrapper) + return self._speaker + class AsyncResourceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawResourceClient(client_wrapper=client_wrapper) - self.language = AsyncLanguageClient(client_wrapper=client_wrapper) - - self.segment = AsyncSegmentClient(client_wrapper=client_wrapper) - - self.speaker = AsyncSpeakerClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._language: typing.Optional[AsyncLanguageClient] = None + self._segment: typing.Optional[AsyncSegmentClient] = None + self._speaker: typing.Optional[AsyncSpeakerClient] = None @property def with_raw_response(self) -> AsyncRawResourceClient: @@ -543,3 +568,27 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def language(self): + if self._language is None: + from .language.client import AsyncLanguageClient # noqa: E402 + + self._language = AsyncLanguageClient(client_wrapper=self._client_wrapper) + return self._language + + @property + def segment(self): + if self._segment is None: + from .segment.client import AsyncSegmentClient # noqa: E402 + + self._segment = AsyncSegmentClient(client_wrapper=self._client_wrapper) + return self._segment + + @property + def speaker(self): + if self._speaker is None: + from .speaker.client import AsyncSpeakerClient # noqa: E402 + + self._speaker = AsyncSpeakerClient(client_wrapper=self._client_wrapper) + return self._speaker diff --git a/src/elevenlabs/dubbing/resource/speaker/__init__.py b/src/elevenlabs/dubbing/resource/speaker/__init__.py index c9422df9..0d923748 100644 --- a/src/elevenlabs/dubbing/resource/speaker/__init__.py +++ b/src/elevenlabs/dubbing/resource/speaker/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import segment +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import segment +_dynamic_imports: typing.Dict[str, str] = {"segment": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["segment"] diff --git a/src/elevenlabs/dubbing/resource/speaker/client.py b/src/elevenlabs/dubbing/resource/speaker/client.py index 5f1fcae6..af2bd734 100644 --- a/src/elevenlabs/dubbing/resource/speaker/client.py +++ b/src/elevenlabs/dubbing/resource/speaker/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -7,8 +9,9 @@ from ....types.similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse from ....types.speaker_updated_response import SpeakerUpdatedResponse from .raw_client import AsyncRawSpeakerClient, RawSpeakerClient -from .segment.client import AsyncSegmentClient, SegmentClient +if typing.TYPE_CHECKING: + from .segment.client import AsyncSegmentClient, SegmentClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -16,7 +19,8 @@ class SpeakerClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSpeakerClient(client_wrapper=client_wrapper) - self.segment = SegmentClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._segment: typing.Optional[SegmentClient] = None @property def with_raw_response(self) -> RawSpeakerClient: @@ -117,11 +121,20 @@ def find_similar_voices( _response = self._raw_client.find_similar_voices(dubbing_id, speaker_id, request_options=request_options) return _response.data + @property + def segment(self): + if self._segment is None: + from .segment.client import SegmentClient # noqa: E402 + + self._segment = SegmentClient(client_wrapper=self._client_wrapper) + return self._segment + class AsyncSpeakerClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSpeakerClient(client_wrapper=client_wrapper) - self.segment = AsyncSegmentClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._segment: typing.Optional[AsyncSegmentClient] = None @property def with_raw_response(self) -> AsyncRawSpeakerClient: @@ -237,3 +250,11 @@ async def main() -> None: """ _response = await self._raw_client.find_similar_voices(dubbing_id, speaker_id, request_options=request_options) return _response.data + + @property + def segment(self): + if self._segment is None: + from .segment.client import AsyncSegmentClient # noqa: E402 + + self._segment = AsyncSegmentClient(client_wrapper=self._client_wrapper) + return self._segment diff --git a/src/elevenlabs/dubbing/transcript/__init__.py b/src/elevenlabs/dubbing/transcript/__init__.py index 2f9b180a..d3538871 100644 --- a/src/elevenlabs/dubbing/transcript/__init__.py +++ b/src/elevenlabs/dubbing/transcript/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import TranscriptGetTranscriptForDubRequestFormatType +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import TranscriptGetTranscriptForDubRequestFormatType +_dynamic_imports: typing.Dict[str, str] = {"TranscriptGetTranscriptForDubRequestFormatType": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TranscriptGetTranscriptForDubRequestFormatType"] diff --git a/src/elevenlabs/dubbing/transcript/types/__init__.py b/src/elevenlabs/dubbing/transcript/types/__init__.py index 35f6bdfe..f515ddf3 100644 --- a/src/elevenlabs/dubbing/transcript/types/__init__.py +++ b/src/elevenlabs/dubbing/transcript/types/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .transcript_get_transcript_for_dub_request_format_type import TranscriptGetTranscriptForDubRequestFormatType +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .transcript_get_transcript_for_dub_request_format_type import TranscriptGetTranscriptForDubRequestFormatType +_dynamic_imports: typing.Dict[str, str] = { + "TranscriptGetTranscriptForDubRequestFormatType": ".transcript_get_transcript_for_dub_request_format_type" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TranscriptGetTranscriptForDubRequestFormatType"] diff --git a/src/elevenlabs/dubbing/types/__init__.py b/src/elevenlabs/dubbing/types/__init__.py index 31eb01cd..2f5b95a0 100644 --- a/src/elevenlabs/dubbing/types/__init__.py +++ b/src/elevenlabs/dubbing/types/__init__.py @@ -2,7 +2,35 @@ # isort: skip_file -from .dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus -from .dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus + from .dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator +_dynamic_imports: typing.Dict[str, str] = { + "DubbingListRequestDubbingStatus": ".dubbing_list_request_dubbing_status", + "DubbingListRequestFilterByCreator": ".dubbing_list_request_filter_by_creator", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator"] diff --git a/src/elevenlabs/errors/__init__.py b/src/elevenlabs/errors/__init__.py index a63f3cf2..4645f0d2 100644 --- a/src/elevenlabs/errors/__init__.py +++ b/src/elevenlabs/errors/__init__.py @@ -2,12 +2,44 @@ # isort: skip_file -from .bad_request_error import BadRequestError -from .forbidden_error import ForbiddenError -from .not_found_error import NotFoundError -from .too_early_error import TooEarlyError -from .unauthorized_error import UnauthorizedError -from .unprocessable_entity_error import UnprocessableEntityError +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .bad_request_error import BadRequestError + from .forbidden_error import ForbiddenError + from .not_found_error import NotFoundError + from .too_early_error import TooEarlyError + from .unauthorized_error import UnauthorizedError + from .unprocessable_entity_error import UnprocessableEntityError +_dynamic_imports: typing.Dict[str, str] = { + "BadRequestError": ".bad_request_error", + "ForbiddenError": ".forbidden_error", + "NotFoundError": ".not_found_error", + "TooEarlyError": ".too_early_error", + "UnauthorizedError": ".unauthorized_error", + "UnprocessableEntityError": ".unprocessable_entity_error", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BadRequestError", diff --git a/src/elevenlabs/history/__init__.py b/src/elevenlabs/history/__init__.py index 7233ea43..1a021521 100644 --- a/src/elevenlabs/history/__init__.py +++ b/src/elevenlabs/history/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import HistoryListRequestSource +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import HistoryListRequestSource +_dynamic_imports: typing.Dict[str, str] = {"HistoryListRequestSource": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["HistoryListRequestSource"] diff --git a/src/elevenlabs/history/types/__init__.py b/src/elevenlabs/history/types/__init__.py index 74f623fc..8a14931e 100644 --- a/src/elevenlabs/history/types/__init__.py +++ b/src/elevenlabs/history/types/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .history_list_request_source import HistoryListRequestSource +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .history_list_request_source import HistoryListRequestSource +_dynamic_imports: typing.Dict[str, str] = {"HistoryListRequestSource": ".history_list_request_source"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["HistoryListRequestSource"] diff --git a/src/elevenlabs/music/__init__.py b/src/elevenlabs/music/__init__.py index 28d8ce0e..d30a333a 100644 --- a/src/elevenlabs/music/__init__.py +++ b/src/elevenlabs/music/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .types import ( - MusicComposeDetailedRequestOutputFormat, - MusicComposeRequestOutputFormat, - MusicStreamRequestOutputFormat, -) -from . import composition_plan +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + MusicComposeDetailedRequestOutputFormat, + MusicComposeRequestOutputFormat, + MusicStreamRequestOutputFormat, + ) + from . import composition_plan +_dynamic_imports: typing.Dict[str, str] = { + "MusicComposeDetailedRequestOutputFormat": ".types", + "MusicComposeRequestOutputFormat": ".types", + "MusicStreamRequestOutputFormat": ".types", + "composition_plan": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "MusicComposeDetailedRequestOutputFormat", diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 3d9e52b1..25b0c791 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -1,16 +1,19 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.music_prompt import MusicPrompt -from .composition_plan.client import AsyncCompositionPlanClient, CompositionPlanClient from .raw_client import AsyncRawMusicClient, RawMusicClient from .types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat +if typing.TYPE_CHECKING: + from .composition_plan.client import AsyncCompositionPlanClient, CompositionPlanClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -18,7 +21,8 @@ class MusicClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawMusicClient(client_wrapper=client_wrapper) - self.composition_plan = CompositionPlanClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._composition_plan: typing.Optional[CompositionPlanClient] = None @property def with_raw_response(self) -> RawMusicClient: @@ -190,11 +194,20 @@ def stream( ) as r: yield from r.data + @property + def composition_plan(self): + if self._composition_plan is None: + from .composition_plan.client import CompositionPlanClient # noqa: E402 + + self._composition_plan = CompositionPlanClient(client_wrapper=self._client_wrapper) + return self._composition_plan + class AsyncMusicClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawMusicClient(client_wrapper=client_wrapper) - self.composition_plan = AsyncCompositionPlanClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._composition_plan: typing.Optional[AsyncCompositionPlanClient] = None @property def with_raw_response(self) -> AsyncRawMusicClient: @@ -368,3 +381,11 @@ async def stream( ) as r: async for _chunk in r.data: yield _chunk + + @property + def composition_plan(self): + if self._composition_plan is None: + from .composition_plan.client import AsyncCompositionPlanClient # noqa: E402 + + self._composition_plan = AsyncCompositionPlanClient(client_wrapper=self._client_wrapper) + return self._composition_plan diff --git a/src/elevenlabs/music/types/__init__.py b/src/elevenlabs/music/types/__init__.py index 0ee5210c..a9e13c18 100644 --- a/src/elevenlabs/music/types/__init__.py +++ b/src/elevenlabs/music/types/__init__.py @@ -2,9 +2,38 @@ # isort: skip_file -from .music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat -from .music_compose_request_output_format import MusicComposeRequestOutputFormat -from .music_stream_request_output_format import MusicStreamRequestOutputFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat + from .music_compose_request_output_format import MusicComposeRequestOutputFormat + from .music_stream_request_output_format import MusicStreamRequestOutputFormat +_dynamic_imports: typing.Dict[str, str] = { + "MusicComposeDetailedRequestOutputFormat": ".music_compose_detailed_request_output_format", + "MusicComposeRequestOutputFormat": ".music_compose_request_output_format", + "MusicStreamRequestOutputFormat": ".music_stream_request_output_format", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "MusicComposeDetailedRequestOutputFormat", diff --git a/src/elevenlabs/pronunciation_dictionaries/__init__.py b/src/elevenlabs/pronunciation_dictionaries/__init__.py index 9418f247..63fc4f22 100644 --- a/src/elevenlabs/pronunciation_dictionaries/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/__init__.py @@ -2,16 +2,56 @@ # isort: skip_file -from .types import ( - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, - PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, - PronunciationDictionariesListRequestSort, -) -from . import rules -from .rules import PronunciationDictionaryRule, PronunciationDictionaryRule_Alias, PronunciationDictionaryRule_Phoneme +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, + PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, + PronunciationDictionariesListRequestSort, + ) + from . import rules + from .rules import ( + PronunciationDictionaryRule, + PronunciationDictionaryRule_Alias, + PronunciationDictionaryRule_Phoneme, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem": ".types", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias": ".types", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme": ".types", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess": ".types", + "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess": ".types", + "PronunciationDictionariesListRequestSort": ".types", + "PronunciationDictionaryRule": ".rules", + "PronunciationDictionaryRule_Alias": ".rules", + "PronunciationDictionaryRule_Phoneme": ".rules", + "rules": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem", diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index 6de2f15a..eb964552 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .. import core @@ -11,7 +13,6 @@ ) from ..types.get_pronunciation_dictionary_metadata_response import GetPronunciationDictionaryMetadataResponse from .raw_client import AsyncRawPronunciationDictionariesClient, RawPronunciationDictionariesClient -from .rules.client import AsyncRulesClient, RulesClient from .types.body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item import ( BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, ) @@ -23,6 +24,8 @@ ) from .types.pronunciation_dictionaries_list_request_sort import PronunciationDictionariesListRequestSort +if typing.TYPE_CHECKING: + from .rules.client import AsyncRulesClient, RulesClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -30,7 +33,8 @@ class PronunciationDictionariesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawPronunciationDictionariesClient(client_wrapper=client_wrapper) - self.rules = RulesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._rules: typing.Optional[RulesClient] = None @property def with_raw_response(self) -> RawPronunciationDictionariesClient: @@ -320,11 +324,20 @@ def list( ) return _response.data + @property + def rules(self): + if self._rules is None: + from .rules.client import RulesClient # noqa: E402 + + self._rules = RulesClient(client_wrapper=self._client_wrapper) + return self._rules + class AsyncPronunciationDictionariesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawPronunciationDictionariesClient(client_wrapper=client_wrapper) - self.rules = AsyncRulesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._rules: typing.Optional[AsyncRulesClient] = None @property def with_raw_response(self) -> AsyncRawPronunciationDictionariesClient: @@ -654,3 +667,11 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def rules(self): + if self._rules is None: + from .rules.client import AsyncRulesClient # noqa: E402 + + self._rules = AsyncRulesClient(client_wrapper=self._client_wrapper) + return self._rules diff --git a/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py b/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py index 8522724b..1876a209 100644 --- a/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py @@ -2,6 +2,39 @@ # isort: skip_file -from .types import PronunciationDictionaryRule, PronunciationDictionaryRule_Alias, PronunciationDictionaryRule_Phoneme +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + PronunciationDictionaryRule, + PronunciationDictionaryRule_Alias, + PronunciationDictionaryRule_Phoneme, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PronunciationDictionaryRule": ".types", + "PronunciationDictionaryRule_Alias": ".types", + "PronunciationDictionaryRule_Phoneme": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["PronunciationDictionaryRule", "PronunciationDictionaryRule_Alias", "PronunciationDictionaryRule_Phoneme"] diff --git a/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py b/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py index 7838edb1..80e65e8d 100644 --- a/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py @@ -2,10 +2,39 @@ # isort: skip_file -from .pronunciation_dictionary_rule import ( - PronunciationDictionaryRule, - PronunciationDictionaryRule_Alias, - PronunciationDictionaryRule_Phoneme, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .pronunciation_dictionary_rule import ( + PronunciationDictionaryRule, + PronunciationDictionaryRule_Alias, + PronunciationDictionaryRule_Phoneme, + ) +_dynamic_imports: typing.Dict[str, str] = { + "PronunciationDictionaryRule": ".pronunciation_dictionary_rule", + "PronunciationDictionaryRule_Alias": ".pronunciation_dictionary_rule", + "PronunciationDictionaryRule_Phoneme": ".pronunciation_dictionary_rule", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["PronunciationDictionaryRule", "PronunciationDictionaryRule_Alias", "PronunciationDictionaryRule_Phoneme"] diff --git a/src/elevenlabs/pronunciation_dictionaries/types/__init__.py b/src/elevenlabs/pronunciation_dictionaries/types/__init__.py index abe93e76..2898b0e0 100644 --- a/src/elevenlabs/pronunciation_dictionaries/types/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/types/__init__.py @@ -2,18 +2,50 @@ # isort: skip_file -from .body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item import ( - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, -) -from .body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access import ( - BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, -) -from .pronunciation_dictionaries_create_from_file_request_workspace_access import ( - PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, -) -from .pronunciation_dictionaries_list_request_sort import PronunciationDictionariesListRequestSort +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item import ( + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme, + ) + from .body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access import ( + BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess, + ) + from .pronunciation_dictionaries_create_from_file_request_workspace_access import ( + PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, + ) + from .pronunciation_dictionaries_list_request_sort import PronunciationDictionariesListRequestSort +_dynamic_imports: typing.Dict[str, str] = { + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem": ".body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias": ".body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme": ".body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_item", + "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess": ".body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access", + "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess": ".pronunciation_dictionaries_create_from_file_request_workspace_access", + "PronunciationDictionariesListRequestSort": ".pronunciation_dictionaries_list_request_sort", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem", diff --git a/src/elevenlabs/service_accounts/__init__.py b/src/elevenlabs/service_accounts/__init__.py index d76ea282..c6f2534b 100644 --- a/src/elevenlabs/service_accounts/__init__.py +++ b/src/elevenlabs/service_accounts/__init__.py @@ -2,13 +2,44 @@ # isort: skip_file -from . import api_keys -from .api_keys import ( - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import api_keys + from .api_keys import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions": ".api_keys", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem": ".api_keys", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions": ".api_keys", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem": ".api_keys", + "api_keys": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", diff --git a/src/elevenlabs/service_accounts/api_keys/__init__.py b/src/elevenlabs/service_accounts/api_keys/__init__.py index 7a460304..126a28ee 100644 --- a/src/elevenlabs/service_accounts/api_keys/__init__.py +++ b/src/elevenlabs/service_accounts/api_keys/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .types import ( - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions": ".types", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem": ".types", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions": ".types", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", diff --git a/src/elevenlabs/service_accounts/api_keys/types/__init__.py b/src/elevenlabs/service_accounts/api_keys/types/__init__.py index 32b1c1cb..e5710475 100644 --- a/src/elevenlabs/service_accounts/api_keys/types/__init__.py +++ b/src/elevenlabs/service_accounts/api_keys/types/__init__.py @@ -2,18 +2,48 @@ # isort: skip_file -from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions import ( - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, -) -from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item import ( - BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, -) -from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions import ( - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, -) -from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item import ( - BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions, + ) + from .body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item import ( + BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem, + ) + from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions, + ) + from .body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item import ( + BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions": ".body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions", + "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem": ".body_create_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_post_permissions_item", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions": ".body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions", + "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem": ".body_edit_service_account_api_key_v_1_service_accounts_service_account_user_id_api_keys_api_key_id_patch_permissions_item", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions", diff --git a/src/elevenlabs/service_accounts/client.py b/src/elevenlabs/service_accounts/client.py index 8611c612..0856d553 100644 --- a/src/elevenlabs/service_accounts/client.py +++ b/src/elevenlabs/service_accounts/client.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel -from .api_keys.client import ApiKeysClient, AsyncApiKeysClient from .raw_client import AsyncRawServiceAccountsClient, RawServiceAccountsClient +if typing.TYPE_CHECKING: + from .api_keys.client import ApiKeysClient, AsyncApiKeysClient + class ServiceAccountsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawServiceAccountsClient(client_wrapper=client_wrapper) - self.api_keys = ApiKeysClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._api_keys: typing.Optional[ApiKeysClient] = None @property def with_raw_response(self) -> RawServiceAccountsClient: @@ -53,11 +58,20 @@ def list( _response = self._raw_client.list(request_options=request_options) return _response.data + @property + def api_keys(self): + if self._api_keys is None: + from .api_keys.client import ApiKeysClient # noqa: E402 + + self._api_keys = ApiKeysClient(client_wrapper=self._client_wrapper) + return self._api_keys + class AsyncServiceAccountsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawServiceAccountsClient(client_wrapper=client_wrapper) - self.api_keys = AsyncApiKeysClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._api_keys: typing.Optional[AsyncApiKeysClient] = None @property def with_raw_response(self) -> AsyncRawServiceAccountsClient: @@ -105,3 +119,11 @@ async def main() -> None: """ _response = await self._raw_client.list(request_options=request_options) return _response.data + + @property + def api_keys(self): + if self._api_keys is None: + from .api_keys.client import AsyncApiKeysClient # noqa: E402 + + self._api_keys = AsyncApiKeysClient(client_wrapper=self._client_wrapper) + return self._api_keys diff --git a/src/elevenlabs/speech_to_speech/__init__.py b/src/elevenlabs/speech_to_speech/__init__.py index 4eec6092..aa278ffc 100644 --- a/src/elevenlabs/speech_to_speech/__init__.py +++ b/src/elevenlabs/speech_to_speech/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .types import ( - SpeechToSpeechConvertRequestFileFormat, - SpeechToSpeechConvertRequestOutputFormat, - SpeechToSpeechStreamRequestFileFormat, - SpeechToSpeechStreamRequestOutputFormat, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + SpeechToSpeechConvertRequestFileFormat, + SpeechToSpeechConvertRequestOutputFormat, + SpeechToSpeechStreamRequestFileFormat, + SpeechToSpeechStreamRequestOutputFormat, + ) +_dynamic_imports: typing.Dict[str, str] = { + "SpeechToSpeechConvertRequestFileFormat": ".types", + "SpeechToSpeechConvertRequestOutputFormat": ".types", + "SpeechToSpeechStreamRequestFileFormat": ".types", + "SpeechToSpeechStreamRequestOutputFormat": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "SpeechToSpeechConvertRequestFileFormat", diff --git a/src/elevenlabs/speech_to_speech/types/__init__.py b/src/elevenlabs/speech_to_speech/types/__init__.py index ef522535..0d215db2 100644 --- a/src/elevenlabs/speech_to_speech/types/__init__.py +++ b/src/elevenlabs/speech_to_speech/types/__init__.py @@ -2,10 +2,40 @@ # isort: skip_file -from .speech_to_speech_convert_request_file_format import SpeechToSpeechConvertRequestFileFormat -from .speech_to_speech_convert_request_output_format import SpeechToSpeechConvertRequestOutputFormat -from .speech_to_speech_stream_request_file_format import SpeechToSpeechStreamRequestFileFormat -from .speech_to_speech_stream_request_output_format import SpeechToSpeechStreamRequestOutputFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .speech_to_speech_convert_request_file_format import SpeechToSpeechConvertRequestFileFormat + from .speech_to_speech_convert_request_output_format import SpeechToSpeechConvertRequestOutputFormat + from .speech_to_speech_stream_request_file_format import SpeechToSpeechStreamRequestFileFormat + from .speech_to_speech_stream_request_output_format import SpeechToSpeechStreamRequestOutputFormat +_dynamic_imports: typing.Dict[str, str] = { + "SpeechToSpeechConvertRequestFileFormat": ".speech_to_speech_convert_request_file_format", + "SpeechToSpeechConvertRequestOutputFormat": ".speech_to_speech_convert_request_output_format", + "SpeechToSpeechStreamRequestFileFormat": ".speech_to_speech_stream_request_file_format", + "SpeechToSpeechStreamRequestOutputFormat": ".speech_to_speech_stream_request_output_format", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "SpeechToSpeechConvertRequestFileFormat", diff --git a/src/elevenlabs/speech_to_text/__init__.py b/src/elevenlabs/speech_to_text/__init__.py index 42808ed5..cf173164 100644 --- a/src/elevenlabs/speech_to_text/__init__.py +++ b/src/elevenlabs/speech_to_text/__init__.py @@ -2,14 +2,46 @@ # isort: skip_file -from .types import ( - SpeechToTextConvertRequestFileFormat, - SpeechToTextConvertRequestTimestampsGranularity, - SpeechToTextConvertRequestWebhookMetadata, - SpeechToTextConvertResponse, -) -from . import transcripts -from .transcripts import TranscriptsGetResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + SpeechToTextConvertRequestFileFormat, + SpeechToTextConvertRequestTimestampsGranularity, + SpeechToTextConvertRequestWebhookMetadata, + SpeechToTextConvertResponse, + ) + from . import transcripts + from .transcripts import TranscriptsGetResponse +_dynamic_imports: typing.Dict[str, str] = { + "SpeechToTextConvertRequestFileFormat": ".types", + "SpeechToTextConvertRequestTimestampsGranularity": ".types", + "SpeechToTextConvertRequestWebhookMetadata": ".types", + "SpeechToTextConvertResponse": ".types", + "TranscriptsGetResponse": ".transcripts", + "transcripts": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "SpeechToTextConvertRequestFileFormat", diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index eff73f81..afe40675 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .. import core @@ -7,12 +9,13 @@ from ..core.request_options import RequestOptions from ..types.additional_formats import AdditionalFormats from .raw_client import AsyncRawSpeechToTextClient, RawSpeechToTextClient -from .transcripts.client import AsyncTranscriptsClient, TranscriptsClient from .types.speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat from .types.speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity from .types.speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata from .types.speech_to_text_convert_response import SpeechToTextConvertResponse +if typing.TYPE_CHECKING: + from .transcripts.client import AsyncTranscriptsClient, TranscriptsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -20,7 +23,8 @@ class SpeechToTextClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSpeechToTextClient(client_wrapper=client_wrapper) - self.transcripts = TranscriptsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._transcripts: typing.Optional[TranscriptsClient] = None @property def with_raw_response(self) -> RawSpeechToTextClient: @@ -157,11 +161,20 @@ def convert( ) return _response.data + @property + def transcripts(self): + if self._transcripts is None: + from .transcripts.client import TranscriptsClient # noqa: E402 + + self._transcripts = TranscriptsClient(client_wrapper=self._client_wrapper) + return self._transcripts + class AsyncSpeechToTextClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSpeechToTextClient(client_wrapper=client_wrapper) - self.transcripts = AsyncTranscriptsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._transcripts: typing.Optional[AsyncTranscriptsClient] = None @property def with_raw_response(self) -> AsyncRawSpeechToTextClient: @@ -305,3 +318,11 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def transcripts(self): + if self._transcripts is None: + from .transcripts.client import AsyncTranscriptsClient # noqa: E402 + + self._transcripts = AsyncTranscriptsClient(client_wrapper=self._client_wrapper) + return self._transcripts diff --git a/src/elevenlabs/speech_to_text/transcripts/__init__.py b/src/elevenlabs/speech_to_text/transcripts/__init__.py index fa3a8854..c10ff243 100644 --- a/src/elevenlabs/speech_to_text/transcripts/__init__.py +++ b/src/elevenlabs/speech_to_text/transcripts/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import TranscriptsGetResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import TranscriptsGetResponse +_dynamic_imports: typing.Dict[str, str] = {"TranscriptsGetResponse": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TranscriptsGetResponse"] diff --git a/src/elevenlabs/speech_to_text/transcripts/types/__init__.py b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py index aaa28c33..a4adb3ee 100644 --- a/src/elevenlabs/speech_to_text/transcripts/types/__init__.py +++ b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .transcripts_get_response import TranscriptsGetResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .transcripts_get_response import TranscriptsGetResponse +_dynamic_imports: typing.Dict[str, str] = {"TranscriptsGetResponse": ".transcripts_get_response"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TranscriptsGetResponse"] diff --git a/src/elevenlabs/speech_to_text/types/__init__.py b/src/elevenlabs/speech_to_text/types/__init__.py index e300fc6c..08e5b6ed 100644 --- a/src/elevenlabs/speech_to_text/types/__init__.py +++ b/src/elevenlabs/speech_to_text/types/__init__.py @@ -2,10 +2,40 @@ # isort: skip_file -from .speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat -from .speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity -from .speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata -from .speech_to_text_convert_response import SpeechToTextConvertResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .speech_to_text_convert_request_file_format import SpeechToTextConvertRequestFileFormat + from .speech_to_text_convert_request_timestamps_granularity import SpeechToTextConvertRequestTimestampsGranularity + from .speech_to_text_convert_request_webhook_metadata import SpeechToTextConvertRequestWebhookMetadata + from .speech_to_text_convert_response import SpeechToTextConvertResponse +_dynamic_imports: typing.Dict[str, str] = { + "SpeechToTextConvertRequestFileFormat": ".speech_to_text_convert_request_file_format", + "SpeechToTextConvertRequestTimestampsGranularity": ".speech_to_text_convert_request_timestamps_granularity", + "SpeechToTextConvertRequestWebhookMetadata": ".speech_to_text_convert_request_webhook_metadata", + "SpeechToTextConvertResponse": ".speech_to_text_convert_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "SpeechToTextConvertRequestFileFormat", diff --git a/src/elevenlabs/studio/__init__.py b/src/elevenlabs/studio/__init__.py index ac1d347a..f4432bda 100644 --- a/src/elevenlabs/studio/__init__.py +++ b/src/elevenlabs/studio/__init__.py @@ -2,24 +2,64 @@ # isort: skip_file -from .types import ( - BodyCreatePodcastV1StudioPodcastsPostDurationScale, - BodyCreatePodcastV1StudioPodcastsPostMode, - BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, - BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, - BodyCreatePodcastV1StudioPodcastsPostQualityPreset, - BodyCreatePodcastV1StudioPodcastsPostSource, - BodyCreatePodcastV1StudioPodcastsPostSourceItem, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, -) -from . import projects -from .projects import ( - ProjectsCreateRequestApplyTextNormalization, - ProjectsCreateRequestFiction, - ProjectsCreateRequestSourceType, - ProjectsCreateRequestTargetAudience, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + BodyCreatePodcastV1StudioPodcastsPostDurationScale, + BodyCreatePodcastV1StudioPodcastsPostMode, + BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, + BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, + BodyCreatePodcastV1StudioPodcastsPostQualityPreset, + BodyCreatePodcastV1StudioPodcastsPostSource, + BodyCreatePodcastV1StudioPodcastsPostSourceItem, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, + ) + from . import projects + from .projects import ( + ProjectsCreateRequestApplyTextNormalization, + ProjectsCreateRequestFiction, + ProjectsCreateRequestSourceType, + ProjectsCreateRequestTargetAudience, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".types", + "BodyCreatePodcastV1StudioPodcastsPostMode": ".types", + "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".types", + "BodyCreatePodcastV1StudioPodcastsPostMode_Conversation": ".types", + "BodyCreatePodcastV1StudioPodcastsPostQualityPreset": ".types", + "BodyCreatePodcastV1StudioPodcastsPostSource": ".types", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem": ".types", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text": ".types", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url": ".types", + "ProjectsCreateRequestApplyTextNormalization": ".projects", + "ProjectsCreateRequestFiction": ".projects", + "ProjectsCreateRequestSourceType": ".projects", + "ProjectsCreateRequestTargetAudience": ".projects", + "projects": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyCreatePodcastV1StudioPodcastsPostDurationScale", diff --git a/src/elevenlabs/studio/client.py b/src/elevenlabs/studio/client.py index 2f2c1f59..784ae7e5 100644 --- a/src/elevenlabs/studio/client.py +++ b/src/elevenlabs/studio/client.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.podcast_project_response_model import PodcastProjectResponseModel -from .projects.client import AsyncProjectsClient, ProjectsClient from .raw_client import AsyncRawStudioClient, RawStudioClient from .types.body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( BodyCreatePodcastV1StudioPodcastsPostDurationScale, @@ -16,6 +17,8 @@ ) from .types.body_create_podcast_v_1_studio_podcasts_post_source import BodyCreatePodcastV1StudioPodcastsPostSource +if typing.TYPE_CHECKING: + from .projects.client import AsyncProjectsClient, ProjectsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -23,7 +26,8 @@ class StudioClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawStudioClient(client_wrapper=client_wrapper) - self.projects = ProjectsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._projects: typing.Optional[ProjectsClient] = None @property def with_raw_response(self) -> RawStudioClient: @@ -202,11 +206,20 @@ def create_podcast( ) return _response.data + @property + def projects(self): + if self._projects is None: + from .projects.client import ProjectsClient # noqa: E402 + + self._projects = ProjectsClient(client_wrapper=self._client_wrapper) + return self._projects + class AsyncStudioClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawStudioClient(client_wrapper=client_wrapper) - self.projects = AsyncProjectsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._projects: typing.Optional[AsyncProjectsClient] = None @property def with_raw_response(self) -> AsyncRawStudioClient: @@ -392,3 +405,11 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def projects(self): + if self._projects is None: + from .projects.client import AsyncProjectsClient # noqa: E402 + + self._projects = AsyncProjectsClient(client_wrapper=self._client_wrapper) + return self._projects diff --git a/src/elevenlabs/studio/projects/__init__.py b/src/elevenlabs/studio/projects/__init__.py index 7618a0f3..ceddd34b 100644 --- a/src/elevenlabs/studio/projects/__init__.py +++ b/src/elevenlabs/studio/projects/__init__.py @@ -2,13 +2,47 @@ # isort: skip_file -from .types import ( - ProjectsCreateRequestApplyTextNormalization, - ProjectsCreateRequestFiction, - ProjectsCreateRequestSourceType, - ProjectsCreateRequestTargetAudience, -) -from . import chapters, content, pronunciation_dictionaries, snapshots +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + ProjectsCreateRequestApplyTextNormalization, + ProjectsCreateRequestFiction, + ProjectsCreateRequestSourceType, + ProjectsCreateRequestTargetAudience, + ) + from . import chapters, content, pronunciation_dictionaries, snapshots +_dynamic_imports: typing.Dict[str, str] = { + "ProjectsCreateRequestApplyTextNormalization": ".types", + "ProjectsCreateRequestFiction": ".types", + "ProjectsCreateRequestSourceType": ".types", + "ProjectsCreateRequestTargetAudience": ".types", + "chapters": ".", + "content": ".", + "pronunciation_dictionaries": ".", + "snapshots": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ProjectsCreateRequestApplyTextNormalization", diff --git a/src/elevenlabs/studio/projects/chapters/__init__.py b/src/elevenlabs/studio/projects/chapters/__init__.py index fa184e74..b6ccf224 100644 --- a/src/elevenlabs/studio/projects/chapters/__init__.py +++ b/src/elevenlabs/studio/projects/chapters/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import snapshots +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import snapshots +_dynamic_imports: typing.Dict[str, str] = {"snapshots": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["snapshots"] diff --git a/src/elevenlabs/studio/projects/chapters/client.py b/src/elevenlabs/studio/projects/chapters/client.py index 5dff45f8..b9dd3cca 100644 --- a/src/elevenlabs/studio/projects/chapters/client.py +++ b/src/elevenlabs/studio/projects/chapters/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -12,8 +14,9 @@ from ....types.edit_chapter_response_model import EditChapterResponseModel from ....types.get_chapters_response import GetChaptersResponse from .raw_client import AsyncRawChaptersClient, RawChaptersClient -from .snapshots.client import AsyncSnapshotsClient, SnapshotsClient +if typing.TYPE_CHECKING: + from .snapshots.client import AsyncSnapshotsClient, SnapshotsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -21,7 +24,8 @@ class ChaptersClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawChaptersClient(client_wrapper=client_wrapper) - self.snapshots = SnapshotsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._snapshots: typing.Optional[SnapshotsClient] = None @property def with_raw_response(self) -> RawChaptersClient: @@ -272,11 +276,20 @@ def convert( _response = self._raw_client.convert(project_id, chapter_id, request_options=request_options) return _response.data + @property + def snapshots(self): + if self._snapshots is None: + from .snapshots.client import SnapshotsClient # noqa: E402 + + self._snapshots = SnapshotsClient(client_wrapper=self._client_wrapper) + return self._snapshots + class AsyncChaptersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawChaptersClient(client_wrapper=client_wrapper) - self.snapshots = AsyncSnapshotsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._snapshots: typing.Optional[AsyncSnapshotsClient] = None @property def with_raw_response(self) -> AsyncRawChaptersClient: @@ -578,3 +591,11 @@ async def main() -> None: """ _response = await self._raw_client.convert(project_id, chapter_id, request_options=request_options) return _response.data + + @property + def snapshots(self): + if self._snapshots is None: + from .snapshots.client import AsyncSnapshotsClient # noqa: E402 + + self._snapshots = AsyncSnapshotsClient(client_wrapper=self._client_wrapper) + return self._snapshots diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index a5e04fca..c476540b 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ... import core @@ -11,16 +13,17 @@ from ...types.edit_project_response_model import EditProjectResponseModel from ...types.get_projects_response import GetProjectsResponse from ...types.project_extended_response import ProjectExtendedResponse -from .chapters.client import AsyncChaptersClient, ChaptersClient -from .content.client import AsyncContentClient, ContentClient -from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient from .raw_client import AsyncRawProjectsClient, RawProjectsClient -from .snapshots.client import AsyncSnapshotsClient, SnapshotsClient from .types.projects_create_request_apply_text_normalization import ProjectsCreateRequestApplyTextNormalization from .types.projects_create_request_fiction import ProjectsCreateRequestFiction from .types.projects_create_request_source_type import ProjectsCreateRequestSourceType from .types.projects_create_request_target_audience import ProjectsCreateRequestTargetAudience +if typing.TYPE_CHECKING: + from .chapters.client import AsyncChaptersClient, ChaptersClient + from .content.client import AsyncContentClient, ContentClient + from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient + from .snapshots.client import AsyncSnapshotsClient, SnapshotsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -28,13 +31,11 @@ class ProjectsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawProjectsClient(client_wrapper=client_wrapper) - self.content = ContentClient(client_wrapper=client_wrapper) - - self.snapshots = SnapshotsClient(client_wrapper=client_wrapper) - - self.chapters = ChaptersClient(client_wrapper=client_wrapper) - - self.pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._content: typing.Optional[ContentClient] = None + self._snapshots: typing.Optional[SnapshotsClient] = None + self._chapters: typing.Optional[ChaptersClient] = None + self._pronunciation_dictionaries: typing.Optional[PronunciationDictionariesClient] = None @property def with_raw_response(self) -> RawProjectsClient: @@ -493,17 +494,47 @@ def convert( _response = self._raw_client.convert(project_id, request_options=request_options) return _response.data + @property + def content(self): + if self._content is None: + from .content.client import ContentClient # noqa: E402 -class AsyncProjectsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawProjectsClient(client_wrapper=client_wrapper) - self.content = AsyncContentClient(client_wrapper=client_wrapper) + self._content = ContentClient(client_wrapper=self._client_wrapper) + return self._content - self.snapshots = AsyncSnapshotsClient(client_wrapper=client_wrapper) + @property + def snapshots(self): + if self._snapshots is None: + from .snapshots.client import SnapshotsClient # noqa: E402 + + self._snapshots = SnapshotsClient(client_wrapper=self._client_wrapper) + return self._snapshots - self.chapters = AsyncChaptersClient(client_wrapper=client_wrapper) + @property + def chapters(self): + if self._chapters is None: + from .chapters.client import ChaptersClient # noqa: E402 - self.pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=client_wrapper) + self._chapters = ChaptersClient(client_wrapper=self._client_wrapper) + return self._chapters + + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import PronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries + + +class AsyncProjectsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawProjectsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._content: typing.Optional[AsyncContentClient] = None + self._snapshots: typing.Optional[AsyncSnapshotsClient] = None + self._chapters: typing.Optional[AsyncChaptersClient] = None + self._pronunciation_dictionaries: typing.Optional[AsyncPronunciationDictionariesClient] = None @property def with_raw_response(self) -> AsyncRawProjectsClient: @@ -1009,3 +1040,35 @@ async def main() -> None: """ _response = await self._raw_client.convert(project_id, request_options=request_options) return _response.data + + @property + def content(self): + if self._content is None: + from .content.client import AsyncContentClient # noqa: E402 + + self._content = AsyncContentClient(client_wrapper=self._client_wrapper) + return self._content + + @property + def snapshots(self): + if self._snapshots is None: + from .snapshots.client import AsyncSnapshotsClient # noqa: E402 + + self._snapshots = AsyncSnapshotsClient(client_wrapper=self._client_wrapper) + return self._snapshots + + @property + def chapters(self): + if self._chapters is None: + from .chapters.client import AsyncChaptersClient # noqa: E402 + + self._chapters = AsyncChaptersClient(client_wrapper=self._client_wrapper) + return self._chapters + + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries diff --git a/src/elevenlabs/studio/projects/types/__init__.py b/src/elevenlabs/studio/projects/types/__init__.py index 387315dc..76c9d27c 100644 --- a/src/elevenlabs/studio/projects/types/__init__.py +++ b/src/elevenlabs/studio/projects/types/__init__.py @@ -2,10 +2,40 @@ # isort: skip_file -from .projects_create_request_apply_text_normalization import ProjectsCreateRequestApplyTextNormalization -from .projects_create_request_fiction import ProjectsCreateRequestFiction -from .projects_create_request_source_type import ProjectsCreateRequestSourceType -from .projects_create_request_target_audience import ProjectsCreateRequestTargetAudience +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .projects_create_request_apply_text_normalization import ProjectsCreateRequestApplyTextNormalization + from .projects_create_request_fiction import ProjectsCreateRequestFiction + from .projects_create_request_source_type import ProjectsCreateRequestSourceType + from .projects_create_request_target_audience import ProjectsCreateRequestTargetAudience +_dynamic_imports: typing.Dict[str, str] = { + "ProjectsCreateRequestApplyTextNormalization": ".projects_create_request_apply_text_normalization", + "ProjectsCreateRequestFiction": ".projects_create_request_fiction", + "ProjectsCreateRequestSourceType": ".projects_create_request_source_type", + "ProjectsCreateRequestTargetAudience": ".projects_create_request_target_audience", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ProjectsCreateRequestApplyTextNormalization", diff --git a/src/elevenlabs/studio/types/__init__.py b/src/elevenlabs/studio/types/__init__.py index ce8a0b35..eea5d06d 100644 --- a/src/elevenlabs/studio/types/__init__.py +++ b/src/elevenlabs/studio/types/__init__.py @@ -2,23 +2,58 @@ # isort: skip_file -from .body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( - BodyCreatePodcastV1StudioPodcastsPostDurationScale, -) -from .body_create_podcast_v_1_studio_podcasts_post_mode import ( - BodyCreatePodcastV1StudioPodcastsPostMode, - BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, - BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, -) -from .body_create_podcast_v_1_studio_podcasts_post_quality_preset import ( - BodyCreatePodcastV1StudioPodcastsPostQualityPreset, -) -from .body_create_podcast_v_1_studio_podcasts_post_source import BodyCreatePodcastV1StudioPodcastsPostSource -from .body_create_podcast_v_1_studio_podcasts_post_source_item import ( - BodyCreatePodcastV1StudioPodcastsPostSourceItem, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, - BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( + BodyCreatePodcastV1StudioPodcastsPostDurationScale, + ) + from .body_create_podcast_v_1_studio_podcasts_post_mode import ( + BodyCreatePodcastV1StudioPodcastsPostMode, + BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, + BodyCreatePodcastV1StudioPodcastsPostMode_Conversation, + ) + from .body_create_podcast_v_1_studio_podcasts_post_quality_preset import ( + BodyCreatePodcastV1StudioPodcastsPostQualityPreset, + ) + from .body_create_podcast_v_1_studio_podcasts_post_source import BodyCreatePodcastV1StudioPodcastsPostSource + from .body_create_podcast_v_1_studio_podcasts_post_source_item import ( + BodyCreatePodcastV1StudioPodcastsPostSourceItem, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text, + BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".body_create_podcast_v_1_studio_podcasts_post_duration_scale", + "BodyCreatePodcastV1StudioPodcastsPostMode": ".body_create_podcast_v_1_studio_podcasts_post_mode", + "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".body_create_podcast_v_1_studio_podcasts_post_mode", + "BodyCreatePodcastV1StudioPodcastsPostMode_Conversation": ".body_create_podcast_v_1_studio_podcasts_post_mode", + "BodyCreatePodcastV1StudioPodcastsPostQualityPreset": ".body_create_podcast_v_1_studio_podcasts_post_quality_preset", + "BodyCreatePodcastV1StudioPodcastsPostSource": ".body_create_podcast_v_1_studio_podcasts_post_source", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem": ".body_create_podcast_v_1_studio_podcasts_post_source_item", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Text": ".body_create_podcast_v_1_studio_podcasts_post_source_item", + "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url": ".body_create_podcast_v_1_studio_podcasts_post_source_item", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyCreatePodcastV1StudioPodcastsPostDurationScale", diff --git a/src/elevenlabs/text_to_dialogue/__init__.py b/src/elevenlabs/text_to_dialogue/__init__.py index 8bff2bad..a37c44fc 100644 --- a/src/elevenlabs/text_to_dialogue/__init__.py +++ b/src/elevenlabs/text_to_dialogue/__init__.py @@ -2,12 +2,42 @@ # isort: skip_file -from .types import ( - BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, - BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, - TextToDialogueConvertRequestOutputFormat, - TextToDialogueStreamRequestOutputFormat, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + TextToDialogueConvertRequestOutputFormat, + TextToDialogueStreamRequestOutputFormat, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".types", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".types", + "TextToDialogueConvertRequestOutputFormat": ".types", + "TextToDialogueStreamRequestOutputFormat": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", diff --git a/src/elevenlabs/text_to_dialogue/types/__init__.py b/src/elevenlabs/text_to_dialogue/types/__init__.py index a8af8088..58f90396 100644 --- a/src/elevenlabs/text_to_dialogue/types/__init__.py +++ b/src/elevenlabs/text_to_dialogue/types/__init__.py @@ -2,14 +2,44 @@ # isort: skip_file -from .body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( - BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, -) -from .body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( - BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, -) -from .text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat -from .text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, + ) + from .body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( + BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + ) + from .text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat + from .text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat +_dynamic_imports: typing.Dict[str, str] = { + "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization", + "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization", + "TextToDialogueConvertRequestOutputFormat": ".text_to_dialogue_convert_request_output_format", + "TextToDialogueStreamRequestOutputFormat": ".text_to_dialogue_stream_request_output_format", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", diff --git a/src/elevenlabs/text_to_sound_effects/__init__.py b/src/elevenlabs/text_to_sound_effects/__init__.py index a47b33aa..efa9d3f6 100644 --- a/src/elevenlabs/text_to_sound_effects/__init__.py +++ b/src/elevenlabs/text_to_sound_effects/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import TextToSoundEffectsConvertRequestOutputFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import TextToSoundEffectsConvertRequestOutputFormat +_dynamic_imports: typing.Dict[str, str] = {"TextToSoundEffectsConvertRequestOutputFormat": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TextToSoundEffectsConvertRequestOutputFormat"] diff --git a/src/elevenlabs/text_to_sound_effects/types/__init__.py b/src/elevenlabs/text_to_sound_effects/types/__init__.py index 8370d85d..31fd65a2 100644 --- a/src/elevenlabs/text_to_sound_effects/types/__init__.py +++ b/src/elevenlabs/text_to_sound_effects/types/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .text_to_sound_effects_convert_request_output_format import TextToSoundEffectsConvertRequestOutputFormat +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .text_to_sound_effects_convert_request_output_format import TextToSoundEffectsConvertRequestOutputFormat +_dynamic_imports: typing.Dict[str, str] = { + "TextToSoundEffectsConvertRequestOutputFormat": ".text_to_sound_effects_convert_request_output_format" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["TextToSoundEffectsConvertRequestOutputFormat"] diff --git a/src/elevenlabs/text_to_speech/__init__.py b/src/elevenlabs/text_to_speech/__init__.py index 79ec22cb..ab1426d4 100644 --- a/src/elevenlabs/text_to_speech/__init__.py +++ b/src/elevenlabs/text_to_speech/__init__.py @@ -2,16 +2,50 @@ # isort: skip_file -from .types import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, - TextToSpeechConvertRequestOutputFormat, - TextToSpeechConvertWithTimestampsRequestOutputFormat, - TextToSpeechStreamRequestOutputFormat, - TextToSpeechStreamWithTimestampsRequestOutputFormat, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, + BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, + BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, + BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, + TextToSpeechConvertRequestOutputFormat, + TextToSpeechConvertWithTimestampsRequestOutputFormat, + TextToSpeechStreamRequestOutputFormat, + TextToSpeechStreamWithTimestampsRequestOutputFormat, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".types", + "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".types", + "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".types", + "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".types", + "TextToSpeechConvertRequestOutputFormat": ".types", + "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".types", + "TextToSpeechStreamRequestOutputFormat": ".types", + "TextToSpeechStreamWithTimestampsRequestOutputFormat": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", diff --git a/src/elevenlabs/text_to_speech/types/__init__.py b/src/elevenlabs/text_to_speech/types/__init__.py index 74808724..34f0fdb3 100644 --- a/src/elevenlabs/text_to_speech/types/__init__.py +++ b/src/elevenlabs/text_to_speech/types/__init__.py @@ -2,26 +2,60 @@ # isort: skip_file -from .body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, -) -from .body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, -) -from .body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, -) -from .body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, -) -from .text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat -from .text_to_speech_convert_with_timestamps_request_output_format import ( - TextToSpeechConvertWithTimestampsRequestOutputFormat, -) -from .text_to_speech_stream_request_output_format import TextToSpeechStreamRequestOutputFormat -from .text_to_speech_stream_with_timestamps_request_output_format import ( - TextToSpeechStreamWithTimestampsRequestOutputFormat, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( + BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, + ) + from .body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization import ( + BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, + ) + from .body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( + BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, + ) + from .body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization import ( + BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, + ) + from .text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat + from .text_to_speech_convert_with_timestamps_request_output_format import ( + TextToSpeechConvertWithTimestampsRequestOutputFormat, + ) + from .text_to_speech_stream_request_output_format import TextToSpeechStreamRequestOutputFormat + from .text_to_speech_stream_with_timestamps_request_output_format import ( + TextToSpeechStreamWithTimestampsRequestOutputFormat, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization", + "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization", + "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization", + "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization", + "TextToSpeechConvertRequestOutputFormat": ".text_to_speech_convert_request_output_format", + "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".text_to_speech_convert_with_timestamps_request_output_format", + "TextToSpeechStreamRequestOutputFormat": ".text_to_speech_stream_request_output_format", + "TextToSpeechStreamWithTimestampsRequestOutputFormat": ".text_to_speech_stream_with_timestamps_request_output_format", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", diff --git a/src/elevenlabs/text_to_voice/__init__.py b/src/elevenlabs/text_to_voice/__init__.py index 7f12283a..19cf751c 100644 --- a/src/elevenlabs/text_to_voice/__init__.py +++ b/src/elevenlabs/text_to_voice/__init__.py @@ -2,16 +2,49 @@ # isort: skip_file -from .types import ( - TextToVoiceCreatePreviewsRequestOutputFormat, - TextToVoiceDesignRequestOutputFormat, - VoiceDesignRequestModelModelId, -) -from . import preview +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + TextToVoiceCreatePreviewsRequestOutputFormat, + TextToVoiceDesignRequestOutputFormat, + TextToVoiceRemixRequestOutputFormat, + VoiceDesignRequestModelModelId, + ) + from . import preview +_dynamic_imports: typing.Dict[str, str] = { + "TextToVoiceCreatePreviewsRequestOutputFormat": ".types", + "TextToVoiceDesignRequestOutputFormat": ".types", + "TextToVoiceRemixRequestOutputFormat": ".types", + "VoiceDesignRequestModelModelId": ".types", + "preview": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", + "TextToVoiceRemixRequestOutputFormat", "VoiceDesignRequestModelModelId", "preview", ] diff --git a/src/elevenlabs/text_to_voice/client.py b/src/elevenlabs/text_to_voice/client.py index 6bec7b5b..015610e0 100644 --- a/src/elevenlabs/text_to_voice/client.py +++ b/src/elevenlabs/text_to_voice/client.py @@ -1,17 +1,21 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.voice import Voice from ..types.voice_design_preview_response import VoiceDesignPreviewResponse -from .preview.client import AsyncPreviewClient, PreviewClient from .raw_client import AsyncRawTextToVoiceClient, RawTextToVoiceClient from .types.text_to_voice_create_previews_request_output_format import TextToVoiceCreatePreviewsRequestOutputFormat from .types.text_to_voice_design_request_output_format import TextToVoiceDesignRequestOutputFormat +from .types.text_to_voice_remix_request_output_format import TextToVoiceRemixRequestOutputFormat from .types.voice_design_request_model_model_id import VoiceDesignRequestModelModelId +if typing.TYPE_CHECKING: + from .preview.client import AsyncPreviewClient, PreviewClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -19,7 +23,8 @@ class TextToVoiceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawTextToVoiceClient(client_wrapper=client_wrapper) - self.preview = PreviewClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._preview: typing.Optional[PreviewClient] = None @property def with_raw_response(self) -> RawTextToVoiceClient: @@ -271,11 +276,115 @@ def design( ) return _response.data + def remix( + self, + voice_id: str, + *, + voice_description: str, + output_format: typing.Optional[TextToVoiceRemixRequestOutputFormat] = None, + text: typing.Optional[str] = OMIT, + auto_generate_text: typing.Optional[bool] = OMIT, + loudness: typing.Optional[float] = OMIT, + seed: typing.Optional[int] = OMIT, + guidance_scale: typing.Optional[float] = OMIT, + stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, + prompt_strength: typing.Optional[float] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> VoiceDesignPreviewResponse: + """ + Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. + + Parameters + ---------- + voice_id : str + Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + + voice_description : str + Description of the changes to make to the voice. + + output_format : typing.Optional[TextToVoiceRemixRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + text : typing.Optional[str] + Text to generate, text length has to be between 100 and 1000. + + auto_generate_text : typing.Optional[bool] + Whether to automatically generate a text suitable for the voice description. + + loudness : typing.Optional[float] + Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + + seed : typing.Optional[int] + Random number that controls the voice generation. Same seed with same inputs produces same voice. + + guidance_scale : typing.Optional[float] + Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + + stream_previews : typing.Optional[bool] + Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + + prompt_strength : typing.Optional[float] + Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + VoiceDesignPreviewResponse + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.text_to_voice.remix( + voice_id="21m00Tcm4TlvDq8ikWAM", + voice_description="Make the voice have a higher pitch.", + ) + """ + _response = self._raw_client.remix( + voice_id, + voice_description=voice_description, + output_format=output_format, + text=text, + auto_generate_text=auto_generate_text, + loudness=loudness, + seed=seed, + guidance_scale=guidance_scale, + stream_previews=stream_previews, + remixing_session_id=remixing_session_id, + remixing_session_iteration_id=remixing_session_iteration_id, + prompt_strength=prompt_strength, + request_options=request_options, + ) + return _response.data + + @property + def preview(self): + if self._preview is None: + from .preview.client import PreviewClient # noqa: E402 + + self._preview = PreviewClient(client_wrapper=self._client_wrapper) + return self._preview + class AsyncTextToVoiceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawTextToVoiceClient(client_wrapper=client_wrapper) - self.preview = AsyncPreviewClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._preview: typing.Optional[AsyncPreviewClient] = None @property def with_raw_response(self) -> AsyncRawTextToVoiceClient: @@ -550,3 +659,114 @@ async def main() -> None: request_options=request_options, ) return _response.data + + async def remix( + self, + voice_id: str, + *, + voice_description: str, + output_format: typing.Optional[TextToVoiceRemixRequestOutputFormat] = None, + text: typing.Optional[str] = OMIT, + auto_generate_text: typing.Optional[bool] = OMIT, + loudness: typing.Optional[float] = OMIT, + seed: typing.Optional[int] = OMIT, + guidance_scale: typing.Optional[float] = OMIT, + stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, + prompt_strength: typing.Optional[float] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> VoiceDesignPreviewResponse: + """ + Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. + + Parameters + ---------- + voice_id : str + Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + + voice_description : str + Description of the changes to make to the voice. + + output_format : typing.Optional[TextToVoiceRemixRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + text : typing.Optional[str] + Text to generate, text length has to be between 100 and 1000. + + auto_generate_text : typing.Optional[bool] + Whether to automatically generate a text suitable for the voice description. + + loudness : typing.Optional[float] + Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + + seed : typing.Optional[int] + Random number that controls the voice generation. Same seed with same inputs produces same voice. + + guidance_scale : typing.Optional[float] + Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + + stream_previews : typing.Optional[bool] + Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + + prompt_strength : typing.Optional[float] + Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + VoiceDesignPreviewResponse + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.text_to_voice.remix( + voice_id="21m00Tcm4TlvDq8ikWAM", + voice_description="Make the voice have a higher pitch.", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.remix( + voice_id, + voice_description=voice_description, + output_format=output_format, + text=text, + auto_generate_text=auto_generate_text, + loudness=loudness, + seed=seed, + guidance_scale=guidance_scale, + stream_previews=stream_previews, + remixing_session_id=remixing_session_id, + remixing_session_iteration_id=remixing_session_iteration_id, + prompt_strength=prompt_strength, + request_options=request_options, + ) + return _response.data + + @property + def preview(self): + if self._preview is None: + from .preview.client import AsyncPreviewClient # noqa: E402 + + self._preview = AsyncPreviewClient(client_wrapper=self._client_wrapper) + return self._preview diff --git a/src/elevenlabs/text_to_voice/raw_client.py b/src/elevenlabs/text_to_voice/raw_client.py index 87542ffa..c875befb 100644 --- a/src/elevenlabs/text_to_voice/raw_client.py +++ b/src/elevenlabs/text_to_voice/raw_client.py @@ -6,6 +6,7 @@ from ..core.api_error import ApiError from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder from ..core.request_options import RequestOptions from ..core.unchecked_base_model import construct_type from ..errors.unprocessable_entity_error import UnprocessableEntityError @@ -14,6 +15,7 @@ from ..types.voice_design_preview_response import VoiceDesignPreviewResponse from .types.text_to_voice_create_previews_request_output_format import TextToVoiceCreatePreviewsRequestOutputFormat from .types.text_to_voice_design_request_output_format import TextToVoiceDesignRequestOutputFormat +from .types.text_to_voice_remix_request_output_format import TextToVoiceRemixRequestOutputFormat from .types.voice_design_request_model_model_id import VoiceDesignRequestModelModelId # this is used as the default value for optional parameters @@ -328,6 +330,122 @@ def design( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def remix( + self, + voice_id: str, + *, + voice_description: str, + output_format: typing.Optional[TextToVoiceRemixRequestOutputFormat] = None, + text: typing.Optional[str] = OMIT, + auto_generate_text: typing.Optional[bool] = OMIT, + loudness: typing.Optional[float] = OMIT, + seed: typing.Optional[int] = OMIT, + guidance_scale: typing.Optional[float] = OMIT, + stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, + prompt_strength: typing.Optional[float] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[VoiceDesignPreviewResponse]: + """ + Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. + + Parameters + ---------- + voice_id : str + Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + + voice_description : str + Description of the changes to make to the voice. + + output_format : typing.Optional[TextToVoiceRemixRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + text : typing.Optional[str] + Text to generate, text length has to be between 100 and 1000. + + auto_generate_text : typing.Optional[bool] + Whether to automatically generate a text suitable for the voice description. + + loudness : typing.Optional[float] + Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + + seed : typing.Optional[int] + Random number that controls the voice generation. Same seed with same inputs produces same voice. + + guidance_scale : typing.Optional[float] + Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + + stream_previews : typing.Optional[bool] + Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + + prompt_strength : typing.Optional[float] + Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[VoiceDesignPreviewResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/text-to-voice/{jsonable_encoder(voice_id)}/remix", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "voice_description": voice_description, + "text": text, + "auto_generate_text": auto_generate_text, + "loudness": loudness, + "seed": seed, + "guidance_scale": guidance_scale, + "stream_previews": stream_previews, + "remixing_session_id": remixing_session_id, + "remixing_session_iteration_id": remixing_session_iteration_id, + "prompt_strength": prompt_strength, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + VoiceDesignPreviewResponse, + construct_type( + type_=VoiceDesignPreviewResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawTextToVoiceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -636,3 +754,119 @@ async def design( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def remix( + self, + voice_id: str, + *, + voice_description: str, + output_format: typing.Optional[TextToVoiceRemixRequestOutputFormat] = None, + text: typing.Optional[str] = OMIT, + auto_generate_text: typing.Optional[bool] = OMIT, + loudness: typing.Optional[float] = OMIT, + seed: typing.Optional[int] = OMIT, + guidance_scale: typing.Optional[float] = OMIT, + stream_previews: typing.Optional[bool] = OMIT, + remixing_session_id: typing.Optional[str] = OMIT, + remixing_session_iteration_id: typing.Optional[str] = OMIT, + prompt_strength: typing.Optional[float] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[VoiceDesignPreviewResponse]: + """ + Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. + + Parameters + ---------- + voice_id : str + Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + + voice_description : str + Description of the changes to make to the voice. + + output_format : typing.Optional[TextToVoiceRemixRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + text : typing.Optional[str] + Text to generate, text length has to be between 100 and 1000. + + auto_generate_text : typing.Optional[bool] + Whether to automatically generate a text suitable for the voice description. + + loudness : typing.Optional[float] + Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + + seed : typing.Optional[int] + Random number that controls the voice generation. Same seed with same inputs produces same voice. + + guidance_scale : typing.Optional[float] + Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + + stream_previews : typing.Optional[bool] + Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + + remixing_session_id : typing.Optional[str] + The remixing session id. + + remixing_session_iteration_id : typing.Optional[str] + The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + + prompt_strength : typing.Optional[float] + Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[VoiceDesignPreviewResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/text-to-voice/{jsonable_encoder(voice_id)}/remix", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "voice_description": voice_description, + "text": text, + "auto_generate_text": auto_generate_text, + "loudness": loudness, + "seed": seed, + "guidance_scale": guidance_scale, + "stream_previews": stream_previews, + "remixing_session_id": remixing_session_id, + "remixing_session_iteration_id": remixing_session_iteration_id, + "prompt_strength": prompt_strength, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + VoiceDesignPreviewResponse, + construct_type( + type_=VoiceDesignPreviewResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/text_to_voice/types/__init__.py b/src/elevenlabs/text_to_voice/types/__init__.py index 9ca24f20..264e1a98 100644 --- a/src/elevenlabs/text_to_voice/types/__init__.py +++ b/src/elevenlabs/text_to_voice/types/__init__.py @@ -2,12 +2,44 @@ # isort: skip_file -from .text_to_voice_create_previews_request_output_format import TextToVoiceCreatePreviewsRequestOutputFormat -from .text_to_voice_design_request_output_format import TextToVoiceDesignRequestOutputFormat -from .voice_design_request_model_model_id import VoiceDesignRequestModelModelId +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .text_to_voice_create_previews_request_output_format import TextToVoiceCreatePreviewsRequestOutputFormat + from .text_to_voice_design_request_output_format import TextToVoiceDesignRequestOutputFormat + from .text_to_voice_remix_request_output_format import TextToVoiceRemixRequestOutputFormat + from .voice_design_request_model_model_id import VoiceDesignRequestModelModelId +_dynamic_imports: typing.Dict[str, str] = { + "TextToVoiceCreatePreviewsRequestOutputFormat": ".text_to_voice_create_previews_request_output_format", + "TextToVoiceDesignRequestOutputFormat": ".text_to_voice_design_request_output_format", + "TextToVoiceRemixRequestOutputFormat": ".text_to_voice_remix_request_output_format", + "VoiceDesignRequestModelModelId": ".voice_design_request_model_model_id", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", + "TextToVoiceRemixRequestOutputFormat", "VoiceDesignRequestModelModelId", ] diff --git a/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py b/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py new file mode 100644 index 00000000..825d812b --- /dev/null +++ b/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToVoiceRemixRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 4c75ee95..e07f4adb 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -2,952 +2,1818 @@ # isort: skip_file -from .add_chapter_response_model import AddChapterResponseModel -from .add_knowledge_base_response_model import AddKnowledgeBaseResponseModel -from .add_project_request import AddProjectRequest -from .add_project_response_model import AddProjectResponseModel -from .add_pronunciation_dictionary_response_model import AddPronunciationDictionaryResponseModel -from .add_pronunciation_dictionary_response_model_permission_on_resource import ( - AddPronunciationDictionaryResponseModelPermissionOnResource, -) -from .add_sharing_voice_request import AddSharingVoiceRequest -from .add_voice_ivc_response_model import AddVoiceIvcResponseModel -from .add_voice_response_model import AddVoiceResponseModel -from .add_workspace_group_member_response_model import AddWorkspaceGroupMemberResponseModel -from .add_workspace_invite_response_model import AddWorkspaceInviteResponseModel -from .additional_format_response_model import AdditionalFormatResponseModel -from .additional_formats import AdditionalFormats -from .adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel -from .age import Age -from .agent_call_limits import AgentCallLimits -from .agent_config import AgentConfig -from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride -from .agent_config_override import AgentConfigOverride -from .agent_config_override_config import AgentConfigOverrideConfig -from .agent_failure_response_example import AgentFailureResponseExample -from .agent_metadata_response_model import AgentMetadataResponseModel -from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel -from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel -from .agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel -from .agent_successful_response_example import AgentSuccessfulResponseExample -from .agent_summary_response_model import AgentSummaryResponseModel -from .agent_testing_settings import AgentTestingSettings -from .agent_transfer import AgentTransfer -from .agent_workflow_request_model import AgentWorkflowRequestModel -from .agent_workflow_request_model_nodes_value import ( - AgentWorkflowRequestModelNodesValue, - AgentWorkflowRequestModelNodesValue_End, - AgentWorkflowRequestModelNodesValue_OverrideAgent, - AgentWorkflowRequestModelNodesValue_PhoneNumber, - AgentWorkflowRequestModelNodesValue_StandaloneAgent, - AgentWorkflowRequestModelNodesValue_Start, - AgentWorkflowRequestModelNodesValue_Tool, -) -from .agent_workspace_overrides_input import AgentWorkspaceOverridesInput -from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput -from .alignment import Alignment -from .allowlist_item import AllowlistItem -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput -from .array_json_schema_property_input_items import ArrayJsonSchemaPropertyInputItems -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput -from .array_json_schema_property_output_items import ArrayJsonSchemaPropertyOutputItems -from .asr_conversational_config import AsrConversationalConfig -from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride -from .asr_input_format import AsrInputFormat -from .asr_provider import AsrProvider -from .asr_quality import AsrQuality -from .attached_test_model import AttachedTestModel -from .audio_native_create_project_response_model import AudioNativeCreateProjectResponseModel -from .audio_native_edit_content_response_model import AudioNativeEditContentResponseModel -from .audio_native_project_settings_response_model import AudioNativeProjectSettingsResponseModel -from .audio_native_project_settings_response_model_status import AudioNativeProjectSettingsResponseModelStatus -from .audio_output import AudioOutput -from .audio_output_multi import AudioOutputMulti -from .audio_with_timestamps_response import AudioWithTimestampsResponse -from .auth_connection_locator import AuthConnectionLocator -from .auth_settings import AuthSettings -from .authorization_method import AuthorizationMethod -from .bad_request_error_body import BadRequestErrorBody -from .ban_reason_type import BanReasonType -from .batch_call_detailed_response import BatchCallDetailedResponse -from .batch_call_recipient_status import BatchCallRecipientStatus -from .batch_call_response import BatchCallResponse -from .batch_call_status import BatchCallStatus -from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age import ( - BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, -) -from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_gender import ( - BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, -) -from .breakdown_types import BreakdownTypes -from .built_in_tools_input import BuiltInToolsInput -from .built_in_tools_output import BuiltInToolsOutput -from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride -from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel -from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType -from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType -from .caption_style_horizontal_placement_model import CaptionStyleHorizontalPlacementModel -from .caption_style_horizontal_placement_model_align import CaptionStyleHorizontalPlacementModelAlign -from .caption_style_model import CaptionStyleModel -from .caption_style_model_text_align import CaptionStyleModelTextAlign -from .caption_style_model_text_style import CaptionStyleModelTextStyle -from .caption_style_model_text_weight import CaptionStyleModelTextWeight -from .caption_style_section_animation_model import CaptionStyleSectionAnimationModel -from .caption_style_section_animation_model_enter_type import CaptionStyleSectionAnimationModelEnterType -from .caption_style_section_animation_model_exit_type import CaptionStyleSectionAnimationModelExitType -from .caption_style_template_model import CaptionStyleTemplateModel -from .caption_style_vertical_placement_model import CaptionStyleVerticalPlacementModel -from .caption_style_vertical_placement_model_align import CaptionStyleVerticalPlacementModelAlign -from .caption_style_word_animation_model import CaptionStyleWordAnimationModel -from .caption_style_word_animation_model_enter_type import CaptionStyleWordAnimationModelEnterType -from .caption_style_word_animation_model_exit_type import CaptionStyleWordAnimationModelExitType -from .chapter_content_block_extendable_node_response_model import ChapterContentBlockExtendableNodeResponseModel -from .chapter_content_block_input_model import ChapterContentBlockInputModel -from .chapter_content_block_input_model_sub_type import ChapterContentBlockInputModelSubType -from .chapter_content_block_response_model import ChapterContentBlockResponseModel -from .chapter_content_block_response_model_nodes_item import ( - ChapterContentBlockResponseModelNodesItem, - ChapterContentBlockResponseModelNodesItem_Other, - ChapterContentBlockResponseModelNodesItem_TtsNode, -) -from .chapter_content_block_tts_node_response_model import ChapterContentBlockTtsNodeResponseModel -from .chapter_content_input_model import ChapterContentInputModel -from .chapter_content_paragraph_tts_node_input_model import ChapterContentParagraphTtsNodeInputModel -from .chapter_content_response_model import ChapterContentResponseModel -from .chapter_response import ChapterResponse -from .chapter_snapshot_extended_response_model import ChapterSnapshotExtendedResponseModel -from .chapter_snapshot_response import ChapterSnapshotResponse -from .chapter_snapshots_response import ChapterSnapshotsResponse -from .chapter_state import ChapterState -from .chapter_statistics_response import ChapterStatisticsResponse -from .chapter_with_content_response_model import ChapterWithContentResponseModel -from .chapter_with_content_response_model_state import ChapterWithContentResponseModelState -from .character_alignment_model import CharacterAlignmentModel -from .character_alignment_response_model import CharacterAlignmentResponseModel -from .character_usage_response import CharacterUsageResponse -from .client_event import ClientEvent -from .client_tool_config_input import ClientToolConfigInput -from .client_tool_config_output import ClientToolConfigOutput -from .close_connection import CloseConnection -from .close_context import CloseContext -from .close_socket import CloseSocket -from .conv_ai_dynamic_variable import ConvAiDynamicVariable -from .conv_ai_secret_locator import ConvAiSecretLocator -from .conv_ai_stored_secret_dependencies import ConvAiStoredSecretDependencies -from .conv_ai_stored_secret_dependencies_agents_item import ( - ConvAiStoredSecretDependenciesAgentsItem, - ConvAiStoredSecretDependenciesAgentsItem_Available, - ConvAiStoredSecretDependenciesAgentsItem_Unknown, -) -from .conv_ai_stored_secret_dependencies_tools_item import ( - ConvAiStoredSecretDependenciesToolsItem, - ConvAiStoredSecretDependenciesToolsItem_Available, - ConvAiStoredSecretDependenciesToolsItem_Unknown, -) -from .conv_ai_user_secret_db_model import ConvAiUserSecretDbModel -from .conv_ai_webhooks import ConvAiWebhooks -from .conv_ai_workspace_stored_secret_config import ConvAiWorkspaceStoredSecretConfig -from .conversation_charging_common_model import ConversationChargingCommonModel -from .conversation_config import ConversationConfig -from .conversation_config_client_override_config_input import ConversationConfigClientOverrideConfigInput -from .conversation_config_client_override_config_output import ConversationConfigClientOverrideConfigOutput -from .conversation_config_client_override_input import ConversationConfigClientOverrideInput -from .conversation_config_client_override_output import ConversationConfigClientOverrideOutput -from .conversation_config_override import ConversationConfigOverride -from .conversation_config_override_config import ConversationConfigOverrideConfig -from .conversation_config_workflow_override import ConversationConfigWorkflowOverride -from .conversation_deletion_settings import ConversationDeletionSettings -from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel -from .conversation_history_batch_call_model import ConversationHistoryBatchCallModel -from .conversation_history_eleven_assistant_common_model import ConversationHistoryElevenAssistantCommonModel -from .conversation_history_error_common_model import ConversationHistoryErrorCommonModel -from .conversation_history_evaluation_criteria_result_common_model import ( - ConversationHistoryEvaluationCriteriaResultCommonModel, -) -from .conversation_history_feedback_common_model import ConversationHistoryFeedbackCommonModel -from .conversation_history_metadata_common_model import ConversationHistoryMetadataCommonModel -from .conversation_history_metadata_common_model_phone_call import ( - ConversationHistoryMetadataCommonModelPhoneCall, - ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, - ConversationHistoryMetadataCommonModelPhoneCall_Twilio, -) -from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel -from .conversation_history_multivoice_message_part_model import ConversationHistoryMultivoiceMessagePartModel -from .conversation_history_rag_usage_common_model import ConversationHistoryRagUsageCommonModel -from .conversation_history_sip_trunking_phone_call_model import ConversationHistorySipTrunkingPhoneCallModel -from .conversation_history_sip_trunking_phone_call_model_direction import ( - ConversationHistorySipTrunkingPhoneCallModelDirection, -) -from .conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput -from .conversation_history_transcript_common_model_input_role import ConversationHistoryTranscriptCommonModelInputRole -from .conversation_history_transcript_common_model_input_source_medium import ( - ConversationHistoryTranscriptCommonModelInputSourceMedium, -) -from .conversation_history_transcript_common_model_input_tool_results_item import ( - ConversationHistoryTranscriptCommonModelInputToolResultsItem, -) -from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput -from .conversation_history_transcript_common_model_output_role import ConversationHistoryTranscriptCommonModelOutputRole -from .conversation_history_transcript_common_model_output_source_medium import ( - ConversationHistoryTranscriptCommonModelOutputSourceMedium, -) -from .conversation_history_transcript_common_model_output_tool_results_item import ( - ConversationHistoryTranscriptCommonModelOutputToolResultsItem, -) -from .conversation_history_transcript_other_tools_result_common_model import ( - ConversationHistoryTranscriptOtherToolsResultCommonModel, -) -from .conversation_history_transcript_other_tools_result_common_model_type import ( - ConversationHistoryTranscriptOtherToolsResultCommonModelType, -) -from .conversation_history_transcript_system_tool_result_common_model import ( - ConversationHistoryTranscriptSystemToolResultCommonModel, -) -from .conversation_history_transcript_system_tool_result_common_model_result import ( - ConversationHistoryTranscriptSystemToolResultCommonModelResult, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, - ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, -) -from .conversation_history_transcript_tool_call_client_details import ConversationHistoryTranscriptToolCallClientDetails -from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel -from .conversation_history_transcript_tool_call_common_model_tool_details import ( - ConversationHistoryTranscriptToolCallCommonModelToolDetails, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp, - ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, -) -from .conversation_history_transcript_tool_call_mcp_details import ConversationHistoryTranscriptToolCallMcpDetails -from .conversation_history_transcript_tool_call_webhook_details import ( - ConversationHistoryTranscriptToolCallWebhookDetails, -) -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) -from .conversation_history_twilio_phone_call_model import ConversationHistoryTwilioPhoneCallModel -from .conversation_history_twilio_phone_call_model_direction import ConversationHistoryTwilioPhoneCallModelDirection -from .conversation_initiation_client_data_config_input import ConversationInitiationClientDataConfigInput -from .conversation_initiation_client_data_config_output import ConversationInitiationClientDataConfigOutput -from .conversation_initiation_client_data_internal import ConversationInitiationClientDataInternal -from .conversation_initiation_client_data_internal_dynamic_variables_value import ( - ConversationInitiationClientDataInternalDynamicVariablesValue, -) -from .conversation_initiation_client_data_request_input import ConversationInitiationClientDataRequestInput -from .conversation_initiation_client_data_request_input_dynamic_variables_value import ( - ConversationInitiationClientDataRequestInputDynamicVariablesValue, -) -from .conversation_initiation_client_data_request_output import ConversationInitiationClientDataRequestOutput -from .conversation_initiation_client_data_request_output_dynamic_variables_value import ( - ConversationInitiationClientDataRequestOutputDynamicVariablesValue, -) -from .conversation_initiation_client_data_webhook import ConversationInitiationClientDataWebhook -from .conversation_initiation_client_data_webhook_request_headers_value import ( - ConversationInitiationClientDataWebhookRequestHeadersValue, -) -from .conversation_initiation_source import ConversationInitiationSource -from .conversation_initiation_source_info import ConversationInitiationSourceInfo -from .conversation_signed_url_response_model import ConversationSignedUrlResponseModel -from .conversation_simulation_specification import ConversationSimulationSpecification -from .conversation_simulation_specification_dynamic_variables_value import ( - ConversationSimulationSpecificationDynamicVariablesValue, -) -from .conversation_summary_response_model import ConversationSummaryResponseModel -from .conversation_summary_response_model_direction import ConversationSummaryResponseModelDirection -from .conversation_summary_response_model_status import ConversationSummaryResponseModelStatus -from .conversation_token_db_model import ConversationTokenDbModel -from .conversation_token_purpose import ConversationTokenPurpose -from .conversation_turn_metrics import ConversationTurnMetrics -from .conversational_config import ConversationalConfig -from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride -from .convert_chapter_response_model import ConvertChapterResponseModel -from .convert_project_response_model import ConvertProjectResponseModel -from .create_agent_response_model import CreateAgentResponseModel -from .create_audio_native_project_request import CreateAudioNativeProjectRequest -from .create_phone_number_response_model import CreatePhoneNumberResponseModel -from .create_previously_generated_voice_request import CreatePreviouslyGeneratedVoiceRequest -from .create_pronunciation_dictionary_response_model import CreatePronunciationDictionaryResponseModel -from .create_sip_trunk_phone_number_request import CreateSipTrunkPhoneNumberRequest -from .create_transcript_request import CreateTranscriptRequest -from .create_twilio_phone_number_request import CreateTwilioPhoneNumberRequest -from .create_unit_test_response_model import CreateUnitTestResponseModel -from .custom_llm import CustomLlm -from .custom_llm_request_headers_value import CustomLlmRequestHeadersValue -from .dashboard_call_success_chart_model import DashboardCallSuccessChartModel -from .dashboard_criteria_chart_model import DashboardCriteriaChartModel -from .dashboard_data_collection_chart_model import DashboardDataCollectionChartModel -from .data_collection_result_common_model import DataCollectionResultCommonModel -from .delete_chapter_request import DeleteChapterRequest -from .delete_chapter_response_model import DeleteChapterResponseModel -from .delete_dubbing_response_model import DeleteDubbingResponseModel -from .delete_history_item_response import DeleteHistoryItemResponse -from .delete_project_request import DeleteProjectRequest -from .delete_project_response_model import DeleteProjectResponseModel -from .delete_sample_response import DeleteSampleResponse -from .delete_voice_response_model import DeleteVoiceResponseModel -from .delete_voice_sample_response_model import DeleteVoiceSampleResponseModel -from .delete_workspace_group_member_response_model import DeleteWorkspaceGroupMemberResponseModel -from .delete_workspace_invite_response_model import DeleteWorkspaceInviteResponseModel -from .dependent_available_agent_identifier import DependentAvailableAgentIdentifier -from .dependent_available_agent_identifier_access_level import DependentAvailableAgentIdentifierAccessLevel -from .dependent_available_tool_identifier import DependentAvailableToolIdentifier -from .dependent_available_tool_identifier_access_level import DependentAvailableToolIdentifierAccessLevel -from .dependent_phone_number_identifier import DependentPhoneNumberIdentifier -from .dependent_unknown_agent_identifier import DependentUnknownAgentIdentifier -from .dependent_unknown_tool_identifier import DependentUnknownToolIdentifier -from .detailed_music_response import DetailedMusicResponse -from .dialogue_input import DialogueInput -from .dialogue_input_response_model import DialogueInputResponseModel -from .do_dubbing_response import DoDubbingResponse -from .document_usage_mode_enum import DocumentUsageModeEnum -from .docx_export_options import DocxExportOptions -from .dubbed_segment import DubbedSegment -from .dubbing_media_metadata import DubbingMediaMetadata -from .dubbing_media_reference import DubbingMediaReference -from .dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel -from .dubbing_metadata_response import DubbingMetadataResponse -from .dubbing_release_channel import DubbingReleaseChannel -from .dubbing_render_response_model import DubbingRenderResponseModel -from .dubbing_resource import DubbingResource -from .dynamic_variable_assignment import DynamicVariableAssignment -from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel -from .dynamic_variables_config import DynamicVariablesConfig -from .dynamic_variables_config_dynamic_variable_placeholders_value import ( - DynamicVariablesConfigDynamicVariablePlaceholdersValue, -) -from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride -from .dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value import ( - DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, -) -from .edit_chapter_response_model import EditChapterResponseModel -from .edit_project_response_model import EditProjectResponseModel -from .edit_voice_response_model import EditVoiceResponseModel -from .edit_voice_settings_request import EditVoiceSettingsRequest -from .edit_voice_settings_response_model import EditVoiceSettingsResponseModel -from .embed_variant import EmbedVariant -from .embedding_model_enum import EmbeddingModelEnum -from .end_call_tool_config import EndCallToolConfig -from .end_call_tool_result_model import EndCallToolResultModel -from .evaluation_settings import EvaluationSettings -from .evaluation_success_result import EvaluationSuccessResult -from .exact_parameter_evaluation_strategy import ExactParameterEvaluationStrategy -from .export_options import ( - ExportOptions, - ExportOptions_Docx, - ExportOptions_Html, - ExportOptions_Pdf, - ExportOptions_SegmentedJson, - ExportOptions_Srt, - ExportOptions_Txt, -) -from .extended_subscription_response_model_billing_period import ExtendedSubscriptionResponseModelBillingPeriod -from .extended_subscription_response_model_character_refresh_period import ( - ExtendedSubscriptionResponseModelCharacterRefreshPeriod, -) -from .extended_subscription_response_model_currency import ExtendedSubscriptionResponseModelCurrency -from .extended_subscription_response_model_pending_change import ExtendedSubscriptionResponseModelPendingChange -from .feature_status_common_model import FeatureStatusCommonModel -from .features_usage_common_model import FeaturesUsageCommonModel -from .feedback_item import FeedbackItem -from .final_output import FinalOutput -from .final_output_multi import FinalOutputMulti -from .fine_tuning_response import FineTuningResponse -from .fine_tuning_response_model_state_value import FineTuningResponseModelStateValue -from .flush_context import FlushContext -from .forced_alignment_character_response_model import ForcedAlignmentCharacterResponseModel -from .forced_alignment_response_model import ForcedAlignmentResponseModel -from .forced_alignment_word_response_model import ForcedAlignmentWordResponseModel -from .gender import Gender -from .generate_voice_request import GenerateVoiceRequest -from .generation_config import GenerationConfig -from .get_agent_embed_response_model import GetAgentEmbedResponseModel -from .get_agent_knowledgebase_size_response_model import GetAgentKnowledgebaseSizeResponseModel -from .get_agent_link_response_model import GetAgentLinkResponseModel -from .get_agent_response_model import GetAgentResponseModel -from .get_agent_response_model_phone_numbers_item import ( - GetAgentResponseModelPhoneNumbersItem, - GetAgentResponseModelPhoneNumbersItem_SipTrunk, - GetAgentResponseModelPhoneNumbersItem_Twilio, -) -from .get_agents_page_response_model import GetAgentsPageResponseModel -from .get_audio_native_project_settings_response_model import GetAudioNativeProjectSettingsResponseModel -from .get_chapter_request import GetChapterRequest -from .get_chapter_snapshots_request import GetChapterSnapshotsRequest -from .get_chapters_request import GetChaptersRequest -from .get_chapters_response import GetChaptersResponse -from .get_conv_ai_dashboard_settings_response_model import GetConvAiDashboardSettingsResponseModel -from .get_conv_ai_dashboard_settings_response_model_charts_item import ( - GetConvAiDashboardSettingsResponseModelChartsItem, - GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess, - GetConvAiDashboardSettingsResponseModelChartsItem_Criteria, - GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection, -) -from .get_conv_ai_settings_response_model import GetConvAiSettingsResponseModel -from .get_conversation_response_model import GetConversationResponseModel -from .get_conversation_response_model_status import GetConversationResponseModelStatus -from .get_conversations_page_response_model import GetConversationsPageResponseModel -from .get_knowledge_base_dependent_agents_response_model import GetKnowledgeBaseDependentAgentsResponseModel -from .get_knowledge_base_dependent_agents_response_model_agents_item import ( - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem, - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available, - GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown, -) -from .get_knowledge_base_file_response_model import GetKnowledgeBaseFileResponseModel -from .get_knowledge_base_list_response_model import GetKnowledgeBaseListResponseModel -from .get_knowledge_base_list_response_model_documents_item import ( - GetKnowledgeBaseListResponseModelDocumentsItem, - GetKnowledgeBaseListResponseModelDocumentsItem_File, - GetKnowledgeBaseListResponseModelDocumentsItem_Text, - GetKnowledgeBaseListResponseModelDocumentsItem_Url, -) -from .get_knowledge_base_summary_file_response_model import GetKnowledgeBaseSummaryFileResponseModel -from .get_knowledge_base_summary_file_response_model_dependent_agents_item import ( - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown, -) -from .get_knowledge_base_summary_text_response_model import GetKnowledgeBaseSummaryTextResponseModel -from .get_knowledge_base_summary_text_response_model_dependent_agents_item import ( - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown, -) -from .get_knowledge_base_summary_url_response_model import GetKnowledgeBaseSummaryUrlResponseModel -from .get_knowledge_base_summary_url_response_model_dependent_agents_item import ( - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem, - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available, - GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown, -) -from .get_knowledge_base_text_response_model import GetKnowledgeBaseTextResponseModel -from .get_knowledge_base_url_response_model import GetKnowledgeBaseUrlResponseModel -from .get_library_voices_response import GetLibraryVoicesResponse -from .get_phone_number_inbound_sip_trunk_config_response_model import GetPhoneNumberInboundSipTrunkConfigResponseModel -from .get_phone_number_outbound_sip_trunk_config_response_model import GetPhoneNumberOutboundSipTrunkConfigResponseModel -from .get_phone_number_response import GetPhoneNumberResponse -from .get_phone_number_sip_trunk_response_model import GetPhoneNumberSipTrunkResponseModel -from .get_phone_number_twilio_response_model import GetPhoneNumberTwilioResponseModel -from .get_project_request import GetProjectRequest -from .get_projects_request import GetProjectsRequest -from .get_projects_response import GetProjectsResponse -from .get_pronunciation_dictionaries_metadata_response_model import GetPronunciationDictionariesMetadataResponseModel -from .get_pronunciation_dictionaries_response import GetPronunciationDictionariesResponse -from .get_pronunciation_dictionary_metadata_response import GetPronunciationDictionaryMetadataResponse -from .get_pronunciation_dictionary_metadata_response_model_permission_on_resource import ( - GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, -) -from .get_pronunciation_dictionary_response import GetPronunciationDictionaryResponse -from .get_speech_history_response import GetSpeechHistoryResponse -from .get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel -from .get_tests_page_response_model import GetTestsPageResponseModel -from .get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel -from .get_tool_dependent_agents_response_model import GetToolDependentAgentsResponseModel -from .get_tool_dependent_agents_response_model_agents_item import ( - GetToolDependentAgentsResponseModelAgentsItem, - GetToolDependentAgentsResponseModelAgentsItem_Available, - GetToolDependentAgentsResponseModelAgentsItem_Unknown, -) -from .get_unit_test_response_model import GetUnitTestResponseModel -from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue -from .get_voices_response import GetVoicesResponse -from .get_voices_v_2_response import GetVoicesV2Response -from .get_workspace_secrets_response_model import GetWorkspaceSecretsResponseModel -from .history_alignment_response_model import HistoryAlignmentResponseModel -from .history_alignments_response_model import HistoryAlignmentsResponseModel -from .history_item_response import HistoryItemResponse -from .html_export_options import HtmlExportOptions -from .http_validation_error import HttpValidationError -from .image_avatar import ImageAvatar -from .inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel -from .initialise_context import InitialiseContext -from .initialize_connection import InitializeConnection -from .initialize_connection_multi import InitializeConnectionMulti -from .integration_type import IntegrationType -from .invoice_response import InvoiceResponse -from .invoice_response_model_payment_intent_status import InvoiceResponseModelPaymentIntentStatus -from .keep_context_alive import KeepContextAlive -from .knowledge_base_document_chunk_response_model import KnowledgeBaseDocumentChunkResponseModel -from .knowledge_base_document_metadata_response_model import KnowledgeBaseDocumentMetadataResponseModel -from .knowledge_base_document_type import KnowledgeBaseDocumentType -from .knowledge_base_locator import KnowledgeBaseLocator -from .language_added_response import LanguageAddedResponse -from .language_detection_tool_config import LanguageDetectionToolConfig -from .language_detection_tool_result_model import LanguageDetectionToolResultModel -from .language_preset_input import LanguagePresetInput -from .language_preset_output import LanguagePresetOutput -from .language_preset_translation import LanguagePresetTranslation -from .language_response import LanguageResponse -from .library_voice_response import LibraryVoiceResponse -from .library_voice_response_model_category import LibraryVoiceResponseModelCategory -from .list_mcp_tools_response_model import ListMcpToolsResponseModel -from .literal_json_schema_property import LiteralJsonSchemaProperty -from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue -from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType -from .llm import Llm -from .llm_category_usage import LlmCategoryUsage -from .llm_input_output_tokens_usage import LlmInputOutputTokensUsage -from .llm_parameter_evaluation_strategy import LlmParameterEvaluationStrategy -from .llm_tokens_category_usage import LlmTokensCategoryUsage -from .llm_usage_calculator_llm_response_model import LlmUsageCalculatorLlmResponseModel -from .llm_usage_calculator_response_model import LlmUsageCalculatorResponseModel -from .llm_usage_input import LlmUsageInput -from .llm_usage_output import LlmUsageOutput -from .manual_verification_file_response import ManualVerificationFileResponse -from .manual_verification_response import ManualVerificationResponse -from .mcp_approval_policy import McpApprovalPolicy -from .mcp_server_config_input import McpServerConfigInput -from .mcp_server_config_input_request_headers_value import McpServerConfigInputRequestHeadersValue -from .mcp_server_config_input_secret_token import McpServerConfigInputSecretToken -from .mcp_server_config_input_url import McpServerConfigInputUrl -from .mcp_server_config_output import McpServerConfigOutput -from .mcp_server_config_output_request_headers_value import McpServerConfigOutputRequestHeadersValue -from .mcp_server_config_output_secret_token import McpServerConfigOutputSecretToken -from .mcp_server_config_output_url import McpServerConfigOutputUrl -from .mcp_server_metadata_response_model import McpServerMetadataResponseModel -from .mcp_server_response_model import McpServerResponseModel -from .mcp_server_response_model_dependent_agents_item import ( - McpServerResponseModelDependentAgentsItem, - McpServerResponseModelDependentAgentsItem_Available, - McpServerResponseModelDependentAgentsItem_Unknown, -) -from .mcp_server_transport import McpServerTransport -from .mcp_servers_response_model import McpServersResponseModel -from .mcp_tool_approval_hash import McpToolApprovalHash -from .mcp_tool_approval_policy import McpToolApprovalPolicy -from .metric_record import MetricRecord -from .metric_type import MetricType -from .model import Model -from .model_rates_response_model import ModelRatesResponseModel -from .model_response_model_concurrency_group import ModelResponseModelConcurrencyGroup -from .model_settings_response_model import ModelSettingsResponseModel -from .moderation_status_response_model import ModerationStatusResponseModel -from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus -from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus -from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel -from .multipart_music_response import MultipartMusicResponse -from .music_prompt import MusicPrompt -from .normalized_alignment import NormalizedAlignment -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput -from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput -from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue -from .orb_avatar import OrbAvatar -from .outbound_call_recipient import OutboundCallRecipient -from .outbound_call_recipient_response_model import OutboundCallRecipientResponseModel -from .outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel -from .output_format import OutputFormat -from .pdf_export_options import PdfExportOptions -from .pending_cancellation_response_model import PendingCancellationResponseModel -from .pending_subscription_switch_response_model import PendingSubscriptionSwitchResponseModel -from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier -from .phone_number_agent_info import PhoneNumberAgentInfo -from .phone_number_transfer import PhoneNumberTransfer -from .phone_number_transfer_destination import PhoneNumberTransferDestination -from .phone_number_transfer_transfer_destination import ( - PhoneNumberTransferTransferDestination, - PhoneNumberTransferTransferDestination_Phone, - PhoneNumberTransferTransferDestination_SipUri, -) -from .play_dtmf_result_error_model import PlayDtmfResultErrorModel -from .play_dtmf_result_success_model import PlayDtmfResultSuccessModel -from .play_dtmf_tool_config import PlayDtmfToolConfig -from .podcast_bulletin_mode import PodcastBulletinMode -from .podcast_bulletin_mode_data import PodcastBulletinModeData -from .podcast_conversation_mode import PodcastConversationMode -from .podcast_conversation_mode_data import PodcastConversationModeData -from .podcast_project_response_model import PodcastProjectResponseModel -from .podcast_text_source import PodcastTextSource -from .podcast_url_source import PodcastUrlSource -from .position import Position -from .post_agent_avatar_response_model import PostAgentAvatarResponseModel -from .post_workspace_secret_response_model import PostWorkspaceSecretResponseModel -from .privacy_config import PrivacyConfig -from .project_creation_meta_response_model import ProjectCreationMetaResponseModel -from .project_creation_meta_response_model_status import ProjectCreationMetaResponseModelStatus -from .project_creation_meta_response_model_type import ProjectCreationMetaResponseModelType -from .project_extended_response import ProjectExtendedResponse -from .project_extended_response_model_access_level import ProjectExtendedResponseModelAccessLevel -from .project_extended_response_model_apply_text_normalization import ProjectExtendedResponseModelApplyTextNormalization -from .project_extended_response_model_fiction import ProjectExtendedResponseModelFiction -from .project_extended_response_model_quality_preset import ProjectExtendedResponseModelQualityPreset -from .project_extended_response_model_source_type import ProjectExtendedResponseModelSourceType -from .project_extended_response_model_target_audience import ProjectExtendedResponseModelTargetAudience -from .project_response import ProjectResponse -from .project_response_model_access_level import ProjectResponseModelAccessLevel -from .project_response_model_fiction import ProjectResponseModelFiction -from .project_response_model_source_type import ProjectResponseModelSourceType -from .project_response_model_target_audience import ProjectResponseModelTargetAudience -from .project_snapshot_extended_response_model import ProjectSnapshotExtendedResponseModel -from .project_snapshot_response import ProjectSnapshotResponse -from .project_snapshots_response import ProjectSnapshotsResponse -from .project_state import ProjectState -from .prompt_agent import PromptAgent -from .prompt_agent_api_model_input import PromptAgentApiModelInput -from .prompt_agent_api_model_input_tools_item import ( - PromptAgentApiModelInputToolsItem, - PromptAgentApiModelInputToolsItem_Client, - PromptAgentApiModelInputToolsItem_Mcp, - PromptAgentApiModelInputToolsItem_System, - PromptAgentApiModelInputToolsItem_Webhook, -) -from .prompt_agent_api_model_output import PromptAgentApiModelOutput -from .prompt_agent_api_model_output_tools_item import ( - PromptAgentApiModelOutputToolsItem, - PromptAgentApiModelOutputToolsItem_Client, - PromptAgentApiModelOutputToolsItem_Mcp, - PromptAgentApiModelOutputToolsItem_System, - PromptAgentApiModelOutputToolsItem_Webhook, -) -from .prompt_agent_api_model_override import PromptAgentApiModelOverride -from .prompt_agent_api_model_override_config import PromptAgentApiModelOverrideConfig -from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride -from .prompt_agent_api_model_workflow_override_tools_item import ( - PromptAgentApiModelWorkflowOverrideToolsItem, - PromptAgentApiModelWorkflowOverrideToolsItem_Client, - PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, - PromptAgentApiModelWorkflowOverrideToolsItem_System, - PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, -) -from .prompt_agent_db_model import PromptAgentDbModel -from .prompt_evaluation_criteria import PromptEvaluationCriteria -from .pronunciation_dictionary_alias_rule_request_model import PronunciationDictionaryAliasRuleRequestModel -from .pronunciation_dictionary_locator import PronunciationDictionaryLocator -from .pronunciation_dictionary_locator_response_model import PronunciationDictionaryLocatorResponseModel -from .pronunciation_dictionary_phoneme_rule_request_model import PronunciationDictionaryPhonemeRuleRequestModel -from .pronunciation_dictionary_rules_response_model import PronunciationDictionaryRulesResponseModel -from .pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator -from .pronunciation_dictionary_version_response_model import PronunciationDictionaryVersionResponseModel -from .pronunciation_dictionary_version_response_model_permission_on_resource import ( - PronunciationDictionaryVersionResponseModelPermissionOnResource, -) -from .pydantic_pronunciation_dictionary_version_locator import PydanticPronunciationDictionaryVersionLocator -from .query_params_json_schema import QueryParamsJsonSchema -from .rag_chunk_metadata import RagChunkMetadata -from .rag_config import RagConfig -from .rag_config_workflow_override import RagConfigWorkflowOverride -from .rag_document_index_response_model import RagDocumentIndexResponseModel -from .rag_document_index_usage import RagDocumentIndexUsage -from .rag_document_indexes_response_model import RagDocumentIndexesResponseModel -from .rag_index_overview_embedding_model_response_model import RagIndexOverviewEmbeddingModelResponseModel -from .rag_index_overview_response_model import RagIndexOverviewResponseModel -from .rag_index_status import RagIndexStatus -from .rag_retrieval_info import RagRetrievalInfo -from .reader_resource_response_model import ReaderResourceResponseModel -from .reader_resource_response_model_resource_type import ReaderResourceResponseModelResourceType -from .realtime_voice_settings import RealtimeVoiceSettings -from .recording_response import RecordingResponse -from .referenced_tool_common_model import ReferencedToolCommonModel -from .regex_parameter_evaluation_strategy import RegexParameterEvaluationStrategy -from .remove_member_from_group_request import RemoveMemberFromGroupRequest -from .render import Render -from .render_status import RenderStatus -from .render_type import RenderType -from .request_pvc_manual_verification_response_model import RequestPvcManualVerificationResponseModel -from .resource_access_info import ResourceAccessInfo -from .resource_access_info_role import ResourceAccessInfoRole -from .resource_metadata_response_model import ResourceMetadataResponseModel -from .resource_metadata_response_model_anonymous_access_level_override import ( - ResourceMetadataResponseModelAnonymousAccessLevelOverride, -) -from .review_status import ReviewStatus -from .safety_common_model import SafetyCommonModel -from .safety_evaluation import SafetyEvaluation -from .safety_response_model import SafetyResponseModel -from .safety_rule import SafetyRule -from .save_voice_preview_request import SaveVoicePreviewRequest -from .secret_dependency_type import SecretDependencyType -from .segment_create_response import SegmentCreateResponse -from .segment_delete_response import SegmentDeleteResponse -from .segment_dub_response import SegmentDubResponse -from .segment_subtitle_frame import SegmentSubtitleFrame -from .segment_transcription_response import SegmentTranscriptionResponse -from .segment_translation_response import SegmentTranslationResponse -from .segment_update_response import SegmentUpdateResponse -from .segmented_json_export_options import SegmentedJsonExportOptions -from .send_text import SendText -from .send_text_multi import SendTextMulti -from .share_option_response_model import ShareOptionResponseModel -from .share_option_response_model_type import ShareOptionResponseModelType -from .similar_voice import SimilarVoice -from .similar_voice_category import SimilarVoiceCategory -from .similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse -from .single_test_run_request_model import SingleTestRunRequestModel -from .sip_media_encryption_enum import SipMediaEncryptionEnum -from .sip_trunk_credentials_request_model import SipTrunkCredentialsRequestModel -from .sip_trunk_outbound_call_response import SipTrunkOutboundCallResponse -from .sip_trunk_transport_enum import SipTrunkTransportEnum -from .sip_uri_transfer_destination import SipUriTransferDestination -from .skip_turn_tool_config import SkipTurnToolConfig -from .skip_turn_tool_response_model import SkipTurnToolResponseModel -from .song_metadata import SongMetadata -from .song_section import SongSection -from .speaker_audio_response_model import SpeakerAudioResponseModel -from .speaker_response_model import SpeakerResponseModel -from .speaker_segment import SpeakerSegment -from .speaker_separation_response_model import SpeakerSeparationResponseModel -from .speaker_separation_response_model_status import SpeakerSeparationResponseModelStatus -from .speaker_track import SpeakerTrack -from .speaker_updated_response import SpeakerUpdatedResponse -from .speech_history_item_response import SpeechHistoryItemResponse -from .speech_history_item_response_model_source import SpeechHistoryItemResponseModelSource -from .speech_history_item_response_model_voice_category import SpeechHistoryItemResponseModelVoiceCategory -from .speech_to_text_character_response_model import SpeechToTextCharacterResponseModel -from .speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel -from .speech_to_text_webhook_response_model import SpeechToTextWebhookResponseModel -from .speech_to_text_word_response_model import SpeechToTextWordResponseModel -from .speech_to_text_word_response_model_type import SpeechToTextWordResponseModelType -from .srt_export_options import SrtExportOptions -from .start_pvc_voice_training_response_model import StartPvcVoiceTrainingResponseModel -from .start_speaker_separation_response_model import StartSpeakerSeparationResponseModel -from .streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse -from .subscription import Subscription -from .subscription_extras_response_model import SubscriptionExtrasResponseModel -from .subscription_response import SubscriptionResponse -from .subscription_response_model_billing_period import SubscriptionResponseModelBillingPeriod -from .subscription_response_model_character_refresh_period import SubscriptionResponseModelCharacterRefreshPeriod -from .subscription_response_model_currency import SubscriptionResponseModelCurrency -from .subscription_status_type import SubscriptionStatusType -from .subscription_usage_response_model import SubscriptionUsageResponseModel -from .supported_voice import SupportedVoice -from .system_tool_config_input import SystemToolConfigInput -from .system_tool_config_input_params import ( - SystemToolConfigInputParams, - SystemToolConfigInputParams_EndCall, - SystemToolConfigInputParams_LanguageDetection, - SystemToolConfigInputParams_PlayKeypadTouchTone, - SystemToolConfigInputParams_SkipTurn, - SystemToolConfigInputParams_TransferToAgent, - SystemToolConfigInputParams_TransferToNumber, - SystemToolConfigInputParams_VoicemailDetection, -) -from .system_tool_config_output import SystemToolConfigOutput -from .system_tool_config_output_params import ( - SystemToolConfigOutputParams, - SystemToolConfigOutputParams_EndCall, - SystemToolConfigOutputParams_LanguageDetection, - SystemToolConfigOutputParams_PlayKeypadTouchTone, - SystemToolConfigOutputParams_SkipTurn, - SystemToolConfigOutputParams_TransferToAgent, - SystemToolConfigOutputParams_TransferToNumber, - SystemToolConfigOutputParams_VoicemailDetection, -) -from .telephony_provider import TelephonyProvider -from .test_condition_rationale_common_model import TestConditionRationaleCommonModel -from .test_condition_result_common_model import TestConditionResultCommonModel -from .test_run_metadata import TestRunMetadata -from .test_run_metadata_test_type import TestRunMetadataTestType -from .test_run_status import TestRunStatus -from .test_tool_result_model import TestToolResultModel -from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel -from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum -from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum -from .text_to_speech_stream_request import TextToSpeechStreamRequest -from .token_response_model import TokenResponseModel -from .tool import Tool -from .tool_annotations import ToolAnnotations -from .tool_mock_config import ToolMockConfig -from .tool_request_model import ToolRequestModel -from .tool_request_model_tool_config import ( - ToolRequestModelToolConfig, - ToolRequestModelToolConfig_Client, - ToolRequestModelToolConfig_Mcp, - ToolRequestModelToolConfig_System, - ToolRequestModelToolConfig_Webhook, -) -from .tool_response_model import ToolResponseModel -from .tool_response_model_tool_config import ( - ToolResponseModelToolConfig, - ToolResponseModelToolConfig_Client, - ToolResponseModelToolConfig_Mcp, - ToolResponseModelToolConfig_System, - ToolResponseModelToolConfig_Webhook, -) -from .tool_type import ToolType -from .tool_usage_stats_response_model import ToolUsageStatsResponseModel -from .tools_response_model import ToolsResponseModel -from .transfer_to_agent_tool_config import TransferToAgentToolConfig -from .transfer_to_agent_tool_result_error_model import TransferToAgentToolResultErrorModel -from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel -from .transfer_to_number_result_error_model import TransferToNumberResultErrorModel -from .transfer_to_number_result_sip_success_model import TransferToNumberResultSipSuccessModel -from .transfer_to_number_result_twilio_success_model import TransferToNumberResultTwilioSuccessModel -from .transfer_to_number_tool_config_input import TransferToNumberToolConfigInput -from .transfer_to_number_tool_config_output import TransferToNumberToolConfigOutput -from .transfer_type_enum import TransferTypeEnum -from .tts_conversational_config_input import TtsConversationalConfigInput -from .tts_conversational_config_output import TtsConversationalConfigOutput -from .tts_conversational_config_override import TtsConversationalConfigOverride -from .tts_conversational_config_override_config import TtsConversationalConfigOverrideConfig -from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride -from .tts_conversational_model import TtsConversationalModel -from .tts_model_family import TtsModelFamily -from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency -from .tts_output_format import TtsOutputFormat -from .turn_config import TurnConfig -from .turn_config_workflow_override import TurnConfigWorkflowOverride -from .turn_mode import TurnMode -from .twilio_outbound_call_response import TwilioOutboundCallResponse -from .txt_export_options import TxtExportOptions -from .unit_test_run_response_model import UnitTestRunResponseModel -from .unit_test_summary_response_model import UnitTestSummaryResponseModel -from .unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput -from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput -from .unit_test_tool_call_parameter import UnitTestToolCallParameter -from .unit_test_tool_call_parameter_eval import ( - UnitTestToolCallParameterEval, - UnitTestToolCallParameterEval_Exact, - UnitTestToolCallParameterEval_Llm, - UnitTestToolCallParameterEval_Regex, -) -from .update_audio_native_project_request import UpdateAudioNativeProjectRequest -from .update_chapter_request import UpdateChapterRequest -from .update_project_request import UpdateProjectRequest -from .update_pronunciation_dictionaries_request import UpdatePronunciationDictionariesRequest -from .update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel -from .url_avatar import UrlAvatar -from .usage_aggregation_interval import UsageAggregationInterval -from .usage_characters_response_model import UsageCharactersResponseModel -from .user import User -from .user_feedback import UserFeedback -from .user_feedback_score import UserFeedbackScore -from .utterance_response_model import UtteranceResponseModel -from .validation_error import ValidationError -from .validation_error_loc_item import ValidationErrorLocItem -from .verification_attempt_response import VerificationAttemptResponse -from .verified_voice_language_response_model import VerifiedVoiceLanguageResponseModel -from .verify_pvc_voice_captcha_response_model import VerifyPvcVoiceCaptchaResponseModel -from .voice import Voice -from .voice_design_preview_response import VoiceDesignPreviewResponse -from .voice_generation_parameter_option_response import VoiceGenerationParameterOptionResponse -from .voice_generation_parameter_response import VoiceGenerationParameterResponse -from .voice_mail_detection_result_success_model import VoiceMailDetectionResultSuccessModel -from .voice_preview_response_model import VoicePreviewResponseModel -from .voice_response_model_category import VoiceResponseModelCategory -from .voice_response_model_safety_control import VoiceResponseModelSafetyControl -from .voice_sample import VoiceSample -from .voice_sample_preview_response_model import VoiceSamplePreviewResponseModel -from .voice_sample_visual_waveform_response_model import VoiceSampleVisualWaveformResponseModel -from .voice_settings import VoiceSettings -from .voice_sharing_moderation_check_response_model import VoiceSharingModerationCheckResponseModel -from .voice_sharing_response import VoiceSharingResponse -from .voice_sharing_response_model_category import VoiceSharingResponseModelCategory -from .voice_sharing_state import VoiceSharingState -from .voice_verification_response import VoiceVerificationResponse -from .voicemail_detection_tool_config import VoicemailDetectionToolConfig -from .webhook_auth_method_type import WebhookAuthMethodType -from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput -from .webhook_tool_api_schema_config_input_method import WebhookToolApiSchemaConfigInputMethod -from .webhook_tool_api_schema_config_input_request_headers_value import ( - WebhookToolApiSchemaConfigInputRequestHeadersValue, -) -from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput -from .webhook_tool_api_schema_config_output_method import WebhookToolApiSchemaConfigOutputMethod -from .webhook_tool_api_schema_config_output_request_headers_value import ( - WebhookToolApiSchemaConfigOutputRequestHeadersValue, -) -from .webhook_tool_config_input import WebhookToolConfigInput -from .webhook_tool_config_output import WebhookToolConfigOutput -from .webhook_usage_type import WebhookUsageType -from .websocket_tts_client_message_multi import WebsocketTtsClientMessageMulti -from .websocket_tts_server_message_multi import WebsocketTtsServerMessageMulti -from .widget_config import WidgetConfig -from .widget_config_input_avatar import ( - WidgetConfigInputAvatar, - WidgetConfigInputAvatar_Image, - WidgetConfigInputAvatar_Orb, - WidgetConfigInputAvatar_Url, -) -from .widget_config_output_avatar import ( - WidgetConfigOutputAvatar, - WidgetConfigOutputAvatar_Image, - WidgetConfigOutputAvatar_Orb, - WidgetConfigOutputAvatar_Url, -) -from .widget_config_response import WidgetConfigResponse -from .widget_config_response_model_avatar import ( - WidgetConfigResponseModelAvatar, - WidgetConfigResponseModelAvatar_Image, - WidgetConfigResponseModelAvatar_Orb, - WidgetConfigResponseModelAvatar_Url, -) -from .widget_expandable import WidgetExpandable -from .widget_feedback_mode import WidgetFeedbackMode -from .widget_language_preset import WidgetLanguagePreset -from .widget_language_preset_response import WidgetLanguagePresetResponse -from .widget_placement import WidgetPlacement -from .widget_styles import WidgetStyles -from .widget_text_contents import WidgetTextContents -from .workflow_edge_model import WorkflowEdgeModel -from .workflow_edge_model_backward_condition import ( - WorkflowEdgeModelBackwardCondition, - WorkflowEdgeModelBackwardCondition_Llm, - WorkflowEdgeModelBackwardCondition_Result, - WorkflowEdgeModelBackwardCondition_Unconditional, -) -from .workflow_edge_model_forward_condition import ( - WorkflowEdgeModelForwardCondition, - WorkflowEdgeModelForwardCondition_Llm, - WorkflowEdgeModelForwardCondition_Result, - WorkflowEdgeModelForwardCondition_Unconditional, -) -from .workflow_end_node_model import WorkflowEndNodeModel -from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel -from .workflow_llm_condition_model import WorkflowLlmConditionModel -from .workflow_override_agent_node_model import WorkflowOverrideAgentNodeModel -from .workflow_phone_number_node_model import WorkflowPhoneNumberNodeModel -from .workflow_phone_number_node_model_transfer_destination import ( - WorkflowPhoneNumberNodeModelTransferDestination, - WorkflowPhoneNumberNodeModelTransferDestination_Phone, - WorkflowPhoneNumberNodeModelTransferDestination_SipUri, -) -from .workflow_result_condition_model import WorkflowResultConditionModel -from .workflow_standalone_agent_node_model import WorkflowStandaloneAgentNodeModel -from .workflow_start_node_model import WorkflowStartNodeModel -from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel -from .workflow_tool_locator import WorkflowToolLocator -from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput -from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput -from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem -from .workflow_tool_node_model import WorkflowToolNodeModel -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput -from .workflow_tool_response_model_input_steps_item import ( - WorkflowToolResponseModelInputStepsItem, - WorkflowToolResponseModelInputStepsItem_Edge, - WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, - WorkflowToolResponseModelInputStepsItem_NestedTools, -) -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput -from .workflow_tool_response_model_output_steps_item import ( - WorkflowToolResponseModelOutputStepsItem, - WorkflowToolResponseModelOutputStepsItem_Edge, - WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, - WorkflowToolResponseModelOutputStepsItem_NestedTools, -) -from .workflow_unconditional_model import WorkflowUnconditionalModel -from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel -from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel -from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem -from .workspace_batch_calls_response import WorkspaceBatchCallsResponse -from .workspace_create_api_key_response_model import WorkspaceCreateApiKeyResponseModel -from .workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel -from .workspace_resource_type import WorkspaceResourceType -from .workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel -from .workspace_service_account_response_model import WorkspaceServiceAccountResponseModel -from .workspace_webhook_list_response_model import WorkspaceWebhookListResponseModel -from .workspace_webhook_response_model import WorkspaceWebhookResponseModel -from .workspace_webhook_usage_response_model import WorkspaceWebhookUsageResponseModel +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .add_chapter_response_model import AddChapterResponseModel + from .add_knowledge_base_response_model import AddKnowledgeBaseResponseModel + from .add_project_request import AddProjectRequest + from .add_project_response_model import AddProjectResponseModel + from .add_pronunciation_dictionary_response_model import AddPronunciationDictionaryResponseModel + from .add_pronunciation_dictionary_response_model_permission_on_resource import ( + AddPronunciationDictionaryResponseModelPermissionOnResource, + ) + from .add_sharing_voice_request import AddSharingVoiceRequest + from .add_voice_ivc_response_model import AddVoiceIvcResponseModel + from .add_voice_response_model import AddVoiceResponseModel + from .add_workspace_group_member_response_model import AddWorkspaceGroupMemberResponseModel + from .add_workspace_invite_response_model import AddWorkspaceInviteResponseModel + from .additional_format_response_model import AdditionalFormatResponseModel + from .additional_formats import AdditionalFormats + from .adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel + from .age import Age + from .agent_call_limits import AgentCallLimits + from .agent_config import AgentConfig + from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride + from .agent_config_override import AgentConfigOverride + from .agent_config_override_config import AgentConfigOverrideConfig + from .agent_failure_response_example import AgentFailureResponseExample + from .agent_metadata_response_model import AgentMetadataResponseModel + from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel + from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel + from .agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel + from .agent_successful_response_example import AgentSuccessfulResponseExample + from .agent_summary_response_model import AgentSummaryResponseModel + from .agent_testing_settings import AgentTestingSettings + from .agent_transfer import AgentTransfer + from .agent_workflow_request_model import AgentWorkflowRequestModel + from .agent_workflow_request_model_nodes_value import ( + AgentWorkflowRequestModelNodesValue, + AgentWorkflowRequestModelNodesValue_End, + AgentWorkflowRequestModelNodesValue_OverrideAgent, + AgentWorkflowRequestModelNodesValue_PhoneNumber, + AgentWorkflowRequestModelNodesValue_StandaloneAgent, + AgentWorkflowRequestModelNodesValue_Start, + AgentWorkflowRequestModelNodesValue_Tool, + ) + from .agent_workspace_overrides_input import AgentWorkspaceOverridesInput + from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput + from .alignment import Alignment + from .allowlist_item import AllowlistItem + from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput + from .array_json_schema_property_input_items import ArrayJsonSchemaPropertyInputItems + from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput + from .array_json_schema_property_output_items import ArrayJsonSchemaPropertyOutputItems + from .asr_conversational_config import AsrConversationalConfig + from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride + from .asr_input_format import AsrInputFormat + from .asr_provider import AsrProvider + from .asr_quality import AsrQuality + from .attached_test_model import AttachedTestModel + from .audio_native_create_project_response_model import AudioNativeCreateProjectResponseModel + from .audio_native_edit_content_response_model import AudioNativeEditContentResponseModel + from .audio_native_project_settings_response_model import AudioNativeProjectSettingsResponseModel + from .audio_native_project_settings_response_model_status import AudioNativeProjectSettingsResponseModelStatus + from .audio_output import AudioOutput + from .audio_output_multi import AudioOutputMulti + from .audio_with_timestamps_response import AudioWithTimestampsResponse + from .auth_connection_locator import AuthConnectionLocator + from .auth_settings import AuthSettings + from .authorization_method import AuthorizationMethod + from .bad_request_error_body import BadRequestErrorBody + from .ban_reason_type import BanReasonType + from .batch_call_detailed_response import BatchCallDetailedResponse + from .batch_call_recipient_status import BatchCallRecipientStatus + from .batch_call_response import BatchCallResponse + from .batch_call_status import BatchCallStatus + from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age import ( + BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge, + ) + from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_gender import ( + BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender, + ) + from .breakdown_types import BreakdownTypes + from .built_in_tools_input import BuiltInToolsInput + from .built_in_tools_output import BuiltInToolsOutput + from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride + from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel + from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType + from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType + from .caption_style_horizontal_placement_model import CaptionStyleHorizontalPlacementModel + from .caption_style_horizontal_placement_model_align import CaptionStyleHorizontalPlacementModelAlign + from .caption_style_model import CaptionStyleModel + from .caption_style_model_text_align import CaptionStyleModelTextAlign + from .caption_style_model_text_style import CaptionStyleModelTextStyle + from .caption_style_model_text_weight import CaptionStyleModelTextWeight + from .caption_style_section_animation_model import CaptionStyleSectionAnimationModel + from .caption_style_section_animation_model_enter_type import CaptionStyleSectionAnimationModelEnterType + from .caption_style_section_animation_model_exit_type import CaptionStyleSectionAnimationModelExitType + from .caption_style_template_model import CaptionStyleTemplateModel + from .caption_style_vertical_placement_model import CaptionStyleVerticalPlacementModel + from .caption_style_vertical_placement_model_align import CaptionStyleVerticalPlacementModelAlign + from .caption_style_word_animation_model import CaptionStyleWordAnimationModel + from .caption_style_word_animation_model_enter_type import CaptionStyleWordAnimationModelEnterType + from .caption_style_word_animation_model_exit_type import CaptionStyleWordAnimationModelExitType + from .chapter_content_block_extendable_node_response_model import ChapterContentBlockExtendableNodeResponseModel + from .chapter_content_block_input_model import ChapterContentBlockInputModel + from .chapter_content_block_input_model_sub_type import ChapterContentBlockInputModelSubType + from .chapter_content_block_response_model import ChapterContentBlockResponseModel + from .chapter_content_block_response_model_nodes_item import ( + ChapterContentBlockResponseModelNodesItem, + ChapterContentBlockResponseModelNodesItem_Other, + ChapterContentBlockResponseModelNodesItem_TtsNode, + ) + from .chapter_content_block_tts_node_response_model import ChapterContentBlockTtsNodeResponseModel + from .chapter_content_input_model import ChapterContentInputModel + from .chapter_content_paragraph_tts_node_input_model import ChapterContentParagraphTtsNodeInputModel + from .chapter_content_response_model import ChapterContentResponseModel + from .chapter_response import ChapterResponse + from .chapter_snapshot_extended_response_model import ChapterSnapshotExtendedResponseModel + from .chapter_snapshot_response import ChapterSnapshotResponse + from .chapter_snapshots_response import ChapterSnapshotsResponse + from .chapter_state import ChapterState + from .chapter_statistics_response import ChapterStatisticsResponse + from .chapter_with_content_response_model import ChapterWithContentResponseModel + from .chapter_with_content_response_model_state import ChapterWithContentResponseModelState + from .character_alignment_model import CharacterAlignmentModel + from .character_alignment_response_model import CharacterAlignmentResponseModel + from .character_usage_response import CharacterUsageResponse + from .client_event import ClientEvent + from .client_tool_config_input import ClientToolConfigInput + from .client_tool_config_output import ClientToolConfigOutput + from .close_connection import CloseConnection + from .close_context import CloseContext + from .close_socket import CloseSocket + from .conv_ai_dynamic_variable import ConvAiDynamicVariable + from .conv_ai_secret_locator import ConvAiSecretLocator + from .conv_ai_stored_secret_dependencies import ConvAiStoredSecretDependencies + from .conv_ai_stored_secret_dependencies_agents_item import ( + ConvAiStoredSecretDependenciesAgentsItem, + ConvAiStoredSecretDependenciesAgentsItem_Available, + ConvAiStoredSecretDependenciesAgentsItem_Unknown, + ) + from .conv_ai_stored_secret_dependencies_tools_item import ( + ConvAiStoredSecretDependenciesToolsItem, + ConvAiStoredSecretDependenciesToolsItem_Available, + ConvAiStoredSecretDependenciesToolsItem_Unknown, + ) + from .conv_ai_user_secret_db_model import ConvAiUserSecretDbModel + from .conv_ai_webhooks import ConvAiWebhooks + from .conv_ai_workspace_stored_secret_config import ConvAiWorkspaceStoredSecretConfig + from .conversation_charging_common_model import ConversationChargingCommonModel + from .conversation_config import ConversationConfig + from .conversation_config_client_override_config_input import ConversationConfigClientOverrideConfigInput + from .conversation_config_client_override_config_output import ConversationConfigClientOverrideConfigOutput + from .conversation_config_client_override_input import ConversationConfigClientOverrideInput + from .conversation_config_client_override_output import ConversationConfigClientOverrideOutput + from .conversation_config_override import ConversationConfigOverride + from .conversation_config_override_config import ConversationConfigOverrideConfig + from .conversation_config_workflow_override import ConversationConfigWorkflowOverride + from .conversation_deletion_settings import ConversationDeletionSettings + from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel + from .conversation_history_batch_call_model import ConversationHistoryBatchCallModel + from .conversation_history_eleven_assistant_common_model import ConversationHistoryElevenAssistantCommonModel + from .conversation_history_error_common_model import ConversationHistoryErrorCommonModel + from .conversation_history_evaluation_criteria_result_common_model import ( + ConversationHistoryEvaluationCriteriaResultCommonModel, + ) + from .conversation_history_feedback_common_model import ConversationHistoryFeedbackCommonModel + from .conversation_history_metadata_common_model import ConversationHistoryMetadataCommonModel + from .conversation_history_metadata_common_model_phone_call import ( + ConversationHistoryMetadataCommonModelPhoneCall, + ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, + ConversationHistoryMetadataCommonModelPhoneCall_Twilio, + ) + from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel + from .conversation_history_multivoice_message_part_model import ConversationHistoryMultivoiceMessagePartModel + from .conversation_history_rag_usage_common_model import ConversationHistoryRagUsageCommonModel + from .conversation_history_sip_trunking_phone_call_model import ConversationHistorySipTrunkingPhoneCallModel + from .conversation_history_sip_trunking_phone_call_model_direction import ( + ConversationHistorySipTrunkingPhoneCallModelDirection, + ) + from .conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput + from .conversation_history_transcript_common_model_input_role import ( + ConversationHistoryTranscriptCommonModelInputRole, + ) + from .conversation_history_transcript_common_model_input_source_medium import ( + ConversationHistoryTranscriptCommonModelInputSourceMedium, + ) + from .conversation_history_transcript_common_model_input_tool_results_item import ( + ConversationHistoryTranscriptCommonModelInputToolResultsItem, + ) + from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput + from .conversation_history_transcript_common_model_output_role import ( + ConversationHistoryTranscriptCommonModelOutputRole, + ) + from .conversation_history_transcript_common_model_output_source_medium import ( + ConversationHistoryTranscriptCommonModelOutputSourceMedium, + ) + from .conversation_history_transcript_common_model_output_tool_results_item import ( + ConversationHistoryTranscriptCommonModelOutputToolResultsItem, + ) + from .conversation_history_transcript_other_tools_result_common_model import ( + ConversationHistoryTranscriptOtherToolsResultCommonModel, + ) + from .conversation_history_transcript_other_tools_result_common_model_type import ( + ConversationHistoryTranscriptOtherToolsResultCommonModelType, + ) + from .conversation_history_transcript_system_tool_result_common_model import ( + ConversationHistoryTranscriptSystemToolResultCommonModel, + ) + from .conversation_history_transcript_system_tool_result_common_model_result import ( + ConversationHistoryTranscriptSystemToolResultCommonModelResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess, + ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess, + ) + from .conversation_history_transcript_tool_call_client_details import ( + ConversationHistoryTranscriptToolCallClientDetails, + ) + from .conversation_history_transcript_tool_call_common_model import ConversationHistoryTranscriptToolCallCommonModel + from .conversation_history_transcript_tool_call_common_model_tool_details import ( + ConversationHistoryTranscriptToolCallCommonModelToolDetails, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp, + ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook, + ) + from .conversation_history_transcript_tool_call_mcp_details import ConversationHistoryTranscriptToolCallMcpDetails + from .conversation_history_transcript_tool_call_webhook_details import ( + ConversationHistoryTranscriptToolCallWebhookDetails, + ) + from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, + ) + from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, + ) + from .conversation_history_twilio_phone_call_model import ConversationHistoryTwilioPhoneCallModel + from .conversation_history_twilio_phone_call_model_direction import ConversationHistoryTwilioPhoneCallModelDirection + from .conversation_initiation_client_data_config_input import ConversationInitiationClientDataConfigInput + from .conversation_initiation_client_data_config_output import ConversationInitiationClientDataConfigOutput + from .conversation_initiation_client_data_internal import ConversationInitiationClientDataInternal + from .conversation_initiation_client_data_internal_dynamic_variables_value import ( + ConversationInitiationClientDataInternalDynamicVariablesValue, + ) + from .conversation_initiation_client_data_request_input import ConversationInitiationClientDataRequestInput + from .conversation_initiation_client_data_request_input_dynamic_variables_value import ( + ConversationInitiationClientDataRequestInputDynamicVariablesValue, + ) + from .conversation_initiation_client_data_request_output import ConversationInitiationClientDataRequestOutput + from .conversation_initiation_client_data_request_output_dynamic_variables_value import ( + ConversationInitiationClientDataRequestOutputDynamicVariablesValue, + ) + from .conversation_initiation_client_data_webhook import ConversationInitiationClientDataWebhook + from .conversation_initiation_client_data_webhook_request_headers_value import ( + ConversationInitiationClientDataWebhookRequestHeadersValue, + ) + from .conversation_initiation_source import ConversationInitiationSource + from .conversation_initiation_source_info import ConversationInitiationSourceInfo + from .conversation_signed_url_response_model import ConversationSignedUrlResponseModel + from .conversation_simulation_specification import ConversationSimulationSpecification + from .conversation_simulation_specification_dynamic_variables_value import ( + ConversationSimulationSpecificationDynamicVariablesValue, + ) + from .conversation_summary_response_model import ConversationSummaryResponseModel + from .conversation_summary_response_model_direction import ConversationSummaryResponseModelDirection + from .conversation_summary_response_model_status import ConversationSummaryResponseModelStatus + from .conversation_token_db_model import ConversationTokenDbModel + from .conversation_token_purpose import ConversationTokenPurpose + from .conversation_turn_metrics import ConversationTurnMetrics + from .conversational_config import ConversationalConfig + from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride + from .convert_chapter_response_model import ConvertChapterResponseModel + from .convert_project_response_model import ConvertProjectResponseModel + from .create_agent_response_model import CreateAgentResponseModel + from .create_audio_native_project_request import CreateAudioNativeProjectRequest + from .create_phone_number_response_model import CreatePhoneNumberResponseModel + from .create_previously_generated_voice_request import CreatePreviouslyGeneratedVoiceRequest + from .create_pronunciation_dictionary_response_model import CreatePronunciationDictionaryResponseModel + from .create_sip_trunk_phone_number_request import CreateSipTrunkPhoneNumberRequest + from .create_transcript_request import CreateTranscriptRequest + from .create_twilio_phone_number_request import CreateTwilioPhoneNumberRequest + from .create_unit_test_response_model import CreateUnitTestResponseModel + from .custom_llm import CustomLlm + from .custom_llm_request_headers_value import CustomLlmRequestHeadersValue + from .dashboard_call_success_chart_model import DashboardCallSuccessChartModel + from .dashboard_criteria_chart_model import DashboardCriteriaChartModel + from .dashboard_data_collection_chart_model import DashboardDataCollectionChartModel + from .data_collection_result_common_model import DataCollectionResultCommonModel + from .delete_chapter_request import DeleteChapterRequest + from .delete_chapter_response_model import DeleteChapterResponseModel + from .delete_dubbing_response_model import DeleteDubbingResponseModel + from .delete_history_item_response import DeleteHistoryItemResponse + from .delete_project_request import DeleteProjectRequest + from .delete_project_response_model import DeleteProjectResponseModel + from .delete_sample_response import DeleteSampleResponse + from .delete_voice_response_model import DeleteVoiceResponseModel + from .delete_voice_sample_response_model import DeleteVoiceSampleResponseModel + from .delete_workspace_group_member_response_model import DeleteWorkspaceGroupMemberResponseModel + from .delete_workspace_invite_response_model import DeleteWorkspaceInviteResponseModel + from .dependent_available_agent_identifier import DependentAvailableAgentIdentifier + from .dependent_available_agent_identifier_access_level import DependentAvailableAgentIdentifierAccessLevel + from .dependent_available_tool_identifier import DependentAvailableToolIdentifier + from .dependent_available_tool_identifier_access_level import DependentAvailableToolIdentifierAccessLevel + from .dependent_phone_number_identifier import DependentPhoneNumberIdentifier + from .dependent_unknown_agent_identifier import DependentUnknownAgentIdentifier + from .dependent_unknown_tool_identifier import DependentUnknownToolIdentifier + from .detailed_music_response import DetailedMusicResponse + from .dialogue_input import DialogueInput + from .dialogue_input_response_model import DialogueInputResponseModel + from .do_dubbing_response import DoDubbingResponse + from .document_usage_mode_enum import DocumentUsageModeEnum + from .docx_export_options import DocxExportOptions + from .dubbed_segment import DubbedSegment + from .dubbing_media_metadata import DubbingMediaMetadata + from .dubbing_media_reference import DubbingMediaReference + from .dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel + from .dubbing_metadata_response import DubbingMetadataResponse + from .dubbing_release_channel import DubbingReleaseChannel + from .dubbing_render_response_model import DubbingRenderResponseModel + from .dubbing_resource import DubbingResource + from .dynamic_variable_assignment import DynamicVariableAssignment + from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel + from .dynamic_variables_config import DynamicVariablesConfig + from .dynamic_variables_config_dynamic_variable_placeholders_value import ( + DynamicVariablesConfigDynamicVariablePlaceholdersValue, + ) + from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride + from .dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value import ( + DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue, + ) + from .edit_chapter_response_model import EditChapterResponseModel + from .edit_project_response_model import EditProjectResponseModel + from .edit_voice_response_model import EditVoiceResponseModel + from .edit_voice_settings_request import EditVoiceSettingsRequest + from .edit_voice_settings_response_model import EditVoiceSettingsResponseModel + from .embed_variant import EmbedVariant + from .embedding_model_enum import EmbeddingModelEnum + from .end_call_tool_config import EndCallToolConfig + from .end_call_tool_result_model import EndCallToolResultModel + from .evaluation_settings import EvaluationSettings + from .evaluation_success_result import EvaluationSuccessResult + from .exact_parameter_evaluation_strategy import ExactParameterEvaluationStrategy + from .export_options import ( + ExportOptions, + ExportOptions_Docx, + ExportOptions_Html, + ExportOptions_Pdf, + ExportOptions_SegmentedJson, + ExportOptions_Srt, + ExportOptions_Txt, + ) + from .extended_subscription_response_model_billing_period import ExtendedSubscriptionResponseModelBillingPeriod + from .extended_subscription_response_model_character_refresh_period import ( + ExtendedSubscriptionResponseModelCharacterRefreshPeriod, + ) + from .extended_subscription_response_model_currency import ExtendedSubscriptionResponseModelCurrency + from .extended_subscription_response_model_pending_change import ExtendedSubscriptionResponseModelPendingChange + from .feature_status_common_model import FeatureStatusCommonModel + from .features_usage_common_model import FeaturesUsageCommonModel + from .feedback_item import FeedbackItem + from .final_output import FinalOutput + from .final_output_multi import FinalOutputMulti + from .fine_tuning_response import FineTuningResponse + from .fine_tuning_response_model_state_value import FineTuningResponseModelStateValue + from .flush_context import FlushContext + from .forced_alignment_character_response_model import ForcedAlignmentCharacterResponseModel + from .forced_alignment_response_model import ForcedAlignmentResponseModel + from .forced_alignment_word_response_model import ForcedAlignmentWordResponseModel + from .gender import Gender + from .generate_voice_request import GenerateVoiceRequest + from .generation_config import GenerationConfig + from .get_agent_embed_response_model import GetAgentEmbedResponseModel + from .get_agent_knowledgebase_size_response_model import GetAgentKnowledgebaseSizeResponseModel + from .get_agent_link_response_model import GetAgentLinkResponseModel + from .get_agent_response_model import GetAgentResponseModel + from .get_agent_response_model_phone_numbers_item import ( + GetAgentResponseModelPhoneNumbersItem, + GetAgentResponseModelPhoneNumbersItem_SipTrunk, + GetAgentResponseModelPhoneNumbersItem_Twilio, + ) + from .get_agents_page_response_model import GetAgentsPageResponseModel + from .get_audio_native_project_settings_response_model import GetAudioNativeProjectSettingsResponseModel + from .get_chapter_request import GetChapterRequest + from .get_chapter_snapshots_request import GetChapterSnapshotsRequest + from .get_chapters_request import GetChaptersRequest + from .get_chapters_response import GetChaptersResponse + from .get_conv_ai_dashboard_settings_response_model import GetConvAiDashboardSettingsResponseModel + from .get_conv_ai_dashboard_settings_response_model_charts_item import ( + GetConvAiDashboardSettingsResponseModelChartsItem, + GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess, + GetConvAiDashboardSettingsResponseModelChartsItem_Criteria, + GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection, + ) + from .get_conv_ai_settings_response_model import GetConvAiSettingsResponseModel + from .get_conversation_response_model import GetConversationResponseModel + from .get_conversation_response_model_status import GetConversationResponseModelStatus + from .get_conversations_page_response_model import GetConversationsPageResponseModel + from .get_knowledge_base_dependent_agents_response_model import GetKnowledgeBaseDependentAgentsResponseModel + from .get_knowledge_base_dependent_agents_response_model_agents_item import ( + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem, + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available, + GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown, + ) + from .get_knowledge_base_file_response_model import GetKnowledgeBaseFileResponseModel + from .get_knowledge_base_list_response_model import GetKnowledgeBaseListResponseModel + from .get_knowledge_base_list_response_model_documents_item import ( + GetKnowledgeBaseListResponseModelDocumentsItem, + GetKnowledgeBaseListResponseModelDocumentsItem_File, + GetKnowledgeBaseListResponseModelDocumentsItem_Text, + GetKnowledgeBaseListResponseModelDocumentsItem_Url, + ) + from .get_knowledge_base_summary_file_response_model import GetKnowledgeBaseSummaryFileResponseModel + from .get_knowledge_base_summary_file_response_model_dependent_agents_item import ( + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown, + ) + from .get_knowledge_base_summary_text_response_model import GetKnowledgeBaseSummaryTextResponseModel + from .get_knowledge_base_summary_text_response_model_dependent_agents_item import ( + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown, + ) + from .get_knowledge_base_summary_url_response_model import GetKnowledgeBaseSummaryUrlResponseModel + from .get_knowledge_base_summary_url_response_model_dependent_agents_item import ( + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem, + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available, + GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown, + ) + from .get_knowledge_base_text_response_model import GetKnowledgeBaseTextResponseModel + from .get_knowledge_base_url_response_model import GetKnowledgeBaseUrlResponseModel + from .get_library_voices_response import GetLibraryVoicesResponse + from .get_phone_number_inbound_sip_trunk_config_response_model import ( + GetPhoneNumberInboundSipTrunkConfigResponseModel, + ) + from .get_phone_number_outbound_sip_trunk_config_response_model import ( + GetPhoneNumberOutboundSipTrunkConfigResponseModel, + ) + from .get_phone_number_response import GetPhoneNumberResponse + from .get_phone_number_sip_trunk_response_model import GetPhoneNumberSipTrunkResponseModel + from .get_phone_number_twilio_response_model import GetPhoneNumberTwilioResponseModel + from .get_project_request import GetProjectRequest + from .get_projects_request import GetProjectsRequest + from .get_projects_response import GetProjectsResponse + from .get_pronunciation_dictionaries_metadata_response_model import ( + GetPronunciationDictionariesMetadataResponseModel, + ) + from .get_pronunciation_dictionaries_response import GetPronunciationDictionariesResponse + from .get_pronunciation_dictionary_metadata_response import GetPronunciationDictionaryMetadataResponse + from .get_pronunciation_dictionary_metadata_response_model_permission_on_resource import ( + GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, + ) + from .get_pronunciation_dictionary_response import GetPronunciationDictionaryResponse + from .get_speech_history_response import GetSpeechHistoryResponse + from .get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel + from .get_tests_page_response_model import GetTestsPageResponseModel + from .get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel + from .get_tool_dependent_agents_response_model import GetToolDependentAgentsResponseModel + from .get_tool_dependent_agents_response_model_agents_item import ( + GetToolDependentAgentsResponseModelAgentsItem, + GetToolDependentAgentsResponseModelAgentsItem_Available, + GetToolDependentAgentsResponseModelAgentsItem_Unknown, + ) + from .get_unit_test_response_model import GetUnitTestResponseModel + from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue + from .get_voices_response import GetVoicesResponse + from .get_voices_v_2_response import GetVoicesV2Response + from .get_workspace_secrets_response_model import GetWorkspaceSecretsResponseModel + from .history_alignment_response_model import HistoryAlignmentResponseModel + from .history_alignments_response_model import HistoryAlignmentsResponseModel + from .history_item_response import HistoryItemResponse + from .html_export_options import HtmlExportOptions + from .http_validation_error import HttpValidationError + from .image_avatar import ImageAvatar + from .inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel + from .initialise_context import InitialiseContext + from .initialize_connection import InitializeConnection + from .initialize_connection_multi import InitializeConnectionMulti + from .integration_type import IntegrationType + from .invoice_response import InvoiceResponse + from .invoice_response_model_payment_intent_status import InvoiceResponseModelPaymentIntentStatus + from .keep_context_alive import KeepContextAlive + from .knowledge_base_document_chunk_response_model import KnowledgeBaseDocumentChunkResponseModel + from .knowledge_base_document_metadata_response_model import KnowledgeBaseDocumentMetadataResponseModel + from .knowledge_base_document_type import KnowledgeBaseDocumentType + from .knowledge_base_locator import KnowledgeBaseLocator + from .language_added_response import LanguageAddedResponse + from .language_detection_tool_config import LanguageDetectionToolConfig + from .language_detection_tool_result_model import LanguageDetectionToolResultModel + from .language_preset_input import LanguagePresetInput + from .language_preset_output import LanguagePresetOutput + from .language_preset_translation import LanguagePresetTranslation + from .language_response import LanguageResponse + from .library_voice_response import LibraryVoiceResponse + from .library_voice_response_model_category import LibraryVoiceResponseModelCategory + from .list_mcp_tools_response_model import ListMcpToolsResponseModel + from .literal_json_schema_property import LiteralJsonSchemaProperty + from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue + from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType + from .llm import Llm + from .llm_category_usage import LlmCategoryUsage + from .llm_input_output_tokens_usage import LlmInputOutputTokensUsage + from .llm_parameter_evaluation_strategy import LlmParameterEvaluationStrategy + from .llm_tokens_category_usage import LlmTokensCategoryUsage + from .llm_usage_calculator_llm_response_model import LlmUsageCalculatorLlmResponseModel + from .llm_usage_calculator_response_model import LlmUsageCalculatorResponseModel + from .llm_usage_input import LlmUsageInput + from .llm_usage_output import LlmUsageOutput + from .manual_verification_file_response import ManualVerificationFileResponse + from .manual_verification_response import ManualVerificationResponse + from .mcp_approval_policy import McpApprovalPolicy + from .mcp_server_config_input import McpServerConfigInput + from .mcp_server_config_input_request_headers_value import McpServerConfigInputRequestHeadersValue + from .mcp_server_config_input_secret_token import McpServerConfigInputSecretToken + from .mcp_server_config_input_url import McpServerConfigInputUrl + from .mcp_server_config_output import McpServerConfigOutput + from .mcp_server_config_output_request_headers_value import McpServerConfigOutputRequestHeadersValue + from .mcp_server_config_output_secret_token import McpServerConfigOutputSecretToken + from .mcp_server_config_output_url import McpServerConfigOutputUrl + from .mcp_server_metadata_response_model import McpServerMetadataResponseModel + from .mcp_server_response_model import McpServerResponseModel + from .mcp_server_response_model_dependent_agents_item import ( + McpServerResponseModelDependentAgentsItem, + McpServerResponseModelDependentAgentsItem_Available, + McpServerResponseModelDependentAgentsItem_Unknown, + ) + from .mcp_server_transport import McpServerTransport + from .mcp_servers_response_model import McpServersResponseModel + from .mcp_tool_approval_hash import McpToolApprovalHash + from .mcp_tool_approval_policy import McpToolApprovalPolicy + from .metric_record import MetricRecord + from .metric_type import MetricType + from .model import Model + from .model_rates_response_model import ModelRatesResponseModel + from .model_response_model_concurrency_group import ModelResponseModelConcurrencyGroup + from .model_settings_response_model import ModelSettingsResponseModel + from .moderation_status_response_model import ModerationStatusResponseModel + from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus + from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus + from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel + from .multipart_music_response import MultipartMusicResponse + from .music_prompt import MusicPrompt + from .normalized_alignment import NormalizedAlignment + from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput + from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue + from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput + from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue + from .orb_avatar import OrbAvatar + from .outbound_call_recipient import OutboundCallRecipient + from .outbound_call_recipient_response_model import OutboundCallRecipientResponseModel + from .outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel + from .output_format import OutputFormat + from .pdf_export_options import PdfExportOptions + from .pending_cancellation_response_model import PendingCancellationResponseModel + from .pending_subscription_switch_response_model import PendingSubscriptionSwitchResponseModel + from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier + from .phone_number_agent_info import PhoneNumberAgentInfo + from .phone_number_transfer import PhoneNumberTransfer + from .phone_number_transfer_destination import PhoneNumberTransferDestination + from .phone_number_transfer_transfer_destination import ( + PhoneNumberTransferTransferDestination, + PhoneNumberTransferTransferDestination_Phone, + PhoneNumberTransferTransferDestination_SipUri, + ) + from .play_dtmf_result_error_model import PlayDtmfResultErrorModel + from .play_dtmf_result_success_model import PlayDtmfResultSuccessModel + from .play_dtmf_tool_config import PlayDtmfToolConfig + from .podcast_bulletin_mode import PodcastBulletinMode + from .podcast_bulletin_mode_data import PodcastBulletinModeData + from .podcast_conversation_mode import PodcastConversationMode + from .podcast_conversation_mode_data import PodcastConversationModeData + from .podcast_project_response_model import PodcastProjectResponseModel + from .podcast_text_source import PodcastTextSource + from .podcast_url_source import PodcastUrlSource + from .position import Position + from .post_agent_avatar_response_model import PostAgentAvatarResponseModel + from .post_workspace_secret_response_model import PostWorkspaceSecretResponseModel + from .privacy_config import PrivacyConfig + from .project_creation_meta_response_model import ProjectCreationMetaResponseModel + from .project_creation_meta_response_model_status import ProjectCreationMetaResponseModelStatus + from .project_creation_meta_response_model_type import ProjectCreationMetaResponseModelType + from .project_extended_response import ProjectExtendedResponse + from .project_extended_response_model_access_level import ProjectExtendedResponseModelAccessLevel + from .project_extended_response_model_apply_text_normalization import ( + ProjectExtendedResponseModelApplyTextNormalization, + ) + from .project_extended_response_model_fiction import ProjectExtendedResponseModelFiction + from .project_extended_response_model_quality_preset import ProjectExtendedResponseModelQualityPreset + from .project_extended_response_model_source_type import ProjectExtendedResponseModelSourceType + from .project_extended_response_model_target_audience import ProjectExtendedResponseModelTargetAudience + from .project_response import ProjectResponse + from .project_response_model_access_level import ProjectResponseModelAccessLevel + from .project_response_model_fiction import ProjectResponseModelFiction + from .project_response_model_source_type import ProjectResponseModelSourceType + from .project_response_model_target_audience import ProjectResponseModelTargetAudience + from .project_snapshot_extended_response_model import ProjectSnapshotExtendedResponseModel + from .project_snapshot_response import ProjectSnapshotResponse + from .project_snapshots_response import ProjectSnapshotsResponse + from .project_state import ProjectState + from .prompt_agent import PromptAgent + from .prompt_agent_api_model_input import PromptAgentApiModelInput + from .prompt_agent_api_model_input_tools_item import ( + PromptAgentApiModelInputToolsItem, + PromptAgentApiModelInputToolsItem_Client, + PromptAgentApiModelInputToolsItem_Mcp, + PromptAgentApiModelInputToolsItem_System, + PromptAgentApiModelInputToolsItem_Webhook, + ) + from .prompt_agent_api_model_output import PromptAgentApiModelOutput + from .prompt_agent_api_model_output_tools_item import ( + PromptAgentApiModelOutputToolsItem, + PromptAgentApiModelOutputToolsItem_Client, + PromptAgentApiModelOutputToolsItem_Mcp, + PromptAgentApiModelOutputToolsItem_System, + PromptAgentApiModelOutputToolsItem_Webhook, + ) + from .prompt_agent_api_model_override import PromptAgentApiModelOverride + from .prompt_agent_api_model_override_config import PromptAgentApiModelOverrideConfig + from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride + from .prompt_agent_api_model_workflow_override_tools_item import ( + PromptAgentApiModelWorkflowOverrideToolsItem, + PromptAgentApiModelWorkflowOverrideToolsItem_Client, + PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideToolsItem_System, + PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + ) + from .prompt_agent_db_model import PromptAgentDbModel + from .prompt_evaluation_criteria import PromptEvaluationCriteria + from .pronunciation_dictionary_alias_rule_request_model import PronunciationDictionaryAliasRuleRequestModel + from .pronunciation_dictionary_locator import PronunciationDictionaryLocator + from .pronunciation_dictionary_locator_response_model import PronunciationDictionaryLocatorResponseModel + from .pronunciation_dictionary_phoneme_rule_request_model import PronunciationDictionaryPhonemeRuleRequestModel + from .pronunciation_dictionary_rules_response_model import PronunciationDictionaryRulesResponseModel + from .pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator + from .pronunciation_dictionary_version_response_model import PronunciationDictionaryVersionResponseModel + from .pronunciation_dictionary_version_response_model_permission_on_resource import ( + PronunciationDictionaryVersionResponseModelPermissionOnResource, + ) + from .pydantic_pronunciation_dictionary_version_locator import PydanticPronunciationDictionaryVersionLocator + from .query_params_json_schema import QueryParamsJsonSchema + from .rag_chunk_metadata import RagChunkMetadata + from .rag_config import RagConfig + from .rag_config_workflow_override import RagConfigWorkflowOverride + from .rag_document_index_response_model import RagDocumentIndexResponseModel + from .rag_document_index_usage import RagDocumentIndexUsage + from .rag_document_indexes_response_model import RagDocumentIndexesResponseModel + from .rag_index_overview_embedding_model_response_model import RagIndexOverviewEmbeddingModelResponseModel + from .rag_index_overview_response_model import RagIndexOverviewResponseModel + from .rag_index_status import RagIndexStatus + from .rag_retrieval_info import RagRetrievalInfo + from .reader_resource_response_model import ReaderResourceResponseModel + from .reader_resource_response_model_resource_type import ReaderResourceResponseModelResourceType + from .realtime_voice_settings import RealtimeVoiceSettings + from .recording_response import RecordingResponse + from .referenced_tool_common_model import ReferencedToolCommonModel + from .regex_parameter_evaluation_strategy import RegexParameterEvaluationStrategy + from .remove_member_from_group_request import RemoveMemberFromGroupRequest + from .render import Render + from .render_status import RenderStatus + from .render_type import RenderType + from .request_pvc_manual_verification_response_model import RequestPvcManualVerificationResponseModel + from .resource_access_info import ResourceAccessInfo + from .resource_access_info_role import ResourceAccessInfoRole + from .resource_metadata_response_model import ResourceMetadataResponseModel + from .resource_metadata_response_model_anonymous_access_level_override import ( + ResourceMetadataResponseModelAnonymousAccessLevelOverride, + ) + from .review_status import ReviewStatus + from .safety_common_model import SafetyCommonModel + from .safety_evaluation import SafetyEvaluation + from .safety_response_model import SafetyResponseModel + from .safety_rule import SafetyRule + from .save_voice_preview_request import SaveVoicePreviewRequest + from .secret_dependency_type import SecretDependencyType + from .segment_create_response import SegmentCreateResponse + from .segment_delete_response import SegmentDeleteResponse + from .segment_dub_response import SegmentDubResponse + from .segment_subtitle_frame import SegmentSubtitleFrame + from .segment_transcription_response import SegmentTranscriptionResponse + from .segment_translation_response import SegmentTranslationResponse + from .segment_update_response import SegmentUpdateResponse + from .segmented_json_export_options import SegmentedJsonExportOptions + from .send_text import SendText + from .send_text_multi import SendTextMulti + from .share_option_response_model import ShareOptionResponseModel + from .share_option_response_model_type import ShareOptionResponseModelType + from .similar_voice import SimilarVoice + from .similar_voice_category import SimilarVoiceCategory + from .similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse + from .single_test_run_request_model import SingleTestRunRequestModel + from .sip_media_encryption_enum import SipMediaEncryptionEnum + from .sip_trunk_credentials_request_model import SipTrunkCredentialsRequestModel + from .sip_trunk_outbound_call_response import SipTrunkOutboundCallResponse + from .sip_trunk_transport_enum import SipTrunkTransportEnum + from .sip_uri_transfer_destination import SipUriTransferDestination + from .skip_turn_tool_config import SkipTurnToolConfig + from .skip_turn_tool_response_model import SkipTurnToolResponseModel + from .song_metadata import SongMetadata + from .song_section import SongSection + from .speaker_audio_response_model import SpeakerAudioResponseModel + from .speaker_response_model import SpeakerResponseModel + from .speaker_segment import SpeakerSegment + from .speaker_separation_response_model import SpeakerSeparationResponseModel + from .speaker_separation_response_model_status import SpeakerSeparationResponseModelStatus + from .speaker_track import SpeakerTrack + from .speaker_updated_response import SpeakerUpdatedResponse + from .speech_history_item_response import SpeechHistoryItemResponse + from .speech_history_item_response_model_source import SpeechHistoryItemResponseModelSource + from .speech_history_item_response_model_voice_category import SpeechHistoryItemResponseModelVoiceCategory + from .speech_to_text_character_response_model import SpeechToTextCharacterResponseModel + from .speech_to_text_chunk_response_model import SpeechToTextChunkResponseModel + from .speech_to_text_webhook_response_model import SpeechToTextWebhookResponseModel + from .speech_to_text_word_response_model import SpeechToTextWordResponseModel + from .speech_to_text_word_response_model_type import SpeechToTextWordResponseModelType + from .srt_export_options import SrtExportOptions + from .start_pvc_voice_training_response_model import StartPvcVoiceTrainingResponseModel + from .start_speaker_separation_response_model import StartSpeakerSeparationResponseModel + from .streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse + from .subscription import Subscription + from .subscription_extras_response_model import SubscriptionExtrasResponseModel + from .subscription_response import SubscriptionResponse + from .subscription_response_model_billing_period import SubscriptionResponseModelBillingPeriod + from .subscription_response_model_character_refresh_period import SubscriptionResponseModelCharacterRefreshPeriod + from .subscription_response_model_currency import SubscriptionResponseModelCurrency + from .subscription_status_type import SubscriptionStatusType + from .subscription_usage_response_model import SubscriptionUsageResponseModel + from .supported_voice import SupportedVoice + from .system_tool_config_input import SystemToolConfigInput + from .system_tool_config_input_params import ( + SystemToolConfigInputParams, + SystemToolConfigInputParams_EndCall, + SystemToolConfigInputParams_LanguageDetection, + SystemToolConfigInputParams_PlayKeypadTouchTone, + SystemToolConfigInputParams_SkipTurn, + SystemToolConfigInputParams_TransferToAgent, + SystemToolConfigInputParams_TransferToNumber, + SystemToolConfigInputParams_VoicemailDetection, + ) + from .system_tool_config_output import SystemToolConfigOutput + from .system_tool_config_output_params import ( + SystemToolConfigOutputParams, + SystemToolConfigOutputParams_EndCall, + SystemToolConfigOutputParams_LanguageDetection, + SystemToolConfigOutputParams_PlayKeypadTouchTone, + SystemToolConfigOutputParams_SkipTurn, + SystemToolConfigOutputParams_TransferToAgent, + SystemToolConfigOutputParams_TransferToNumber, + SystemToolConfigOutputParams_VoicemailDetection, + ) + from .telephony_provider import TelephonyProvider + from .test_condition_rationale_common_model import TestConditionRationaleCommonModel + from .test_condition_result_common_model import TestConditionResultCommonModel + from .test_run_metadata import TestRunMetadata + from .test_run_metadata_test_type import TestRunMetadataTestType + from .test_run_status import TestRunStatus + from .test_tool_result_model import TestToolResultModel + from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel + from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum + from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum + from .text_to_speech_stream_request import TextToSpeechStreamRequest + from .token_response_model import TokenResponseModel + from .tool import Tool + from .tool_annotations import ToolAnnotations + from .tool_mock_config import ToolMockConfig + from .tool_request_model import ToolRequestModel + from .tool_request_model_tool_config import ( + ToolRequestModelToolConfig, + ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_Mcp, + ToolRequestModelToolConfig_System, + ToolRequestModelToolConfig_Webhook, + ) + from .tool_response_model import ToolResponseModel + from .tool_response_model_tool_config import ( + ToolResponseModelToolConfig, + ToolResponseModelToolConfig_Client, + ToolResponseModelToolConfig_Mcp, + ToolResponseModelToolConfig_System, + ToolResponseModelToolConfig_Webhook, + ) + from .tool_type import ToolType + from .tool_usage_stats_response_model import ToolUsageStatsResponseModel + from .tools_response_model import ToolsResponseModel + from .transfer_to_agent_tool_config import TransferToAgentToolConfig + from .transfer_to_agent_tool_result_error_model import TransferToAgentToolResultErrorModel + from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel + from .transfer_to_number_result_error_model import TransferToNumberResultErrorModel + from .transfer_to_number_result_sip_success_model import TransferToNumberResultSipSuccessModel + from .transfer_to_number_result_twilio_success_model import TransferToNumberResultTwilioSuccessModel + from .transfer_to_number_tool_config_input import TransferToNumberToolConfigInput + from .transfer_to_number_tool_config_output import TransferToNumberToolConfigOutput + from .transfer_type_enum import TransferTypeEnum + from .tts_conversational_config_input import TtsConversationalConfigInput + from .tts_conversational_config_output import TtsConversationalConfigOutput + from .tts_conversational_config_override import TtsConversationalConfigOverride + from .tts_conversational_config_override_config import TtsConversationalConfigOverrideConfig + from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride + from .tts_conversational_model import TtsConversationalModel + from .tts_model_family import TtsModelFamily + from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency + from .tts_output_format import TtsOutputFormat + from .turn_config import TurnConfig + from .turn_config_workflow_override import TurnConfigWorkflowOverride + from .turn_mode import TurnMode + from .twilio_outbound_call_response import TwilioOutboundCallResponse + from .txt_export_options import TxtExportOptions + from .unit_test_run_response_model import UnitTestRunResponseModel + from .unit_test_summary_response_model import UnitTestSummaryResponseModel + from .unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput + from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput + from .unit_test_tool_call_parameter import UnitTestToolCallParameter + from .unit_test_tool_call_parameter_eval import ( + UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Exact, + UnitTestToolCallParameterEval_Llm, + UnitTestToolCallParameterEval_Regex, + ) + from .update_audio_native_project_request import UpdateAudioNativeProjectRequest + from .update_chapter_request import UpdateChapterRequest + from .update_project_request import UpdateProjectRequest + from .update_pronunciation_dictionaries_request import UpdatePronunciationDictionariesRequest + from .update_workspace_member_response_model import UpdateWorkspaceMemberResponseModel + from .url_avatar import UrlAvatar + from .usage_aggregation_interval import UsageAggregationInterval + from .usage_characters_response_model import UsageCharactersResponseModel + from .user import User + from .user_feedback import UserFeedback + from .user_feedback_score import UserFeedbackScore + from .utterance_response_model import UtteranceResponseModel + from .validation_error import ValidationError + from .validation_error_loc_item import ValidationErrorLocItem + from .verification_attempt_response import VerificationAttemptResponse + from .verified_voice_language_response_model import VerifiedVoiceLanguageResponseModel + from .verify_pvc_voice_captcha_response_model import VerifyPvcVoiceCaptchaResponseModel + from .voice import Voice + from .voice_design_preview_response import VoiceDesignPreviewResponse + from .voice_generation_parameter_option_response import VoiceGenerationParameterOptionResponse + from .voice_generation_parameter_response import VoiceGenerationParameterResponse + from .voice_mail_detection_result_success_model import VoiceMailDetectionResultSuccessModel + from .voice_preview_response_model import VoicePreviewResponseModel + from .voice_response_model_category import VoiceResponseModelCategory + from .voice_response_model_safety_control import VoiceResponseModelSafetyControl + from .voice_sample import VoiceSample + from .voice_sample_preview_response_model import VoiceSamplePreviewResponseModel + from .voice_sample_visual_waveform_response_model import VoiceSampleVisualWaveformResponseModel + from .voice_settings import VoiceSettings + from .voice_sharing_moderation_check_response_model import VoiceSharingModerationCheckResponseModel + from .voice_sharing_response import VoiceSharingResponse + from .voice_sharing_response_model_category import VoiceSharingResponseModelCategory + from .voice_sharing_state import VoiceSharingState + from .voice_verification_response import VoiceVerificationResponse + from .voicemail_detection_tool_config import VoicemailDetectionToolConfig + from .webhook_auth_method_type import WebhookAuthMethodType + from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput + from .webhook_tool_api_schema_config_input_method import WebhookToolApiSchemaConfigInputMethod + from .webhook_tool_api_schema_config_input_request_headers_value import ( + WebhookToolApiSchemaConfigInputRequestHeadersValue, + ) + from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput + from .webhook_tool_api_schema_config_output_method import WebhookToolApiSchemaConfigOutputMethod + from .webhook_tool_api_schema_config_output_request_headers_value import ( + WebhookToolApiSchemaConfigOutputRequestHeadersValue, + ) + from .webhook_tool_config_input import WebhookToolConfigInput + from .webhook_tool_config_output import WebhookToolConfigOutput + from .webhook_usage_type import WebhookUsageType + from .websocket_tts_client_message_multi import WebsocketTtsClientMessageMulti + from .websocket_tts_server_message_multi import WebsocketTtsServerMessageMulti + from .widget_config import WidgetConfig + from .widget_config_input_avatar import ( + WidgetConfigInputAvatar, + WidgetConfigInputAvatar_Image, + WidgetConfigInputAvatar_Orb, + WidgetConfigInputAvatar_Url, + ) + from .widget_config_output_avatar import ( + WidgetConfigOutputAvatar, + WidgetConfigOutputAvatar_Image, + WidgetConfigOutputAvatar_Orb, + WidgetConfigOutputAvatar_Url, + ) + from .widget_config_response import WidgetConfigResponse + from .widget_config_response_model_avatar import ( + WidgetConfigResponseModelAvatar, + WidgetConfigResponseModelAvatar_Image, + WidgetConfigResponseModelAvatar_Orb, + WidgetConfigResponseModelAvatar_Url, + ) + from .widget_expandable import WidgetExpandable + from .widget_feedback_mode import WidgetFeedbackMode + from .widget_language_preset import WidgetLanguagePreset + from .widget_language_preset_response import WidgetLanguagePresetResponse + from .widget_placement import WidgetPlacement + from .widget_styles import WidgetStyles + from .widget_text_contents import WidgetTextContents + from .workflow_edge_model import WorkflowEdgeModel + from .workflow_edge_model_backward_condition import ( + WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Llm, + WorkflowEdgeModelBackwardCondition_Result, + WorkflowEdgeModelBackwardCondition_Unconditional, + ) + from .workflow_edge_model_forward_condition import ( + WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Llm, + WorkflowEdgeModelForwardCondition_Result, + WorkflowEdgeModelForwardCondition_Unconditional, + ) + from .workflow_end_node_model import WorkflowEndNodeModel + from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel + from .workflow_llm_condition_model import WorkflowLlmConditionModel + from .workflow_override_agent_node_model import WorkflowOverrideAgentNodeModel + from .workflow_phone_number_node_model import WorkflowPhoneNumberNodeModel + from .workflow_phone_number_node_model_transfer_destination import ( + WorkflowPhoneNumberNodeModelTransferDestination, + WorkflowPhoneNumberNodeModelTransferDestination_Phone, + WorkflowPhoneNumberNodeModelTransferDestination_SipUri, + ) + from .workflow_result_condition_model import WorkflowResultConditionModel + from .workflow_standalone_agent_node_model import WorkflowStandaloneAgentNodeModel + from .workflow_start_node_model import WorkflowStartNodeModel + from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel + from .workflow_tool_locator import WorkflowToolLocator + from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel + from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput + from .workflow_tool_nested_tools_step_model_input_results_item import ( + WorkflowToolNestedToolsStepModelInputResultsItem, + ) + from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput + from .workflow_tool_nested_tools_step_model_output_results_item import ( + WorkflowToolNestedToolsStepModelOutputResultsItem, + ) + from .workflow_tool_node_model import WorkflowToolNodeModel + from .workflow_tool_response_model_input import WorkflowToolResponseModelInput + from .workflow_tool_response_model_input_steps_item import ( + WorkflowToolResponseModelInputStepsItem, + WorkflowToolResponseModelInputStepsItem_Edge, + WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelInputStepsItem_NestedTools, + ) + from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput + from .workflow_tool_response_model_output_steps_item import ( + WorkflowToolResponseModelOutputStepsItem, + WorkflowToolResponseModelOutputStepsItem_Edge, + WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, + WorkflowToolResponseModelOutputStepsItem_NestedTools, + ) + from .workflow_unconditional_model import WorkflowUnconditionalModel + from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel + from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel + from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem + from .workspace_batch_calls_response import WorkspaceBatchCallsResponse + from .workspace_create_api_key_response_model import WorkspaceCreateApiKeyResponseModel + from .workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel + from .workspace_resource_type import WorkspaceResourceType + from .workspace_service_account_list_response_model import WorkspaceServiceAccountListResponseModel + from .workspace_service_account_response_model import WorkspaceServiceAccountResponseModel + from .workspace_webhook_list_response_model import WorkspaceWebhookListResponseModel + from .workspace_webhook_response_model import WorkspaceWebhookResponseModel + from .workspace_webhook_usage_response_model import WorkspaceWebhookUsageResponseModel +_dynamic_imports: typing.Dict[str, str] = { + "AddChapterResponseModel": ".add_chapter_response_model", + "AddKnowledgeBaseResponseModel": ".add_knowledge_base_response_model", + "AddProjectRequest": ".add_project_request", + "AddProjectResponseModel": ".add_project_response_model", + "AddPronunciationDictionaryResponseModel": ".add_pronunciation_dictionary_response_model", + "AddPronunciationDictionaryResponseModelPermissionOnResource": ".add_pronunciation_dictionary_response_model_permission_on_resource", + "AddSharingVoiceRequest": ".add_sharing_voice_request", + "AddVoiceIvcResponseModel": ".add_voice_ivc_response_model", + "AddVoiceResponseModel": ".add_voice_response_model", + "AddWorkspaceGroupMemberResponseModel": ".add_workspace_group_member_response_model", + "AddWorkspaceInviteResponseModel": ".add_workspace_invite_response_model", + "AdditionalFormatResponseModel": ".additional_format_response_model", + "AdditionalFormats": ".additional_formats", + "AdhocAgentConfigOverrideForTestRequestModel": ".adhoc_agent_config_override_for_test_request_model", + "Age": ".age", + "AgentCallLimits": ".agent_call_limits", + "AgentConfig": ".agent_config", + "AgentConfigApiModelWorkflowOverride": ".agent_config_api_model_workflow_override", + "AgentConfigOverride": ".agent_config_override", + "AgentConfigOverrideConfig": ".agent_config_override_config", + "AgentFailureResponseExample": ".agent_failure_response_example", + "AgentMetadataResponseModel": ".agent_metadata_response_model", + "AgentPlatformSettingsRequestModel": ".agent_platform_settings_request_model", + "AgentPlatformSettingsResponseModel": ".agent_platform_settings_response_model", + "AgentSimulatedChatTestResponseModel": ".agent_simulated_chat_test_response_model", + "AgentSuccessfulResponseExample": ".agent_successful_response_example", + "AgentSummaryResponseModel": ".agent_summary_response_model", + "AgentTestingSettings": ".agent_testing_settings", + "AgentTransfer": ".agent_transfer", + "AgentWorkflowRequestModel": ".agent_workflow_request_model", + "AgentWorkflowRequestModelNodesValue": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_End": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_OverrideAgent": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_PhoneNumber": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_StandaloneAgent": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_Start": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowRequestModelNodesValue_Tool": ".agent_workflow_request_model_nodes_value", + "AgentWorkspaceOverridesInput": ".agent_workspace_overrides_input", + "AgentWorkspaceOverridesOutput": ".agent_workspace_overrides_output", + "Alignment": ".alignment", + "AllowlistItem": ".allowlist_item", + "ArrayJsonSchemaPropertyInput": ".array_json_schema_property_input", + "ArrayJsonSchemaPropertyInputItems": ".array_json_schema_property_input_items", + "ArrayJsonSchemaPropertyOutput": ".array_json_schema_property_output", + "ArrayJsonSchemaPropertyOutputItems": ".array_json_schema_property_output_items", + "AsrConversationalConfig": ".asr_conversational_config", + "AsrConversationalConfigWorkflowOverride": ".asr_conversational_config_workflow_override", + "AsrInputFormat": ".asr_input_format", + "AsrProvider": ".asr_provider", + "AsrQuality": ".asr_quality", + "AttachedTestModel": ".attached_test_model", + "AudioNativeCreateProjectResponseModel": ".audio_native_create_project_response_model", + "AudioNativeEditContentResponseModel": ".audio_native_edit_content_response_model", + "AudioNativeProjectSettingsResponseModel": ".audio_native_project_settings_response_model", + "AudioNativeProjectSettingsResponseModelStatus": ".audio_native_project_settings_response_model_status", + "AudioOutput": ".audio_output", + "AudioOutputMulti": ".audio_output_multi", + "AudioWithTimestampsResponse": ".audio_with_timestamps_response", + "AuthConnectionLocator": ".auth_connection_locator", + "AuthSettings": ".auth_settings", + "AuthorizationMethod": ".authorization_method", + "BadRequestErrorBody": ".bad_request_error_body", + "BanReasonType": ".ban_reason_type", + "BatchCallDetailedResponse": ".batch_call_detailed_response", + "BatchCallRecipientStatus": ".batch_call_recipient_status", + "BatchCallResponse": ".batch_call_response", + "BatchCallStatus": ".batch_call_status", + "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge": ".body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_age", + "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender": ".body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_gender", + "BreakdownTypes": ".breakdown_types", + "BuiltInToolsInput": ".built_in_tools_input", + "BuiltInToolsOutput": ".built_in_tools_output", + "BuiltInToolsWorkflowOverride": ".built_in_tools_workflow_override", + "CaptionStyleCharacterAnimationModel": ".caption_style_character_animation_model", + "CaptionStyleCharacterAnimationModelEnterType": ".caption_style_character_animation_model_enter_type", + "CaptionStyleCharacterAnimationModelExitType": ".caption_style_character_animation_model_exit_type", + "CaptionStyleHorizontalPlacementModel": ".caption_style_horizontal_placement_model", + "CaptionStyleHorizontalPlacementModelAlign": ".caption_style_horizontal_placement_model_align", + "CaptionStyleModel": ".caption_style_model", + "CaptionStyleModelTextAlign": ".caption_style_model_text_align", + "CaptionStyleModelTextStyle": ".caption_style_model_text_style", + "CaptionStyleModelTextWeight": ".caption_style_model_text_weight", + "CaptionStyleSectionAnimationModel": ".caption_style_section_animation_model", + "CaptionStyleSectionAnimationModelEnterType": ".caption_style_section_animation_model_enter_type", + "CaptionStyleSectionAnimationModelExitType": ".caption_style_section_animation_model_exit_type", + "CaptionStyleTemplateModel": ".caption_style_template_model", + "CaptionStyleVerticalPlacementModel": ".caption_style_vertical_placement_model", + "CaptionStyleVerticalPlacementModelAlign": ".caption_style_vertical_placement_model_align", + "CaptionStyleWordAnimationModel": ".caption_style_word_animation_model", + "CaptionStyleWordAnimationModelEnterType": ".caption_style_word_animation_model_enter_type", + "CaptionStyleWordAnimationModelExitType": ".caption_style_word_animation_model_exit_type", + "ChapterContentBlockExtendableNodeResponseModel": ".chapter_content_block_extendable_node_response_model", + "ChapterContentBlockInputModel": ".chapter_content_block_input_model", + "ChapterContentBlockInputModelSubType": ".chapter_content_block_input_model_sub_type", + "ChapterContentBlockResponseModel": ".chapter_content_block_response_model", + "ChapterContentBlockResponseModelNodesItem": ".chapter_content_block_response_model_nodes_item", + "ChapterContentBlockResponseModelNodesItem_Other": ".chapter_content_block_response_model_nodes_item", + "ChapterContentBlockResponseModelNodesItem_TtsNode": ".chapter_content_block_response_model_nodes_item", + "ChapterContentBlockTtsNodeResponseModel": ".chapter_content_block_tts_node_response_model", + "ChapterContentInputModel": ".chapter_content_input_model", + "ChapterContentParagraphTtsNodeInputModel": ".chapter_content_paragraph_tts_node_input_model", + "ChapterContentResponseModel": ".chapter_content_response_model", + "ChapterResponse": ".chapter_response", + "ChapterSnapshotExtendedResponseModel": ".chapter_snapshot_extended_response_model", + "ChapterSnapshotResponse": ".chapter_snapshot_response", + "ChapterSnapshotsResponse": ".chapter_snapshots_response", + "ChapterState": ".chapter_state", + "ChapterStatisticsResponse": ".chapter_statistics_response", + "ChapterWithContentResponseModel": ".chapter_with_content_response_model", + "ChapterWithContentResponseModelState": ".chapter_with_content_response_model_state", + "CharacterAlignmentModel": ".character_alignment_model", + "CharacterAlignmentResponseModel": ".character_alignment_response_model", + "CharacterUsageResponse": ".character_usage_response", + "ClientEvent": ".client_event", + "ClientToolConfigInput": ".client_tool_config_input", + "ClientToolConfigOutput": ".client_tool_config_output", + "CloseConnection": ".close_connection", + "CloseContext": ".close_context", + "CloseSocket": ".close_socket", + "ConvAiDynamicVariable": ".conv_ai_dynamic_variable", + "ConvAiSecretLocator": ".conv_ai_secret_locator", + "ConvAiStoredSecretDependencies": ".conv_ai_stored_secret_dependencies", + "ConvAiStoredSecretDependenciesAgentsItem": ".conv_ai_stored_secret_dependencies_agents_item", + "ConvAiStoredSecretDependenciesAgentsItem_Available": ".conv_ai_stored_secret_dependencies_agents_item", + "ConvAiStoredSecretDependenciesAgentsItem_Unknown": ".conv_ai_stored_secret_dependencies_agents_item", + "ConvAiStoredSecretDependenciesToolsItem": ".conv_ai_stored_secret_dependencies_tools_item", + "ConvAiStoredSecretDependenciesToolsItem_Available": ".conv_ai_stored_secret_dependencies_tools_item", + "ConvAiStoredSecretDependenciesToolsItem_Unknown": ".conv_ai_stored_secret_dependencies_tools_item", + "ConvAiUserSecretDbModel": ".conv_ai_user_secret_db_model", + "ConvAiWebhooks": ".conv_ai_webhooks", + "ConvAiWorkspaceStoredSecretConfig": ".conv_ai_workspace_stored_secret_config", + "ConversationChargingCommonModel": ".conversation_charging_common_model", + "ConversationConfig": ".conversation_config", + "ConversationConfigClientOverrideConfigInput": ".conversation_config_client_override_config_input", + "ConversationConfigClientOverrideConfigOutput": ".conversation_config_client_override_config_output", + "ConversationConfigClientOverrideInput": ".conversation_config_client_override_input", + "ConversationConfigClientOverrideOutput": ".conversation_config_client_override_output", + "ConversationConfigOverride": ".conversation_config_override", + "ConversationConfigOverrideConfig": ".conversation_config_override_config", + "ConversationConfigWorkflowOverride": ".conversation_config_workflow_override", + "ConversationDeletionSettings": ".conversation_deletion_settings", + "ConversationHistoryAnalysisCommonModel": ".conversation_history_analysis_common_model", + "ConversationHistoryBatchCallModel": ".conversation_history_batch_call_model", + "ConversationHistoryElevenAssistantCommonModel": ".conversation_history_eleven_assistant_common_model", + "ConversationHistoryErrorCommonModel": ".conversation_history_error_common_model", + "ConversationHistoryEvaluationCriteriaResultCommonModel": ".conversation_history_evaluation_criteria_result_common_model", + "ConversationHistoryFeedbackCommonModel": ".conversation_history_feedback_common_model", + "ConversationHistoryMetadataCommonModel": ".conversation_history_metadata_common_model", + "ConversationHistoryMetadataCommonModelPhoneCall": ".conversation_history_metadata_common_model_phone_call", + "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking": ".conversation_history_metadata_common_model_phone_call", + "ConversationHistoryMetadataCommonModelPhoneCall_Twilio": ".conversation_history_metadata_common_model_phone_call", + "ConversationHistoryMultivoiceMessageModel": ".conversation_history_multivoice_message_model", + "ConversationHistoryMultivoiceMessagePartModel": ".conversation_history_multivoice_message_part_model", + "ConversationHistoryRagUsageCommonModel": ".conversation_history_rag_usage_common_model", + "ConversationHistorySipTrunkingPhoneCallModel": ".conversation_history_sip_trunking_phone_call_model", + "ConversationHistorySipTrunkingPhoneCallModelDirection": ".conversation_history_sip_trunking_phone_call_model_direction", + "ConversationHistoryTranscriptCommonModelInput": ".conversation_history_transcript_common_model_input", + "ConversationHistoryTranscriptCommonModelInputRole": ".conversation_history_transcript_common_model_input_role", + "ConversationHistoryTranscriptCommonModelInputSourceMedium": ".conversation_history_transcript_common_model_input_source_medium", + "ConversationHistoryTranscriptCommonModelInputToolResultsItem": ".conversation_history_transcript_common_model_input_tool_results_item", + "ConversationHistoryTranscriptCommonModelOutput": ".conversation_history_transcript_common_model_output", + "ConversationHistoryTranscriptCommonModelOutputRole": ".conversation_history_transcript_common_model_output_role", + "ConversationHistoryTranscriptCommonModelOutputSourceMedium": ".conversation_history_transcript_common_model_output_source_medium", + "ConversationHistoryTranscriptCommonModelOutputToolResultsItem": ".conversation_history_transcript_common_model_output_tool_results_item", + "ConversationHistoryTranscriptOtherToolsResultCommonModel": ".conversation_history_transcript_other_tools_result_common_model", + "ConversationHistoryTranscriptOtherToolsResultCommonModelType": ".conversation_history_transcript_other_tools_result_common_model_type", + "ConversationHistoryTranscriptSystemToolResultCommonModel": ".conversation_history_transcript_system_tool_result_common_model", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_EndCallSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_LanguageDetectionSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfError": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_PlayDtmfSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_SkipTurnSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TestingToolResult": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentError": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToAgentSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberError": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberSipSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_TransferToNumberTwilioSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptSystemToolResultCommonModelResult_VoicemailDetectionSuccess": ".conversation_history_transcript_system_tool_result_common_model_result", + "ConversationHistoryTranscriptToolCallClientDetails": ".conversation_history_transcript_tool_call_client_details", + "ConversationHistoryTranscriptToolCallCommonModel": ".conversation_history_transcript_tool_call_common_model", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails": ".conversation_history_transcript_tool_call_common_model_tool_details", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Client": ".conversation_history_transcript_tool_call_common_model_tool_details", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Mcp": ".conversation_history_transcript_tool_call_common_model_tool_details", + "ConversationHistoryTranscriptToolCallCommonModelToolDetails_Webhook": ".conversation_history_transcript_tool_call_common_model_tool_details", + "ConversationHistoryTranscriptToolCallMcpDetails": ".conversation_history_transcript_tool_call_mcp_details", + "ConversationHistoryTranscriptToolCallWebhookDetails": ".conversation_history_transcript_tool_call_webhook_details", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput": ".conversation_history_transcript_workflow_tools_result_common_model_input", + "ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput": ".conversation_history_transcript_workflow_tools_result_common_model_output", + "ConversationHistoryTwilioPhoneCallModel": ".conversation_history_twilio_phone_call_model", + "ConversationHistoryTwilioPhoneCallModelDirection": ".conversation_history_twilio_phone_call_model_direction", + "ConversationInitiationClientDataConfigInput": ".conversation_initiation_client_data_config_input", + "ConversationInitiationClientDataConfigOutput": ".conversation_initiation_client_data_config_output", + "ConversationInitiationClientDataInternal": ".conversation_initiation_client_data_internal", + "ConversationInitiationClientDataInternalDynamicVariablesValue": ".conversation_initiation_client_data_internal_dynamic_variables_value", + "ConversationInitiationClientDataRequestInput": ".conversation_initiation_client_data_request_input", + "ConversationInitiationClientDataRequestInputDynamicVariablesValue": ".conversation_initiation_client_data_request_input_dynamic_variables_value", + "ConversationInitiationClientDataRequestOutput": ".conversation_initiation_client_data_request_output", + "ConversationInitiationClientDataRequestOutputDynamicVariablesValue": ".conversation_initiation_client_data_request_output_dynamic_variables_value", + "ConversationInitiationClientDataWebhook": ".conversation_initiation_client_data_webhook", + "ConversationInitiationClientDataWebhookRequestHeadersValue": ".conversation_initiation_client_data_webhook_request_headers_value", + "ConversationInitiationSource": ".conversation_initiation_source", + "ConversationInitiationSourceInfo": ".conversation_initiation_source_info", + "ConversationSignedUrlResponseModel": ".conversation_signed_url_response_model", + "ConversationSimulationSpecification": ".conversation_simulation_specification", + "ConversationSimulationSpecificationDynamicVariablesValue": ".conversation_simulation_specification_dynamic_variables_value", + "ConversationSummaryResponseModel": ".conversation_summary_response_model", + "ConversationSummaryResponseModelDirection": ".conversation_summary_response_model_direction", + "ConversationSummaryResponseModelStatus": ".conversation_summary_response_model_status", + "ConversationTokenDbModel": ".conversation_token_db_model", + "ConversationTokenPurpose": ".conversation_token_purpose", + "ConversationTurnMetrics": ".conversation_turn_metrics", + "ConversationalConfig": ".conversational_config", + "ConversationalConfigApiModelWorkflowOverride": ".conversational_config_api_model_workflow_override", + "ConvertChapterResponseModel": ".convert_chapter_response_model", + "ConvertProjectResponseModel": ".convert_project_response_model", + "CreateAgentResponseModel": ".create_agent_response_model", + "CreateAudioNativeProjectRequest": ".create_audio_native_project_request", + "CreatePhoneNumberResponseModel": ".create_phone_number_response_model", + "CreatePreviouslyGeneratedVoiceRequest": ".create_previously_generated_voice_request", + "CreatePronunciationDictionaryResponseModel": ".create_pronunciation_dictionary_response_model", + "CreateSipTrunkPhoneNumberRequest": ".create_sip_trunk_phone_number_request", + "CreateTranscriptRequest": ".create_transcript_request", + "CreateTwilioPhoneNumberRequest": ".create_twilio_phone_number_request", + "CreateUnitTestResponseModel": ".create_unit_test_response_model", + "CustomLlm": ".custom_llm", + "CustomLlmRequestHeadersValue": ".custom_llm_request_headers_value", + "DashboardCallSuccessChartModel": ".dashboard_call_success_chart_model", + "DashboardCriteriaChartModel": ".dashboard_criteria_chart_model", + "DashboardDataCollectionChartModel": ".dashboard_data_collection_chart_model", + "DataCollectionResultCommonModel": ".data_collection_result_common_model", + "DeleteChapterRequest": ".delete_chapter_request", + "DeleteChapterResponseModel": ".delete_chapter_response_model", + "DeleteDubbingResponseModel": ".delete_dubbing_response_model", + "DeleteHistoryItemResponse": ".delete_history_item_response", + "DeleteProjectRequest": ".delete_project_request", + "DeleteProjectResponseModel": ".delete_project_response_model", + "DeleteSampleResponse": ".delete_sample_response", + "DeleteVoiceResponseModel": ".delete_voice_response_model", + "DeleteVoiceSampleResponseModel": ".delete_voice_sample_response_model", + "DeleteWorkspaceGroupMemberResponseModel": ".delete_workspace_group_member_response_model", + "DeleteWorkspaceInviteResponseModel": ".delete_workspace_invite_response_model", + "DependentAvailableAgentIdentifier": ".dependent_available_agent_identifier", + "DependentAvailableAgentIdentifierAccessLevel": ".dependent_available_agent_identifier_access_level", + "DependentAvailableToolIdentifier": ".dependent_available_tool_identifier", + "DependentAvailableToolIdentifierAccessLevel": ".dependent_available_tool_identifier_access_level", + "DependentPhoneNumberIdentifier": ".dependent_phone_number_identifier", + "DependentUnknownAgentIdentifier": ".dependent_unknown_agent_identifier", + "DependentUnknownToolIdentifier": ".dependent_unknown_tool_identifier", + "DetailedMusicResponse": ".detailed_music_response", + "DialogueInput": ".dialogue_input", + "DialogueInputResponseModel": ".dialogue_input_response_model", + "DoDubbingResponse": ".do_dubbing_response", + "DocumentUsageModeEnum": ".document_usage_mode_enum", + "DocxExportOptions": ".docx_export_options", + "DubbedSegment": ".dubbed_segment", + "DubbingMediaMetadata": ".dubbing_media_metadata", + "DubbingMediaReference": ".dubbing_media_reference", + "DubbingMetadataPageResponseModel": ".dubbing_metadata_page_response_model", + "DubbingMetadataResponse": ".dubbing_metadata_response", + "DubbingReleaseChannel": ".dubbing_release_channel", + "DubbingRenderResponseModel": ".dubbing_render_response_model", + "DubbingResource": ".dubbing_resource", + "DynamicVariableAssignment": ".dynamic_variable_assignment", + "DynamicVariableUpdateCommonModel": ".dynamic_variable_update_common_model", + "DynamicVariablesConfig": ".dynamic_variables_config", + "DynamicVariablesConfigDynamicVariablePlaceholdersValue": ".dynamic_variables_config_dynamic_variable_placeholders_value", + "DynamicVariablesConfigWorkflowOverride": ".dynamic_variables_config_workflow_override", + "DynamicVariablesConfigWorkflowOverrideDynamicVariablePlaceholdersValue": ".dynamic_variables_config_workflow_override_dynamic_variable_placeholders_value", + "EditChapterResponseModel": ".edit_chapter_response_model", + "EditProjectResponseModel": ".edit_project_response_model", + "EditVoiceResponseModel": ".edit_voice_response_model", + "EditVoiceSettingsRequest": ".edit_voice_settings_request", + "EditVoiceSettingsResponseModel": ".edit_voice_settings_response_model", + "EmbedVariant": ".embed_variant", + "EmbeddingModelEnum": ".embedding_model_enum", + "EndCallToolConfig": ".end_call_tool_config", + "EndCallToolResultModel": ".end_call_tool_result_model", + "EvaluationSettings": ".evaluation_settings", + "EvaluationSuccessResult": ".evaluation_success_result", + "ExactParameterEvaluationStrategy": ".exact_parameter_evaluation_strategy", + "ExportOptions": ".export_options", + "ExportOptions_Docx": ".export_options", + "ExportOptions_Html": ".export_options", + "ExportOptions_Pdf": ".export_options", + "ExportOptions_SegmentedJson": ".export_options", + "ExportOptions_Srt": ".export_options", + "ExportOptions_Txt": ".export_options", + "ExtendedSubscriptionResponseModelBillingPeriod": ".extended_subscription_response_model_billing_period", + "ExtendedSubscriptionResponseModelCharacterRefreshPeriod": ".extended_subscription_response_model_character_refresh_period", + "ExtendedSubscriptionResponseModelCurrency": ".extended_subscription_response_model_currency", + "ExtendedSubscriptionResponseModelPendingChange": ".extended_subscription_response_model_pending_change", + "FeatureStatusCommonModel": ".feature_status_common_model", + "FeaturesUsageCommonModel": ".features_usage_common_model", + "FeedbackItem": ".feedback_item", + "FinalOutput": ".final_output", + "FinalOutputMulti": ".final_output_multi", + "FineTuningResponse": ".fine_tuning_response", + "FineTuningResponseModelStateValue": ".fine_tuning_response_model_state_value", + "FlushContext": ".flush_context", + "ForcedAlignmentCharacterResponseModel": ".forced_alignment_character_response_model", + "ForcedAlignmentResponseModel": ".forced_alignment_response_model", + "ForcedAlignmentWordResponseModel": ".forced_alignment_word_response_model", + "Gender": ".gender", + "GenerateVoiceRequest": ".generate_voice_request", + "GenerationConfig": ".generation_config", + "GetAgentEmbedResponseModel": ".get_agent_embed_response_model", + "GetAgentKnowledgebaseSizeResponseModel": ".get_agent_knowledgebase_size_response_model", + "GetAgentLinkResponseModel": ".get_agent_link_response_model", + "GetAgentResponseModel": ".get_agent_response_model", + "GetAgentResponseModelPhoneNumbersItem": ".get_agent_response_model_phone_numbers_item", + "GetAgentResponseModelPhoneNumbersItem_SipTrunk": ".get_agent_response_model_phone_numbers_item", + "GetAgentResponseModelPhoneNumbersItem_Twilio": ".get_agent_response_model_phone_numbers_item", + "GetAgentsPageResponseModel": ".get_agents_page_response_model", + "GetAudioNativeProjectSettingsResponseModel": ".get_audio_native_project_settings_response_model", + "GetChapterRequest": ".get_chapter_request", + "GetChapterSnapshotsRequest": ".get_chapter_snapshots_request", + "GetChaptersRequest": ".get_chapters_request", + "GetChaptersResponse": ".get_chapters_response", + "GetConvAiDashboardSettingsResponseModel": ".get_conv_ai_dashboard_settings_response_model", + "GetConvAiDashboardSettingsResponseModelChartsItem": ".get_conv_ai_dashboard_settings_response_model_charts_item", + "GetConvAiDashboardSettingsResponseModelChartsItem_CallSuccess": ".get_conv_ai_dashboard_settings_response_model_charts_item", + "GetConvAiDashboardSettingsResponseModelChartsItem_Criteria": ".get_conv_ai_dashboard_settings_response_model_charts_item", + "GetConvAiDashboardSettingsResponseModelChartsItem_DataCollection": ".get_conv_ai_dashboard_settings_response_model_charts_item", + "GetConvAiSettingsResponseModel": ".get_conv_ai_settings_response_model", + "GetConversationResponseModel": ".get_conversation_response_model", + "GetConversationResponseModelStatus": ".get_conversation_response_model_status", + "GetConversationsPageResponseModel": ".get_conversations_page_response_model", + "GetKnowledgeBaseDependentAgentsResponseModel": ".get_knowledge_base_dependent_agents_response_model", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem": ".get_knowledge_base_dependent_agents_response_model_agents_item", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available": ".get_knowledge_base_dependent_agents_response_model_agents_item", + "GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown": ".get_knowledge_base_dependent_agents_response_model_agents_item", + "GetKnowledgeBaseFileResponseModel": ".get_knowledge_base_file_response_model", + "GetKnowledgeBaseListResponseModel": ".get_knowledge_base_list_response_model", + "GetKnowledgeBaseListResponseModelDocumentsItem": ".get_knowledge_base_list_response_model_documents_item", + "GetKnowledgeBaseListResponseModelDocumentsItem_File": ".get_knowledge_base_list_response_model_documents_item", + "GetKnowledgeBaseListResponseModelDocumentsItem_Text": ".get_knowledge_base_list_response_model_documents_item", + "GetKnowledgeBaseListResponseModelDocumentsItem_Url": ".get_knowledge_base_list_response_model_documents_item", + "GetKnowledgeBaseSummaryFileResponseModel": ".get_knowledge_base_summary_file_response_model", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem": ".get_knowledge_base_summary_file_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available": ".get_knowledge_base_summary_file_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown": ".get_knowledge_base_summary_file_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryTextResponseModel": ".get_knowledge_base_summary_text_response_model", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem": ".get_knowledge_base_summary_text_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available": ".get_knowledge_base_summary_text_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown": ".get_knowledge_base_summary_text_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryUrlResponseModel": ".get_knowledge_base_summary_url_response_model", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem": ".get_knowledge_base_summary_url_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available": ".get_knowledge_base_summary_url_response_model_dependent_agents_item", + "GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown": ".get_knowledge_base_summary_url_response_model_dependent_agents_item", + "GetKnowledgeBaseTextResponseModel": ".get_knowledge_base_text_response_model", + "GetKnowledgeBaseUrlResponseModel": ".get_knowledge_base_url_response_model", + "GetLibraryVoicesResponse": ".get_library_voices_response", + "GetPhoneNumberInboundSipTrunkConfigResponseModel": ".get_phone_number_inbound_sip_trunk_config_response_model", + "GetPhoneNumberOutboundSipTrunkConfigResponseModel": ".get_phone_number_outbound_sip_trunk_config_response_model", + "GetPhoneNumberResponse": ".get_phone_number_response", + "GetPhoneNumberSipTrunkResponseModel": ".get_phone_number_sip_trunk_response_model", + "GetPhoneNumberTwilioResponseModel": ".get_phone_number_twilio_response_model", + "GetProjectRequest": ".get_project_request", + "GetProjectsRequest": ".get_projects_request", + "GetProjectsResponse": ".get_projects_response", + "GetPronunciationDictionariesMetadataResponseModel": ".get_pronunciation_dictionaries_metadata_response_model", + "GetPronunciationDictionariesResponse": ".get_pronunciation_dictionaries_response", + "GetPronunciationDictionaryMetadataResponse": ".get_pronunciation_dictionary_metadata_response", + "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource": ".get_pronunciation_dictionary_metadata_response_model_permission_on_resource", + "GetPronunciationDictionaryResponse": ".get_pronunciation_dictionary_response", + "GetSpeechHistoryResponse": ".get_speech_history_response", + "GetTestSuiteInvocationResponseModel": ".get_test_suite_invocation_response_model", + "GetTestsPageResponseModel": ".get_tests_page_response_model", + "GetTestsSummariesByIdsResponseModel": ".get_tests_summaries_by_ids_response_model", + "GetToolDependentAgentsResponseModel": ".get_tool_dependent_agents_response_model", + "GetToolDependentAgentsResponseModelAgentsItem": ".get_tool_dependent_agents_response_model_agents_item", + "GetToolDependentAgentsResponseModelAgentsItem_Available": ".get_tool_dependent_agents_response_model_agents_item", + "GetToolDependentAgentsResponseModelAgentsItem_Unknown": ".get_tool_dependent_agents_response_model_agents_item", + "GetUnitTestResponseModel": ".get_unit_test_response_model", + "GetUnitTestResponseModelDynamicVariablesValue": ".get_unit_test_response_model_dynamic_variables_value", + "GetVoicesResponse": ".get_voices_response", + "GetVoicesV2Response": ".get_voices_v_2_response", + "GetWorkspaceSecretsResponseModel": ".get_workspace_secrets_response_model", + "HistoryAlignmentResponseModel": ".history_alignment_response_model", + "HistoryAlignmentsResponseModel": ".history_alignments_response_model", + "HistoryItemResponse": ".history_item_response", + "HtmlExportOptions": ".html_export_options", + "HttpValidationError": ".http_validation_error", + "ImageAvatar": ".image_avatar", + "InboundSipTrunkConfigRequestModel": ".inbound_sip_trunk_config_request_model", + "InitialiseContext": ".initialise_context", + "InitializeConnection": ".initialize_connection", + "InitializeConnectionMulti": ".initialize_connection_multi", + "IntegrationType": ".integration_type", + "InvoiceResponse": ".invoice_response", + "InvoiceResponseModelPaymentIntentStatus": ".invoice_response_model_payment_intent_status", + "KeepContextAlive": ".keep_context_alive", + "KnowledgeBaseDocumentChunkResponseModel": ".knowledge_base_document_chunk_response_model", + "KnowledgeBaseDocumentMetadataResponseModel": ".knowledge_base_document_metadata_response_model", + "KnowledgeBaseDocumentType": ".knowledge_base_document_type", + "KnowledgeBaseLocator": ".knowledge_base_locator", + "LanguageAddedResponse": ".language_added_response", + "LanguageDetectionToolConfig": ".language_detection_tool_config", + "LanguageDetectionToolResultModel": ".language_detection_tool_result_model", + "LanguagePresetInput": ".language_preset_input", + "LanguagePresetOutput": ".language_preset_output", + "LanguagePresetTranslation": ".language_preset_translation", + "LanguageResponse": ".language_response", + "LibraryVoiceResponse": ".library_voice_response", + "LibraryVoiceResponseModelCategory": ".library_voice_response_model_category", + "ListMcpToolsResponseModel": ".list_mcp_tools_response_model", + "LiteralJsonSchemaProperty": ".literal_json_schema_property", + "LiteralJsonSchemaPropertyConstantValue": ".literal_json_schema_property_constant_value", + "LiteralJsonSchemaPropertyType": ".literal_json_schema_property_type", + "Llm": ".llm", + "LlmCategoryUsage": ".llm_category_usage", + "LlmInputOutputTokensUsage": ".llm_input_output_tokens_usage", + "LlmParameterEvaluationStrategy": ".llm_parameter_evaluation_strategy", + "LlmTokensCategoryUsage": ".llm_tokens_category_usage", + "LlmUsageCalculatorLlmResponseModel": ".llm_usage_calculator_llm_response_model", + "LlmUsageCalculatorResponseModel": ".llm_usage_calculator_response_model", + "LlmUsageInput": ".llm_usage_input", + "LlmUsageOutput": ".llm_usage_output", + "ManualVerificationFileResponse": ".manual_verification_file_response", + "ManualVerificationResponse": ".manual_verification_response", + "McpApprovalPolicy": ".mcp_approval_policy", + "McpServerConfigInput": ".mcp_server_config_input", + "McpServerConfigInputRequestHeadersValue": ".mcp_server_config_input_request_headers_value", + "McpServerConfigInputSecretToken": ".mcp_server_config_input_secret_token", + "McpServerConfigInputUrl": ".mcp_server_config_input_url", + "McpServerConfigOutput": ".mcp_server_config_output", + "McpServerConfigOutputRequestHeadersValue": ".mcp_server_config_output_request_headers_value", + "McpServerConfigOutputSecretToken": ".mcp_server_config_output_secret_token", + "McpServerConfigOutputUrl": ".mcp_server_config_output_url", + "McpServerMetadataResponseModel": ".mcp_server_metadata_response_model", + "McpServerResponseModel": ".mcp_server_response_model", + "McpServerResponseModelDependentAgentsItem": ".mcp_server_response_model_dependent_agents_item", + "McpServerResponseModelDependentAgentsItem_Available": ".mcp_server_response_model_dependent_agents_item", + "McpServerResponseModelDependentAgentsItem_Unknown": ".mcp_server_response_model_dependent_agents_item", + "McpServerTransport": ".mcp_server_transport", + "McpServersResponseModel": ".mcp_servers_response_model", + "McpToolApprovalHash": ".mcp_tool_approval_hash", + "McpToolApprovalPolicy": ".mcp_tool_approval_policy", + "MetricRecord": ".metric_record", + "MetricType": ".metric_type", + "Model": ".model", + "ModelRatesResponseModel": ".model_rates_response_model", + "ModelResponseModelConcurrencyGroup": ".model_response_model_concurrency_group", + "ModelSettingsResponseModel": ".model_settings_response_model", + "ModerationStatusResponseModel": ".moderation_status_response_model", + "ModerationStatusResponseModelSafetyStatus": ".moderation_status_response_model_safety_status", + "ModerationStatusResponseModelWarningStatus": ".moderation_status_response_model_warning_status", + "MultichannelSpeechToTextResponseModel": ".multichannel_speech_to_text_response_model", + "MultipartMusicResponse": ".multipart_music_response", + "MusicPrompt": ".music_prompt", + "NormalizedAlignment": ".normalized_alignment", + "ObjectJsonSchemaPropertyInput": ".object_json_schema_property_input", + "ObjectJsonSchemaPropertyInputPropertiesValue": ".object_json_schema_property_input_properties_value", + "ObjectJsonSchemaPropertyOutput": ".object_json_schema_property_output", + "ObjectJsonSchemaPropertyOutputPropertiesValue": ".object_json_schema_property_output_properties_value", + "OrbAvatar": ".orb_avatar", + "OutboundCallRecipient": ".outbound_call_recipient", + "OutboundCallRecipientResponseModel": ".outbound_call_recipient_response_model", + "OutboundSipTrunkConfigRequestModel": ".outbound_sip_trunk_config_request_model", + "OutputFormat": ".output_format", + "PdfExportOptions": ".pdf_export_options", + "PendingCancellationResponseModel": ".pending_cancellation_response_model", + "PendingSubscriptionSwitchResponseModel": ".pending_subscription_switch_response_model", + "PendingSubscriptionSwitchResponseModelNextTier": ".pending_subscription_switch_response_model_next_tier", + "PhoneNumberAgentInfo": ".phone_number_agent_info", + "PhoneNumberTransfer": ".phone_number_transfer", + "PhoneNumberTransferDestination": ".phone_number_transfer_destination", + "PhoneNumberTransferTransferDestination": ".phone_number_transfer_transfer_destination", + "PhoneNumberTransferTransferDestination_Phone": ".phone_number_transfer_transfer_destination", + "PhoneNumberTransferTransferDestination_SipUri": ".phone_number_transfer_transfer_destination", + "PlayDtmfResultErrorModel": ".play_dtmf_result_error_model", + "PlayDtmfResultSuccessModel": ".play_dtmf_result_success_model", + "PlayDtmfToolConfig": ".play_dtmf_tool_config", + "PodcastBulletinMode": ".podcast_bulletin_mode", + "PodcastBulletinModeData": ".podcast_bulletin_mode_data", + "PodcastConversationMode": ".podcast_conversation_mode", + "PodcastConversationModeData": ".podcast_conversation_mode_data", + "PodcastProjectResponseModel": ".podcast_project_response_model", + "PodcastTextSource": ".podcast_text_source", + "PodcastUrlSource": ".podcast_url_source", + "Position": ".position", + "PostAgentAvatarResponseModel": ".post_agent_avatar_response_model", + "PostWorkspaceSecretResponseModel": ".post_workspace_secret_response_model", + "PrivacyConfig": ".privacy_config", + "ProjectCreationMetaResponseModel": ".project_creation_meta_response_model", + "ProjectCreationMetaResponseModelStatus": ".project_creation_meta_response_model_status", + "ProjectCreationMetaResponseModelType": ".project_creation_meta_response_model_type", + "ProjectExtendedResponse": ".project_extended_response", + "ProjectExtendedResponseModelAccessLevel": ".project_extended_response_model_access_level", + "ProjectExtendedResponseModelApplyTextNormalization": ".project_extended_response_model_apply_text_normalization", + "ProjectExtendedResponseModelFiction": ".project_extended_response_model_fiction", + "ProjectExtendedResponseModelQualityPreset": ".project_extended_response_model_quality_preset", + "ProjectExtendedResponseModelSourceType": ".project_extended_response_model_source_type", + "ProjectExtendedResponseModelTargetAudience": ".project_extended_response_model_target_audience", + "ProjectResponse": ".project_response", + "ProjectResponseModelAccessLevel": ".project_response_model_access_level", + "ProjectResponseModelFiction": ".project_response_model_fiction", + "ProjectResponseModelSourceType": ".project_response_model_source_type", + "ProjectResponseModelTargetAudience": ".project_response_model_target_audience", + "ProjectSnapshotExtendedResponseModel": ".project_snapshot_extended_response_model", + "ProjectSnapshotResponse": ".project_snapshot_response", + "ProjectSnapshotsResponse": ".project_snapshots_response", + "ProjectState": ".project_state", + "PromptAgent": ".prompt_agent", + "PromptAgentApiModelInput": ".prompt_agent_api_model_input", + "PromptAgentApiModelInputToolsItem": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelInputToolsItem_Client": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelInputToolsItem_Mcp": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelInputToolsItem_System": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelInputToolsItem_Webhook": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelOutput": ".prompt_agent_api_model_output", + "PromptAgentApiModelOutputToolsItem": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOutputToolsItem_Client": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOutputToolsItem_Mcp": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOutputToolsItem_System": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOutputToolsItem_Webhook": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOverride": ".prompt_agent_api_model_override", + "PromptAgentApiModelOverrideConfig": ".prompt_agent_api_model_override_config", + "PromptAgentApiModelWorkflowOverride": ".prompt_agent_api_model_workflow_override", + "PromptAgentApiModelWorkflowOverrideToolsItem": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentApiModelWorkflowOverrideToolsItem_Client": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentApiModelWorkflowOverrideToolsItem_System": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentDbModel": ".prompt_agent_db_model", + "PromptEvaluationCriteria": ".prompt_evaluation_criteria", + "PronunciationDictionaryAliasRuleRequestModel": ".pronunciation_dictionary_alias_rule_request_model", + "PronunciationDictionaryLocator": ".pronunciation_dictionary_locator", + "PronunciationDictionaryLocatorResponseModel": ".pronunciation_dictionary_locator_response_model", + "PronunciationDictionaryPhonemeRuleRequestModel": ".pronunciation_dictionary_phoneme_rule_request_model", + "PronunciationDictionaryRulesResponseModel": ".pronunciation_dictionary_rules_response_model", + "PronunciationDictionaryVersionLocator": ".pronunciation_dictionary_version_locator", + "PronunciationDictionaryVersionResponseModel": ".pronunciation_dictionary_version_response_model", + "PronunciationDictionaryVersionResponseModelPermissionOnResource": ".pronunciation_dictionary_version_response_model_permission_on_resource", + "PydanticPronunciationDictionaryVersionLocator": ".pydantic_pronunciation_dictionary_version_locator", + "QueryParamsJsonSchema": ".query_params_json_schema", + "RagChunkMetadata": ".rag_chunk_metadata", + "RagConfig": ".rag_config", + "RagConfigWorkflowOverride": ".rag_config_workflow_override", + "RagDocumentIndexResponseModel": ".rag_document_index_response_model", + "RagDocumentIndexUsage": ".rag_document_index_usage", + "RagDocumentIndexesResponseModel": ".rag_document_indexes_response_model", + "RagIndexOverviewEmbeddingModelResponseModel": ".rag_index_overview_embedding_model_response_model", + "RagIndexOverviewResponseModel": ".rag_index_overview_response_model", + "RagIndexStatus": ".rag_index_status", + "RagRetrievalInfo": ".rag_retrieval_info", + "ReaderResourceResponseModel": ".reader_resource_response_model", + "ReaderResourceResponseModelResourceType": ".reader_resource_response_model_resource_type", + "RealtimeVoiceSettings": ".realtime_voice_settings", + "RecordingResponse": ".recording_response", + "ReferencedToolCommonModel": ".referenced_tool_common_model", + "RegexParameterEvaluationStrategy": ".regex_parameter_evaluation_strategy", + "RemoveMemberFromGroupRequest": ".remove_member_from_group_request", + "Render": ".render", + "RenderStatus": ".render_status", + "RenderType": ".render_type", + "RequestPvcManualVerificationResponseModel": ".request_pvc_manual_verification_response_model", + "ResourceAccessInfo": ".resource_access_info", + "ResourceAccessInfoRole": ".resource_access_info_role", + "ResourceMetadataResponseModel": ".resource_metadata_response_model", + "ResourceMetadataResponseModelAnonymousAccessLevelOverride": ".resource_metadata_response_model_anonymous_access_level_override", + "ReviewStatus": ".review_status", + "SafetyCommonModel": ".safety_common_model", + "SafetyEvaluation": ".safety_evaluation", + "SafetyResponseModel": ".safety_response_model", + "SafetyRule": ".safety_rule", + "SaveVoicePreviewRequest": ".save_voice_preview_request", + "SecretDependencyType": ".secret_dependency_type", + "SegmentCreateResponse": ".segment_create_response", + "SegmentDeleteResponse": ".segment_delete_response", + "SegmentDubResponse": ".segment_dub_response", + "SegmentSubtitleFrame": ".segment_subtitle_frame", + "SegmentTranscriptionResponse": ".segment_transcription_response", + "SegmentTranslationResponse": ".segment_translation_response", + "SegmentUpdateResponse": ".segment_update_response", + "SegmentedJsonExportOptions": ".segmented_json_export_options", + "SendText": ".send_text", + "SendTextMulti": ".send_text_multi", + "ShareOptionResponseModel": ".share_option_response_model", + "ShareOptionResponseModelType": ".share_option_response_model_type", + "SimilarVoice": ".similar_voice", + "SimilarVoiceCategory": ".similar_voice_category", + "SimilarVoicesForSpeakerResponse": ".similar_voices_for_speaker_response", + "SingleTestRunRequestModel": ".single_test_run_request_model", + "SipMediaEncryptionEnum": ".sip_media_encryption_enum", + "SipTrunkCredentialsRequestModel": ".sip_trunk_credentials_request_model", + "SipTrunkOutboundCallResponse": ".sip_trunk_outbound_call_response", + "SipTrunkTransportEnum": ".sip_trunk_transport_enum", + "SipUriTransferDestination": ".sip_uri_transfer_destination", + "SkipTurnToolConfig": ".skip_turn_tool_config", + "SkipTurnToolResponseModel": ".skip_turn_tool_response_model", + "SongMetadata": ".song_metadata", + "SongSection": ".song_section", + "SpeakerAudioResponseModel": ".speaker_audio_response_model", + "SpeakerResponseModel": ".speaker_response_model", + "SpeakerSegment": ".speaker_segment", + "SpeakerSeparationResponseModel": ".speaker_separation_response_model", + "SpeakerSeparationResponseModelStatus": ".speaker_separation_response_model_status", + "SpeakerTrack": ".speaker_track", + "SpeakerUpdatedResponse": ".speaker_updated_response", + "SpeechHistoryItemResponse": ".speech_history_item_response", + "SpeechHistoryItemResponseModelSource": ".speech_history_item_response_model_source", + "SpeechHistoryItemResponseModelVoiceCategory": ".speech_history_item_response_model_voice_category", + "SpeechToTextCharacterResponseModel": ".speech_to_text_character_response_model", + "SpeechToTextChunkResponseModel": ".speech_to_text_chunk_response_model", + "SpeechToTextWebhookResponseModel": ".speech_to_text_webhook_response_model", + "SpeechToTextWordResponseModel": ".speech_to_text_word_response_model", + "SpeechToTextWordResponseModelType": ".speech_to_text_word_response_model_type", + "SrtExportOptions": ".srt_export_options", + "StartPvcVoiceTrainingResponseModel": ".start_pvc_voice_training_response_model", + "StartSpeakerSeparationResponseModel": ".start_speaker_separation_response_model", + "StreamingAudioChunkWithTimestampsResponse": ".streaming_audio_chunk_with_timestamps_response", + "Subscription": ".subscription", + "SubscriptionExtrasResponseModel": ".subscription_extras_response_model", + "SubscriptionResponse": ".subscription_response", + "SubscriptionResponseModelBillingPeriod": ".subscription_response_model_billing_period", + "SubscriptionResponseModelCharacterRefreshPeriod": ".subscription_response_model_character_refresh_period", + "SubscriptionResponseModelCurrency": ".subscription_response_model_currency", + "SubscriptionStatusType": ".subscription_status_type", + "SubscriptionUsageResponseModel": ".subscription_usage_response_model", + "SupportedVoice": ".supported_voice", + "SystemToolConfigInput": ".system_tool_config_input", + "SystemToolConfigInputParams": ".system_tool_config_input_params", + "SystemToolConfigInputParams_EndCall": ".system_tool_config_input_params", + "SystemToolConfigInputParams_LanguageDetection": ".system_tool_config_input_params", + "SystemToolConfigInputParams_PlayKeypadTouchTone": ".system_tool_config_input_params", + "SystemToolConfigInputParams_SkipTurn": ".system_tool_config_input_params", + "SystemToolConfigInputParams_TransferToAgent": ".system_tool_config_input_params", + "SystemToolConfigInputParams_TransferToNumber": ".system_tool_config_input_params", + "SystemToolConfigInputParams_VoicemailDetection": ".system_tool_config_input_params", + "SystemToolConfigOutput": ".system_tool_config_output", + "SystemToolConfigOutputParams": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_EndCall": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_LanguageDetection": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_PlayKeypadTouchTone": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_SkipTurn": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_TransferToAgent": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_TransferToNumber": ".system_tool_config_output_params", + "SystemToolConfigOutputParams_VoicemailDetection": ".system_tool_config_output_params", + "TelephonyProvider": ".telephony_provider", + "TestConditionRationaleCommonModel": ".test_condition_rationale_common_model", + "TestConditionResultCommonModel": ".test_condition_result_common_model", + "TestRunMetadata": ".test_run_metadata", + "TestRunMetadataTestType": ".test_run_metadata_test_type", + "TestRunStatus": ".test_run_status", + "TestToolResultModel": ".test_tool_result_model", + "TestsFeatureUsageCommonModel": ".tests_feature_usage_common_model", + "TextToSpeechApplyTextNormalizationEnum": ".text_to_speech_apply_text_normalization_enum", + "TextToSpeechOutputFormatEnum": ".text_to_speech_output_format_enum", + "TextToSpeechStreamRequest": ".text_to_speech_stream_request", + "TokenResponseModel": ".token_response_model", + "Tool": ".tool", + "ToolAnnotations": ".tool_annotations", + "ToolMockConfig": ".tool_mock_config", + "ToolRequestModel": ".tool_request_model", + "ToolRequestModelToolConfig": ".tool_request_model_tool_config", + "ToolRequestModelToolConfig_Client": ".tool_request_model_tool_config", + "ToolRequestModelToolConfig_Mcp": ".tool_request_model_tool_config", + "ToolRequestModelToolConfig_System": ".tool_request_model_tool_config", + "ToolRequestModelToolConfig_Webhook": ".tool_request_model_tool_config", + "ToolResponseModel": ".tool_response_model", + "ToolResponseModelToolConfig": ".tool_response_model_tool_config", + "ToolResponseModelToolConfig_Client": ".tool_response_model_tool_config", + "ToolResponseModelToolConfig_Mcp": ".tool_response_model_tool_config", + "ToolResponseModelToolConfig_System": ".tool_response_model_tool_config", + "ToolResponseModelToolConfig_Webhook": ".tool_response_model_tool_config", + "ToolType": ".tool_type", + "ToolUsageStatsResponseModel": ".tool_usage_stats_response_model", + "ToolsResponseModel": ".tools_response_model", + "TransferToAgentToolConfig": ".transfer_to_agent_tool_config", + "TransferToAgentToolResultErrorModel": ".transfer_to_agent_tool_result_error_model", + "TransferToAgentToolResultSuccessModel": ".transfer_to_agent_tool_result_success_model", + "TransferToNumberResultErrorModel": ".transfer_to_number_result_error_model", + "TransferToNumberResultSipSuccessModel": ".transfer_to_number_result_sip_success_model", + "TransferToNumberResultTwilioSuccessModel": ".transfer_to_number_result_twilio_success_model", + "TransferToNumberToolConfigInput": ".transfer_to_number_tool_config_input", + "TransferToNumberToolConfigOutput": ".transfer_to_number_tool_config_output", + "TransferTypeEnum": ".transfer_type_enum", + "TtsConversationalConfigInput": ".tts_conversational_config_input", + "TtsConversationalConfigOutput": ".tts_conversational_config_output", + "TtsConversationalConfigOverride": ".tts_conversational_config_override", + "TtsConversationalConfigOverrideConfig": ".tts_conversational_config_override_config", + "TtsConversationalConfigWorkflowOverride": ".tts_conversational_config_workflow_override", + "TtsConversationalModel": ".tts_conversational_model", + "TtsModelFamily": ".tts_model_family", + "TtsOptimizeStreamingLatency": ".tts_optimize_streaming_latency", + "TtsOutputFormat": ".tts_output_format", + "TurnConfig": ".turn_config", + "TurnConfigWorkflowOverride": ".turn_config_workflow_override", + "TurnMode": ".turn_mode", + "TwilioOutboundCallResponse": ".twilio_outbound_call_response", + "TxtExportOptions": ".txt_export_options", + "UnitTestRunResponseModel": ".unit_test_run_response_model", + "UnitTestSummaryResponseModel": ".unit_test_summary_response_model", + "UnitTestToolCallEvaluationModelInput": ".unit_test_tool_call_evaluation_model_input", + "UnitTestToolCallEvaluationModelOutput": ".unit_test_tool_call_evaluation_model_output", + "UnitTestToolCallParameter": ".unit_test_tool_call_parameter", + "UnitTestToolCallParameterEval": ".unit_test_tool_call_parameter_eval", + "UnitTestToolCallParameterEval_Exact": ".unit_test_tool_call_parameter_eval", + "UnitTestToolCallParameterEval_Llm": ".unit_test_tool_call_parameter_eval", + "UnitTestToolCallParameterEval_Regex": ".unit_test_tool_call_parameter_eval", + "UpdateAudioNativeProjectRequest": ".update_audio_native_project_request", + "UpdateChapterRequest": ".update_chapter_request", + "UpdateProjectRequest": ".update_project_request", + "UpdatePronunciationDictionariesRequest": ".update_pronunciation_dictionaries_request", + "UpdateWorkspaceMemberResponseModel": ".update_workspace_member_response_model", + "UrlAvatar": ".url_avatar", + "UsageAggregationInterval": ".usage_aggregation_interval", + "UsageCharactersResponseModel": ".usage_characters_response_model", + "User": ".user", + "UserFeedback": ".user_feedback", + "UserFeedbackScore": ".user_feedback_score", + "UtteranceResponseModel": ".utterance_response_model", + "ValidationError": ".validation_error", + "ValidationErrorLocItem": ".validation_error_loc_item", + "VerificationAttemptResponse": ".verification_attempt_response", + "VerifiedVoiceLanguageResponseModel": ".verified_voice_language_response_model", + "VerifyPvcVoiceCaptchaResponseModel": ".verify_pvc_voice_captcha_response_model", + "Voice": ".voice", + "VoiceDesignPreviewResponse": ".voice_design_preview_response", + "VoiceGenerationParameterOptionResponse": ".voice_generation_parameter_option_response", + "VoiceGenerationParameterResponse": ".voice_generation_parameter_response", + "VoiceMailDetectionResultSuccessModel": ".voice_mail_detection_result_success_model", + "VoicePreviewResponseModel": ".voice_preview_response_model", + "VoiceResponseModelCategory": ".voice_response_model_category", + "VoiceResponseModelSafetyControl": ".voice_response_model_safety_control", + "VoiceSample": ".voice_sample", + "VoiceSamplePreviewResponseModel": ".voice_sample_preview_response_model", + "VoiceSampleVisualWaveformResponseModel": ".voice_sample_visual_waveform_response_model", + "VoiceSettings": ".voice_settings", + "VoiceSharingModerationCheckResponseModel": ".voice_sharing_moderation_check_response_model", + "VoiceSharingResponse": ".voice_sharing_response", + "VoiceSharingResponseModelCategory": ".voice_sharing_response_model_category", + "VoiceSharingState": ".voice_sharing_state", + "VoiceVerificationResponse": ".voice_verification_response", + "VoicemailDetectionToolConfig": ".voicemail_detection_tool_config", + "WebhookAuthMethodType": ".webhook_auth_method_type", + "WebhookToolApiSchemaConfigInput": ".webhook_tool_api_schema_config_input", + "WebhookToolApiSchemaConfigInputMethod": ".webhook_tool_api_schema_config_input_method", + "WebhookToolApiSchemaConfigInputRequestHeadersValue": ".webhook_tool_api_schema_config_input_request_headers_value", + "WebhookToolApiSchemaConfigOutput": ".webhook_tool_api_schema_config_output", + "WebhookToolApiSchemaConfigOutputMethod": ".webhook_tool_api_schema_config_output_method", + "WebhookToolApiSchemaConfigOutputRequestHeadersValue": ".webhook_tool_api_schema_config_output_request_headers_value", + "WebhookToolConfigInput": ".webhook_tool_config_input", + "WebhookToolConfigOutput": ".webhook_tool_config_output", + "WebhookUsageType": ".webhook_usage_type", + "WebsocketTtsClientMessageMulti": ".websocket_tts_client_message_multi", + "WebsocketTtsServerMessageMulti": ".websocket_tts_server_message_multi", + "WidgetConfig": ".widget_config", + "WidgetConfigInputAvatar": ".widget_config_input_avatar", + "WidgetConfigInputAvatar_Image": ".widget_config_input_avatar", + "WidgetConfigInputAvatar_Orb": ".widget_config_input_avatar", + "WidgetConfigInputAvatar_Url": ".widget_config_input_avatar", + "WidgetConfigOutputAvatar": ".widget_config_output_avatar", + "WidgetConfigOutputAvatar_Image": ".widget_config_output_avatar", + "WidgetConfigOutputAvatar_Orb": ".widget_config_output_avatar", + "WidgetConfigOutputAvatar_Url": ".widget_config_output_avatar", + "WidgetConfigResponse": ".widget_config_response", + "WidgetConfigResponseModelAvatar": ".widget_config_response_model_avatar", + "WidgetConfigResponseModelAvatar_Image": ".widget_config_response_model_avatar", + "WidgetConfigResponseModelAvatar_Orb": ".widget_config_response_model_avatar", + "WidgetConfigResponseModelAvatar_Url": ".widget_config_response_model_avatar", + "WidgetExpandable": ".widget_expandable", + "WidgetFeedbackMode": ".widget_feedback_mode", + "WidgetLanguagePreset": ".widget_language_preset", + "WidgetLanguagePresetResponse": ".widget_language_preset_response", + "WidgetPlacement": ".widget_placement", + "WidgetStyles": ".widget_styles", + "WidgetTextContents": ".widget_text_contents", + "WorkflowEdgeModel": ".workflow_edge_model", + "WorkflowEdgeModelBackwardCondition": ".workflow_edge_model_backward_condition", + "WorkflowEdgeModelBackwardCondition_Llm": ".workflow_edge_model_backward_condition", + "WorkflowEdgeModelBackwardCondition_Result": ".workflow_edge_model_backward_condition", + "WorkflowEdgeModelBackwardCondition_Unconditional": ".workflow_edge_model_backward_condition", + "WorkflowEdgeModelForwardCondition": ".workflow_edge_model_forward_condition", + "WorkflowEdgeModelForwardCondition_Llm": ".workflow_edge_model_forward_condition", + "WorkflowEdgeModelForwardCondition_Result": ".workflow_edge_model_forward_condition", + "WorkflowEdgeModelForwardCondition_Unconditional": ".workflow_edge_model_forward_condition", + "WorkflowEndNodeModel": ".workflow_end_node_model", + "WorkflowFeaturesUsageCommonModel": ".workflow_features_usage_common_model", + "WorkflowLlmConditionModel": ".workflow_llm_condition_model", + "WorkflowOverrideAgentNodeModel": ".workflow_override_agent_node_model", + "WorkflowPhoneNumberNodeModel": ".workflow_phone_number_node_model", + "WorkflowPhoneNumberNodeModelTransferDestination": ".workflow_phone_number_node_model_transfer_destination", + "WorkflowPhoneNumberNodeModelTransferDestination_Phone": ".workflow_phone_number_node_model_transfer_destination", + "WorkflowPhoneNumberNodeModelTransferDestination_SipUri": ".workflow_phone_number_node_model_transfer_destination", + "WorkflowResultConditionModel": ".workflow_result_condition_model", + "WorkflowStandaloneAgentNodeModel": ".workflow_standalone_agent_node_model", + "WorkflowStartNodeModel": ".workflow_start_node_model", + "WorkflowToolEdgeStepModel": ".workflow_tool_edge_step_model", + "WorkflowToolLocator": ".workflow_tool_locator", + "WorkflowToolMaxIterationsExceededStepModel": ".workflow_tool_max_iterations_exceeded_step_model", + "WorkflowToolNestedToolsStepModelInput": ".workflow_tool_nested_tools_step_model_input", + "WorkflowToolNestedToolsStepModelInputResultsItem": ".workflow_tool_nested_tools_step_model_input_results_item", + "WorkflowToolNestedToolsStepModelOutput": ".workflow_tool_nested_tools_step_model_output", + "WorkflowToolNestedToolsStepModelOutputResultsItem": ".workflow_tool_nested_tools_step_model_output_results_item", + "WorkflowToolNodeModel": ".workflow_tool_node_model", + "WorkflowToolResponseModelInput": ".workflow_tool_response_model_input", + "WorkflowToolResponseModelInputStepsItem": ".workflow_tool_response_model_input_steps_item", + "WorkflowToolResponseModelInputStepsItem_Edge": ".workflow_tool_response_model_input_steps_item", + "WorkflowToolResponseModelInputStepsItem_MaxIterationsExceeded": ".workflow_tool_response_model_input_steps_item", + "WorkflowToolResponseModelInputStepsItem_NestedTools": ".workflow_tool_response_model_input_steps_item", + "WorkflowToolResponseModelOutput": ".workflow_tool_response_model_output", + "WorkflowToolResponseModelOutputStepsItem": ".workflow_tool_response_model_output_steps_item", + "WorkflowToolResponseModelOutputStepsItem_Edge": ".workflow_tool_response_model_output_steps_item", + "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded": ".workflow_tool_response_model_output_steps_item", + "WorkflowToolResponseModelOutputStepsItem_NestedTools": ".workflow_tool_response_model_output_steps_item", + "WorkflowUnconditionalModel": ".workflow_unconditional_model", + "WorkspaceApiKeyListResponseModel": ".workspace_api_key_list_response_model", + "WorkspaceApiKeyResponseModel": ".workspace_api_key_response_model", + "WorkspaceApiKeyResponseModelPermissionsItem": ".workspace_api_key_response_model_permissions_item", + "WorkspaceBatchCallsResponse": ".workspace_batch_calls_response", + "WorkspaceCreateApiKeyResponseModel": ".workspace_create_api_key_response_model", + "WorkspaceGroupByNameResponseModel": ".workspace_group_by_name_response_model", + "WorkspaceResourceType": ".workspace_resource_type", + "WorkspaceServiceAccountListResponseModel": ".workspace_service_account_list_response_model", + "WorkspaceServiceAccountResponseModel": ".workspace_service_account_response_model", + "WorkspaceWebhookListResponseModel": ".workspace_webhook_list_response_model", + "WorkspaceWebhookResponseModel": ".workspace_webhook_response_model", + "WorkspaceWebhookUsageResponseModel": ".workspace_webhook_usage_response_model", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "AddChapterResponseModel", diff --git a/src/elevenlabs/types/agent_config.py b/src/elevenlabs/types/agent_config.py index 4b2ff3a8..b580ba0a 100644 --- a/src/elevenlabs/types/agent_config.py +++ b/src/elevenlabs/types/agent_config.py @@ -27,6 +27,11 @@ class AgentConfig(UncheckedBaseModel): Configuration for dynamic variables """ + disable_first_message_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while the first message is being delivered. + """ + prompt: typing.Optional[PromptAgentApiModelOutput] = pydantic.Field(default=None) """ The prompt for the agent diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override.py b/src/elevenlabs/types/agent_config_api_model_workflow_override.py index d234cc68..a5d660e5 100644 --- a/src/elevenlabs/types/agent_config_api_model_workflow_override.py +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override.py @@ -27,6 +27,11 @@ class AgentConfigApiModelWorkflowOverride(UncheckedBaseModel): Configuration for dynamic variables """ + disable_first_message_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while the first message is being delivered. + """ + prompt: typing.Optional[PromptAgentApiModelWorkflowOverride] = pydantic.Field(default=None) """ The prompt for the agent diff --git a/src/elevenlabs/types/agent_workflow_request_model.py b/src/elevenlabs/types/agent_workflow_request_model.py index 64452bd1..12041f67 100644 --- a/src/elevenlabs/types/agent_workflow_request_model.py +++ b/src/elevenlabs/types/agent_workflow_request_model.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_workflow_request_model_nodes_value import AgentWorkflowRequestModelNodesValue from .workflow_edge_model import WorkflowEdgeModel @@ -21,3 +23,9 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(AgentWorkflowRequestModel) diff --git a/src/elevenlabs/types/object_json_schema_property_input.py b/src/elevenlabs/types/object_json_schema_property_input.py index 5e23b6f4..48fdb785 100644 --- a/src/elevenlabs/types/object_json_schema_property_input.py +++ b/src/elevenlabs/types/object_json_schema_property_input.py @@ -25,6 +25,7 @@ class Config: extra = pydantic.Extra.allow +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue # noqa: E402, F401, I001 update_forward_refs(ObjectJsonSchemaPropertyInput) diff --git a/src/elevenlabs/types/object_json_schema_property_output.py b/src/elevenlabs/types/object_json_schema_property_output.py index 0786bccb..1cafccd6 100644 --- a/src/elevenlabs/types/object_json_schema_property_output.py +++ b/src/elevenlabs/types/object_json_schema_property_output.py @@ -25,6 +25,7 @@ class Config: extra = pydantic.Extra.allow +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue # noqa: E402, F401, I001 update_forward_refs(ObjectJsonSchemaPropertyOutput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_input.py b/src/elevenlabs/types/workflow_tool_response_model_input.py index 3bbc856e..4efdab87 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_input.py +++ b/src/elevenlabs/types/workflow_tool_response_model_input.py @@ -7,7 +7,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel class WorkflowToolResponseModelInput(UncheckedBaseModel): @@ -15,7 +14,6 @@ class WorkflowToolResponseModelInput(UncheckedBaseModel): A common model for workflow tool responses. """ - final_transfer: typing.Optional[TransferToAgentToolResultSuccessModel] = None steps: typing.Optional[typing.List["WorkflowToolResponseModelInputStepsItem"]] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/workflow_tool_response_model_output.py b/src/elevenlabs/types/workflow_tool_response_model_output.py index 4e922538..740bf0a5 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_output.py +++ b/src/elevenlabs/types/workflow_tool_response_model_output.py @@ -7,7 +7,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .transfer_to_agent_tool_result_success_model import TransferToAgentToolResultSuccessModel class WorkflowToolResponseModelOutput(UncheckedBaseModel): @@ -15,7 +14,6 @@ class WorkflowToolResponseModelOutput(UncheckedBaseModel): A common model for workflow tool responses. """ - final_transfer: typing.Optional[TransferToAgentToolResultSuccessModel] = None steps: typing.Optional[typing.List["WorkflowToolResponseModelOutputStepsItem"]] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/user/__init__.py b/src/elevenlabs/user/__init__.py index d07505ef..1dd5020a 100644 --- a/src/elevenlabs/user/__init__.py +++ b/src/elevenlabs/user/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import subscription +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import subscription +_dynamic_imports: typing.Dict[str, str] = {"subscription": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["subscription"] diff --git a/src/elevenlabs/user/client.py b/src/elevenlabs/user/client.py index 0dd631f1..9fec4817 100644 --- a/src/elevenlabs/user/client.py +++ b/src/elevenlabs/user/client.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.user import User from .raw_client import AsyncRawUserClient, RawUserClient -from .subscription.client import AsyncSubscriptionClient, SubscriptionClient + +if typing.TYPE_CHECKING: + from .subscription.client import AsyncSubscriptionClient, SubscriptionClient class UserClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawUserClient(client_wrapper=client_wrapper) - self.subscription = SubscriptionClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._subscription: typing.Optional[SubscriptionClient] = None @property def with_raw_response(self) -> RawUserClient: @@ -51,11 +56,20 @@ def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Use _response = self._raw_client.get(request_options=request_options) return _response.data + @property + def subscription(self): + if self._subscription is None: + from .subscription.client import SubscriptionClient # noqa: E402 + + self._subscription = SubscriptionClient(client_wrapper=self._client_wrapper) + return self._subscription + class AsyncUserClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawUserClient(client_wrapper=client_wrapper) - self.subscription = AsyncSubscriptionClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._subscription: typing.Optional[AsyncSubscriptionClient] = None @property def with_raw_response(self) -> AsyncRawUserClient: @@ -101,3 +115,11 @@ async def main() -> None: """ _response = await self._raw_client.get(request_options=request_options) return _response.data + + @property + def subscription(self): + if self._subscription is None: + from .subscription.client import AsyncSubscriptionClient # noqa: E402 + + self._subscription = AsyncSubscriptionClient(client_wrapper=self._client_wrapper) + return self._subscription diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py index 358eb08b..e3c7095d 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import ReceiveMessageMulti, SendMessageMulti +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ReceiveMessageMulti, SendMessageMulti +_dynamic_imports: typing.Dict[str, str] = {"ReceiveMessageMulti": ".types", "SendMessageMulti": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ReceiveMessageMulti", "SendMessageMulti"] diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py index 19eb1be0..a8cda802 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py @@ -2,7 +2,35 @@ # isort: skip_file -from .receive_message_multi import ReceiveMessageMulti -from .send_message_multi import SendMessageMulti +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .receive_message_multi import ReceiveMessageMulti + from .send_message_multi import SendMessageMulti +_dynamic_imports: typing.Dict[str, str] = { + "ReceiveMessageMulti": ".receive_message_multi", + "SendMessageMulti": ".send_message_multi", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ReceiveMessageMulti", "SendMessageMulti"] diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py index eb078073..ea22558c 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import ReceiveMessage, SendMessage +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ReceiveMessage, SendMessage +_dynamic_imports: typing.Dict[str, str] = {"ReceiveMessage": ".types", "SendMessage": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ReceiveMessage", "SendMessage"] diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py index 5a8a8985..9f336c67 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py @@ -2,7 +2,32 @@ # isort: skip_file -from .receive_message import ReceiveMessage -from .send_message import SendMessage +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .receive_message import ReceiveMessage + from .send_message import SendMessage +_dynamic_imports: typing.Dict[str, str] = {"ReceiveMessage": ".receive_message", "SendMessage": ".send_message"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["ReceiveMessage", "SendMessage"] diff --git a/src/elevenlabs/voices/__init__.py b/src/elevenlabs/voices/__init__.py index 736abb95..3ede28ea 100644 --- a/src/elevenlabs/voices/__init__.py +++ b/src/elevenlabs/voices/__init__.py @@ -2,7 +2,38 @@ # isort: skip_file -from .types import VoicesGetSharedRequestCategory -from . import ivc, pvc, samples, settings +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import VoicesGetSharedRequestCategory + from . import ivc, pvc, samples, settings +_dynamic_imports: typing.Dict[str, str] = { + "VoicesGetSharedRequestCategory": ".types", + "ivc": ".", + "pvc": ".", + "samples": ".", + "settings": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["VoicesGetSharedRequestCategory", "ivc", "pvc", "samples", "settings"] diff --git a/src/elevenlabs/voices/client.py b/src/elevenlabs/voices/client.py index 508043d0..1b7e56ad 100644 --- a/src/elevenlabs/voices/client.py +++ b/src/elevenlabs/voices/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .. import core @@ -12,13 +14,14 @@ from ..types.get_voices_response import GetVoicesResponse from ..types.get_voices_v_2_response import GetVoicesV2Response from ..types.voice import Voice -from .ivc.client import AsyncIvcClient, IvcClient -from .pvc.client import AsyncPvcClient, PvcClient from .raw_client import AsyncRawVoicesClient, RawVoicesClient -from .samples.client import AsyncSamplesClient, SamplesClient -from .settings.client import AsyncSettingsClient, SettingsClient from .types.voices_get_shared_request_category import VoicesGetSharedRequestCategory +if typing.TYPE_CHECKING: + from .ivc.client import AsyncIvcClient, IvcClient + from .pvc.client import AsyncPvcClient, PvcClient + from .samples.client import AsyncSamplesClient, SamplesClient + from .settings.client import AsyncSettingsClient, SettingsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -26,13 +29,11 @@ class VoicesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawVoicesClient(client_wrapper=client_wrapper) - self.settings = SettingsClient(client_wrapper=client_wrapper) - - self.ivc = IvcClient(client_wrapper=client_wrapper) - - self.pvc = PvcClient(client_wrapper=client_wrapper) - - self.samples = SamplesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._settings: typing.Optional[SettingsClient] = None + self._ivc: typing.Optional[IvcClient] = None + self._pvc: typing.Optional[PvcClient] = None + self._samples: typing.Optional[SamplesClient] = None @property def with_raw_response(self) -> RawVoicesClient: @@ -520,17 +521,47 @@ def find_similar_voices( ) return _response.data + @property + def settings(self): + if self._settings is None: + from .settings.client import SettingsClient # noqa: E402 -class AsyncVoicesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawVoicesClient(client_wrapper=client_wrapper) - self.settings = AsyncSettingsClient(client_wrapper=client_wrapper) + self._settings = SettingsClient(client_wrapper=self._client_wrapper) + return self._settings - self.ivc = AsyncIvcClient(client_wrapper=client_wrapper) + @property + def ivc(self): + if self._ivc is None: + from .ivc.client import IvcClient # noqa: E402 + + self._ivc = IvcClient(client_wrapper=self._client_wrapper) + return self._ivc - self.pvc = AsyncPvcClient(client_wrapper=client_wrapper) + @property + def pvc(self): + if self._pvc is None: + from .pvc.client import PvcClient # noqa: E402 - self.samples = AsyncSamplesClient(client_wrapper=client_wrapper) + self._pvc = PvcClient(client_wrapper=self._client_wrapper) + return self._pvc + + @property + def samples(self): + if self._samples is None: + from .samples.client import SamplesClient # noqa: E402 + + self._samples = SamplesClient(client_wrapper=self._client_wrapper) + return self._samples + + +class AsyncVoicesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawVoicesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._settings: typing.Optional[AsyncSettingsClient] = None + self._ivc: typing.Optional[AsyncIvcClient] = None + self._pvc: typing.Optional[AsyncPvcClient] = None + self._samples: typing.Optional[AsyncSamplesClient] = None @property def with_raw_response(self) -> AsyncRawVoicesClient: @@ -1083,3 +1114,35 @@ async def main() -> None: request_options=request_options, ) return _response.data + + @property + def settings(self): + if self._settings is None: + from .settings.client import AsyncSettingsClient # noqa: E402 + + self._settings = AsyncSettingsClient(client_wrapper=self._client_wrapper) + return self._settings + + @property + def ivc(self): + if self._ivc is None: + from .ivc.client import AsyncIvcClient # noqa: E402 + + self._ivc = AsyncIvcClient(client_wrapper=self._client_wrapper) + return self._ivc + + @property + def pvc(self): + if self._pvc is None: + from .pvc.client import AsyncPvcClient # noqa: E402 + + self._pvc = AsyncPvcClient(client_wrapper=self._client_wrapper) + return self._pvc + + @property + def samples(self): + if self._samples is None: + from .samples.client import AsyncSamplesClient # noqa: E402 + + self._samples = AsyncSamplesClient(client_wrapper=self._client_wrapper) + return self._samples diff --git a/src/elevenlabs/voices/pvc/__init__.py b/src/elevenlabs/voices/pvc/__init__.py index bf59eb01..e2f6de53 100644 --- a/src/elevenlabs/voices/pvc/__init__.py +++ b/src/elevenlabs/voices/pvc/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import samples, verification +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import samples, verification +_dynamic_imports: typing.Dict[str, str] = {"samples": ".", "verification": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["samples", "verification"] diff --git a/src/elevenlabs/voices/pvc/client.py b/src/elevenlabs/voices/pvc/client.py index ceabf56f..ee0dd44f 100644 --- a/src/elevenlabs/voices/pvc/client.py +++ b/src/elevenlabs/voices/pvc/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -7,9 +9,10 @@ from ...types.add_voice_response_model import AddVoiceResponseModel from ...types.start_pvc_voice_training_response_model import StartPvcVoiceTrainingResponseModel from .raw_client import AsyncRawPvcClient, RawPvcClient -from .samples.client import AsyncSamplesClient, SamplesClient -from .verification.client import AsyncVerificationClient, VerificationClient +if typing.TYPE_CHECKING: + from .samples.client import AsyncSamplesClient, SamplesClient + from .verification.client import AsyncVerificationClient, VerificationClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -17,9 +20,9 @@ class PvcClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawPvcClient(client_wrapper=client_wrapper) - self.samples = SamplesClient(client_wrapper=client_wrapper) - - self.verification = VerificationClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._samples: typing.Optional[SamplesClient] = None + self._verification: typing.Optional[VerificationClient] = None @property def with_raw_response(self) -> RawPvcClient: @@ -182,13 +185,29 @@ def train( _response = self._raw_client.train(voice_id, model_id=model_id, request_options=request_options) return _response.data + @property + def samples(self): + if self._samples is None: + from .samples.client import SamplesClient # noqa: E402 + + self._samples = SamplesClient(client_wrapper=self._client_wrapper) + return self._samples + + @property + def verification(self): + if self._verification is None: + from .verification.client import VerificationClient # noqa: E402 + + self._verification = VerificationClient(client_wrapper=self._client_wrapper) + return self._verification + class AsyncPvcClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawPvcClient(client_wrapper=client_wrapper) - self.samples = AsyncSamplesClient(client_wrapper=client_wrapper) - - self.verification = AsyncVerificationClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._samples: typing.Optional[AsyncSamplesClient] = None + self._verification: typing.Optional[AsyncVerificationClient] = None @property def with_raw_response(self) -> AsyncRawPvcClient: @@ -374,3 +393,19 @@ async def main() -> None: """ _response = await self._raw_client.train(voice_id, model_id=model_id, request_options=request_options) return _response.data + + @property + def samples(self): + if self._samples is None: + from .samples.client import AsyncSamplesClient # noqa: E402 + + self._samples = AsyncSamplesClient(client_wrapper=self._client_wrapper) + return self._samples + + @property + def verification(self): + if self._verification is None: + from .verification.client import AsyncVerificationClient # noqa: E402 + + self._verification = AsyncVerificationClient(client_wrapper=self._client_wrapper) + return self._verification diff --git a/src/elevenlabs/voices/pvc/samples/__init__.py b/src/elevenlabs/voices/pvc/samples/__init__.py index 3115b6f0..c32c9783 100644 --- a/src/elevenlabs/voices/pvc/samples/__init__.py +++ b/src/elevenlabs/voices/pvc/samples/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import audio, speakers, waveform +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import audio, speakers, waveform +_dynamic_imports: typing.Dict[str, str] = {"audio": ".", "speakers": ".", "waveform": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["audio", "speakers", "waveform"] diff --git a/src/elevenlabs/voices/pvc/samples/client.py b/src/elevenlabs/voices/pvc/samples/client.py index a36f98c3..3fb921c8 100644 --- a/src/elevenlabs/voices/pvc/samples/client.py +++ b/src/elevenlabs/voices/pvc/samples/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .... import core @@ -8,11 +10,12 @@ from ....types.add_voice_response_model import AddVoiceResponseModel from ....types.delete_voice_sample_response_model import DeleteVoiceSampleResponseModel from ....types.voice_sample import VoiceSample -from .audio.client import AsyncAudioClient, AudioClient from .raw_client import AsyncRawSamplesClient, RawSamplesClient -from .speakers.client import AsyncSpeakersClient, SpeakersClient -from .waveform.client import AsyncWaveformClient, WaveformClient +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + from .speakers.client import AsyncSpeakersClient, SpeakersClient + from .waveform.client import AsyncWaveformClient, WaveformClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -20,11 +23,10 @@ class SamplesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSamplesClient(client_wrapper=client_wrapper) - self.audio = AudioClient(client_wrapper=client_wrapper) - - self.waveform = WaveformClient(client_wrapper=client_wrapper) - - self.speakers = SpeakersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AudioClient] = None + self._waveform: typing.Optional[WaveformClient] = None + self._speakers: typing.Optional[SpeakersClient] = None @property def with_raw_response(self) -> RawSamplesClient: @@ -185,15 +187,38 @@ def delete( _response = self._raw_client.delete(voice_id, sample_id, request_options=request_options) return _response.data + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def waveform(self): + if self._waveform is None: + from .waveform.client import WaveformClient # noqa: E402 + + self._waveform = WaveformClient(client_wrapper=self._client_wrapper) + return self._waveform + + @property + def speakers(self): + if self._speakers is None: + from .speakers.client import SpeakersClient # noqa: E402 + + self._speakers = SpeakersClient(client_wrapper=self._client_wrapper) + return self._speakers + class AsyncSamplesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSamplesClient(client_wrapper=client_wrapper) - self.audio = AsyncAudioClient(client_wrapper=client_wrapper) - - self.waveform = AsyncWaveformClient(client_wrapper=client_wrapper) - - self.speakers = AsyncSpeakersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AsyncAudioClient] = None + self._waveform: typing.Optional[AsyncWaveformClient] = None + self._speakers: typing.Optional[AsyncSpeakersClient] = None @property def with_raw_response(self) -> AsyncRawSamplesClient: @@ -377,3 +402,27 @@ async def main() -> None: """ _response = await self._raw_client.delete(voice_id, sample_id, request_options=request_options) return _response.data + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio + + @property + def waveform(self): + if self._waveform is None: + from .waveform.client import AsyncWaveformClient # noqa: E402 + + self._waveform = AsyncWaveformClient(client_wrapper=self._client_wrapper) + return self._waveform + + @property + def speakers(self): + if self._speakers is None: + from .speakers.client import AsyncSpeakersClient # noqa: E402 + + self._speakers = AsyncSpeakersClient(client_wrapper=self._client_wrapper) + return self._speakers diff --git a/src/elevenlabs/voices/pvc/samples/speakers/__init__.py b/src/elevenlabs/voices/pvc/samples/speakers/__init__.py index 9b59d547..2711324f 100644 --- a/src/elevenlabs/voices/pvc/samples/speakers/__init__.py +++ b/src/elevenlabs/voices/pvc/samples/speakers/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import audio +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import audio +_dynamic_imports: typing.Dict[str, str] = {"audio": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["audio"] diff --git a/src/elevenlabs/voices/pvc/samples/speakers/client.py b/src/elevenlabs/voices/pvc/samples/speakers/client.py index 0eb44b48..5695bb72 100644 --- a/src/elevenlabs/voices/pvc/samples/speakers/client.py +++ b/src/elevenlabs/voices/pvc/samples/speakers/client.py @@ -1,19 +1,24 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .....core.request_options import RequestOptions from .....types.speaker_separation_response_model import SpeakerSeparationResponseModel from .....types.start_speaker_separation_response_model import StartSpeakerSeparationResponseModel -from .audio.client import AsyncAudioClient, AudioClient from .raw_client import AsyncRawSpeakersClient, RawSpeakersClient +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + class SpeakersClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSpeakersClient(client_wrapper=client_wrapper) - self.audio = AudioClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AudioClient] = None @property def with_raw_response(self) -> RawSpeakersClient: @@ -100,11 +105,20 @@ def separate( _response = self._raw_client.separate(voice_id, sample_id, request_options=request_options) return _response.data + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + class AsyncSpeakersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSpeakersClient(client_wrapper=client_wrapper) - self.audio = AsyncAudioClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AsyncAudioClient] = None @property def with_raw_response(self) -> AsyncRawSpeakersClient: @@ -206,3 +220,11 @@ async def main() -> None: """ _response = await self._raw_client.separate(voice_id, sample_id, request_options=request_options) return _response.data + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio diff --git a/src/elevenlabs/voices/pvc/verification/__init__.py b/src/elevenlabs/voices/pvc/verification/__init__.py index 024d6433..0a38a0a4 100644 --- a/src/elevenlabs/voices/pvc/verification/__init__.py +++ b/src/elevenlabs/voices/pvc/verification/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import captcha +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import captcha +_dynamic_imports: typing.Dict[str, str] = {"captcha": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["captcha"] diff --git a/src/elevenlabs/voices/pvc/verification/client.py b/src/elevenlabs/voices/pvc/verification/client.py index d0fa1e31..193f55df 100644 --- a/src/elevenlabs/voices/pvc/verification/client.py +++ b/src/elevenlabs/voices/pvc/verification/client.py @@ -1,14 +1,17 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from .... import core from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ....core.request_options import RequestOptions from ....types.request_pvc_manual_verification_response_model import RequestPvcManualVerificationResponseModel -from .captcha.client import AsyncCaptchaClient, CaptchaClient from .raw_client import AsyncRawVerificationClient, RawVerificationClient +if typing.TYPE_CHECKING: + from .captcha.client import AsyncCaptchaClient, CaptchaClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -16,7 +19,8 @@ class VerificationClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawVerificationClient(client_wrapper=client_wrapper) - self.captcha = CaptchaClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._captcha: typing.Optional[CaptchaClient] = None @property def with_raw_response(self) -> RawVerificationClient: @@ -75,11 +79,20 @@ def request( ) return _response.data + @property + def captcha(self): + if self._captcha is None: + from .captcha.client import CaptchaClient # noqa: E402 + + self._captcha = CaptchaClient(client_wrapper=self._client_wrapper) + return self._captcha + class AsyncVerificationClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawVerificationClient(client_wrapper=client_wrapper) - self.captcha = AsyncCaptchaClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._captcha: typing.Optional[AsyncCaptchaClient] = None @property def with_raw_response(self) -> AsyncRawVerificationClient: @@ -145,3 +158,11 @@ async def main() -> None: voice_id, files=files, extra_text=extra_text, request_options=request_options ) return _response.data + + @property + def captcha(self): + if self._captcha is None: + from .captcha.client import AsyncCaptchaClient # noqa: E402 + + self._captcha = AsyncCaptchaClient(client_wrapper=self._client_wrapper) + return self._captcha diff --git a/src/elevenlabs/voices/samples/__init__.py b/src/elevenlabs/voices/samples/__init__.py index 9b59d547..2711324f 100644 --- a/src/elevenlabs/voices/samples/__init__.py +++ b/src/elevenlabs/voices/samples/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import audio +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import audio +_dynamic_imports: typing.Dict[str, str] = {"audio": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["audio"] diff --git a/src/elevenlabs/voices/samples/client.py b/src/elevenlabs/voices/samples/client.py index 798f5c77..a43675dc 100644 --- a/src/elevenlabs/voices/samples/client.py +++ b/src/elevenlabs/voices/samples/client.py @@ -1,14 +1,21 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import typing + from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .audio.client import AsyncAudioClient, AudioClient from .raw_client import AsyncRawSamplesClient, RawSamplesClient +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + class SamplesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawSamplesClient(client_wrapper=client_wrapper) - self.audio = AudioClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AudioClient] = None @property def with_raw_response(self) -> RawSamplesClient: @@ -21,11 +28,20 @@ def with_raw_response(self) -> RawSamplesClient: """ return self._raw_client + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + class AsyncSamplesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawSamplesClient(client_wrapper=client_wrapper) - self.audio = AsyncAudioClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AsyncAudioClient] = None @property def with_raw_response(self) -> AsyncRawSamplesClient: @@ -37,3 +53,11 @@ def with_raw_response(self) -> AsyncRawSamplesClient: AsyncRawSamplesClient """ return self._raw_client + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio diff --git a/src/elevenlabs/voices/types/__init__.py b/src/elevenlabs/voices/types/__init__.py index e72fd130..927b87bf 100644 --- a/src/elevenlabs/voices/types/__init__.py +++ b/src/elevenlabs/voices/types/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .voices_get_shared_request_category import VoicesGetSharedRequestCategory +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .voices_get_shared_request_category import VoicesGetSharedRequestCategory +_dynamic_imports: typing.Dict[str, str] = {"VoicesGetSharedRequestCategory": ".voices_get_shared_request_category"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["VoicesGetSharedRequestCategory"] diff --git a/src/elevenlabs/workspace/__init__.py b/src/elevenlabs/workspace/__init__.py index 1a8f0b67..3b0f2c7e 100644 --- a/src/elevenlabs/workspace/__init__.py +++ b/src/elevenlabs/workspace/__init__.py @@ -2,10 +2,43 @@ # isort: skip_file -from .resources import BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole -from . import groups, invites, members, resources -from .invites import BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission -from .members import BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .resources import BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole + from . import groups, invites, members, resources + from .invites import BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission + from .members import BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole +_dynamic_imports: typing.Dict[str, str] = { + "BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission": ".invites", + "BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole": ".resources", + "BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole": ".members", + "groups": ".", + "invites": ".", + "members": ".", + "resources": ".", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission", diff --git a/src/elevenlabs/workspace/client.py b/src/elevenlabs/workspace/client.py index e896af3c..7d27c4f4 100644 --- a/src/elevenlabs/workspace/client.py +++ b/src/elevenlabs/workspace/client.py @@ -1,23 +1,27 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import typing + from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .groups.client import AsyncGroupsClient, GroupsClient -from .invites.client import AsyncInvitesClient, InvitesClient -from .members.client import AsyncMembersClient, MembersClient from .raw_client import AsyncRawWorkspaceClient, RawWorkspaceClient -from .resources.client import AsyncResourcesClient, ResourcesClient + +if typing.TYPE_CHECKING: + from .groups.client import AsyncGroupsClient, GroupsClient + from .invites.client import AsyncInvitesClient, InvitesClient + from .members.client import AsyncMembersClient, MembersClient + from .resources.client import AsyncResourcesClient, ResourcesClient class WorkspaceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawWorkspaceClient(client_wrapper=client_wrapper) - self.groups = GroupsClient(client_wrapper=client_wrapper) - - self.invites = InvitesClient(client_wrapper=client_wrapper) - - self.members = MembersClient(client_wrapper=client_wrapper) - - self.resources = ResourcesClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._groups: typing.Optional[GroupsClient] = None + self._invites: typing.Optional[InvitesClient] = None + self._members: typing.Optional[MembersClient] = None + self._resources: typing.Optional[ResourcesClient] = None @property def with_raw_response(self) -> RawWorkspaceClient: @@ -30,17 +34,47 @@ def with_raw_response(self) -> RawWorkspaceClient: """ return self._raw_client + @property + def groups(self): + if self._groups is None: + from .groups.client import GroupsClient # noqa: E402 -class AsyncWorkspaceClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawWorkspaceClient(client_wrapper=client_wrapper) - self.groups = AsyncGroupsClient(client_wrapper=client_wrapper) + self._groups = GroupsClient(client_wrapper=self._client_wrapper) + return self._groups + + @property + def invites(self): + if self._invites is None: + from .invites.client import InvitesClient # noqa: E402 - self.invites = AsyncInvitesClient(client_wrapper=client_wrapper) + self._invites = InvitesClient(client_wrapper=self._client_wrapper) + return self._invites - self.members = AsyncMembersClient(client_wrapper=client_wrapper) + @property + def members(self): + if self._members is None: + from .members.client import MembersClient # noqa: E402 - self.resources = AsyncResourcesClient(client_wrapper=client_wrapper) + self._members = MembersClient(client_wrapper=self._client_wrapper) + return self._members + + @property + def resources(self): + if self._resources is None: + from .resources.client import ResourcesClient # noqa: E402 + + self._resources = ResourcesClient(client_wrapper=self._client_wrapper) + return self._resources + + +class AsyncWorkspaceClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawWorkspaceClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._groups: typing.Optional[AsyncGroupsClient] = None + self._invites: typing.Optional[AsyncInvitesClient] = None + self._members: typing.Optional[AsyncMembersClient] = None + self._resources: typing.Optional[AsyncResourcesClient] = None @property def with_raw_response(self) -> AsyncRawWorkspaceClient: @@ -52,3 +86,35 @@ def with_raw_response(self) -> AsyncRawWorkspaceClient: AsyncRawWorkspaceClient """ return self._raw_client + + @property + def groups(self): + if self._groups is None: + from .groups.client import AsyncGroupsClient # noqa: E402 + + self._groups = AsyncGroupsClient(client_wrapper=self._client_wrapper) + return self._groups + + @property + def invites(self): + if self._invites is None: + from .invites.client import AsyncInvitesClient # noqa: E402 + + self._invites = AsyncInvitesClient(client_wrapper=self._client_wrapper) + return self._invites + + @property + def members(self): + if self._members is None: + from .members.client import AsyncMembersClient # noqa: E402 + + self._members = AsyncMembersClient(client_wrapper=self._client_wrapper) + return self._members + + @property + def resources(self): + if self._resources is None: + from .resources.client import AsyncResourcesClient # noqa: E402 + + self._resources = AsyncResourcesClient(client_wrapper=self._client_wrapper) + return self._resources diff --git a/src/elevenlabs/workspace/groups/__init__.py b/src/elevenlabs/workspace/groups/__init__.py index 7505a46b..abf38af1 100644 --- a/src/elevenlabs/workspace/groups/__init__.py +++ b/src/elevenlabs/workspace/groups/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from . import members +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import members +_dynamic_imports: typing.Dict[str, str] = {"members": "."} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["members"] diff --git a/src/elevenlabs/workspace/groups/client.py b/src/elevenlabs/workspace/groups/client.py index 7840e944..24698946 100644 --- a/src/elevenlabs/workspace/groups/client.py +++ b/src/elevenlabs/workspace/groups/client.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel -from .members.client import AsyncMembersClient, MembersClient from .raw_client import AsyncRawGroupsClient, RawGroupsClient +if typing.TYPE_CHECKING: + from .members.client import AsyncMembersClient, MembersClient + class GroupsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawGroupsClient(client_wrapper=client_wrapper) - self.members = MembersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._members: typing.Optional[MembersClient] = None @property def with_raw_response(self) -> RawGroupsClient: @@ -58,11 +63,20 @@ def search( _response = self._raw_client.search(name=name, request_options=request_options) return _response.data + @property + def members(self): + if self._members is None: + from .members.client import MembersClient # noqa: E402 + + self._members = MembersClient(client_wrapper=self._client_wrapper) + return self._members + class AsyncGroupsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawGroupsClient(client_wrapper=client_wrapper) - self.members = AsyncMembersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._members: typing.Optional[AsyncMembersClient] = None @property def with_raw_response(self) -> AsyncRawGroupsClient: @@ -115,3 +129,11 @@ async def main() -> None: """ _response = await self._raw_client.search(name=name, request_options=request_options) return _response.data + + @property + def members(self): + if self._members is None: + from .members.client import AsyncMembersClient # noqa: E402 + + self._members = AsyncMembersClient(client_wrapper=self._client_wrapper) + return self._members diff --git a/src/elevenlabs/workspace/invites/__init__.py b/src/elevenlabs/workspace/invites/__init__.py index 5a900d35..9504611c 100644 --- a/src/elevenlabs/workspace/invites/__init__.py +++ b/src/elevenlabs/workspace/invites/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission +_dynamic_imports: typing.Dict[str, str] = {"BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission"] diff --git a/src/elevenlabs/workspace/invites/types/__init__.py b/src/elevenlabs/workspace/invites/types/__init__.py index 7f25ead5..736dde1f 100644 --- a/src/elevenlabs/workspace/invites/types/__init__.py +++ b/src/elevenlabs/workspace/invites/types/__init__.py @@ -2,8 +2,35 @@ # isort: skip_file -from .body_invite_user_v_1_workspace_invites_add_post_workspace_permission import ( - BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_invite_user_v_1_workspace_invites_add_post_workspace_permission import ( + BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission": ".body_invite_user_v_1_workspace_invites_add_post_workspace_permission" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission"] diff --git a/src/elevenlabs/workspace/members/__init__.py b/src/elevenlabs/workspace/members/__init__.py index 7c4da821..c59134f8 100644 --- a/src/elevenlabs/workspace/members/__init__.py +++ b/src/elevenlabs/workspace/members/__init__.py @@ -2,6 +2,31 @@ # isort: skip_file -from .types import BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole +_dynamic_imports: typing.Dict[str, str] = {"BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole"] diff --git a/src/elevenlabs/workspace/members/types/__init__.py b/src/elevenlabs/workspace/members/types/__init__.py index b7bc3c10..b95be54b 100644 --- a/src/elevenlabs/workspace/members/types/__init__.py +++ b/src/elevenlabs/workspace/members/types/__init__.py @@ -2,8 +2,35 @@ # isort: skip_file -from .body_update_member_v_1_workspace_members_post_workspace_role import ( - BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_update_member_v_1_workspace_members_post_workspace_role import ( + BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole": ".body_update_member_v_1_workspace_members_post_workspace_role" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole"] diff --git a/src/elevenlabs/workspace/resources/__init__.py b/src/elevenlabs/workspace/resources/__init__.py index 6577c2ae..a079aa9c 100644 --- a/src/elevenlabs/workspace/resources/__init__.py +++ b/src/elevenlabs/workspace/resources/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .types import BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole +_dynamic_imports: typing.Dict[str, str] = { + "BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole": ".types" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole"] diff --git a/src/elevenlabs/workspace/resources/types/__init__.py b/src/elevenlabs/workspace/resources/types/__init__.py index 70e3137e..bb46aecb 100644 --- a/src/elevenlabs/workspace/resources/types/__init__.py +++ b/src/elevenlabs/workspace/resources/types/__init__.py @@ -2,8 +2,35 @@ # isort: skip_file -from .body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role import ( - BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role import ( + BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole, + ) +_dynamic_imports: typing.Dict[str, str] = { + "BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole": ".body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole"] From 3de53a61dfef332a119b0e2103ab579a85cb417b Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Tue, 9 Sep 2025 10:46:39 +0200 Subject: [PATCH 14/34] Fix issue with conversation when no auth is required (#620) --- .../conversational_ai/conversation.py | 3 +- tests/test_async_convai.py | 68 ++++++++++++++++--- tests/test_convai.py | 54 ++++++++++++++- 3 files changed, 113 insertions(+), 12 deletions(-) diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index 62a50ab7..b604b11c 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -302,7 +302,8 @@ def __init__( self._last_interrupt_id = 0 def _get_wss_url(http://github.com/self): - base_ws_url = self.client._client_wrapper.get_environment().wss + base_http_url = self.client._client_wrapper.get_base_url() + base_ws_url = base_http_url.replace("https://", "wss://").replace("http://", "ws://") return f"{base_ws_url}/v1/convai/conversation?agent_id={self.agent_id}&source=python_sdk&version={__version__}" def _get_signed_url(http://github.com/self): diff --git a/tests/test_async_convai.py b/tests/test_async_convai.py index 72de00d2..7d78fa68 100644 --- a/tests/test_async_convai.py +++ b/tests/test_async_convai.py @@ -49,7 +49,7 @@ def create_mock_async_websocket(messages=None): # Create an iterator message_iter = iter(json_messages) - + async def mock_recv(): try: return next(message_iter) @@ -83,7 +83,7 @@ async def test_async_conversation_basic_flow(): # Run the test with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: mock_connect.return_value.__aenter__.return_value = mock_ws - + await conversation.start_session() # Wait a bit for the callback to be called @@ -97,7 +97,7 @@ async def test_async_conversation_basic_flow(): init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] assert len(init_messages) == 1 init_message = init_messages[0] - + assert init_message["type"] == "conversation_initiation_client_data" assert init_message["custom_llm_extra_body"] == {} assert init_message["conversation_config_override"] == {} @@ -134,7 +134,7 @@ async def test_async_conversation_with_auth(): # Run the test with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: mock_connect.return_value.__aenter__.return_value = mock_ws - + await conversation.start_session() await conversation.end_session() await conversation.wait_for_session_end() @@ -166,7 +166,7 @@ async def test_async_conversation_with_dynamic_variables(): # Run the test with patch("elevenlabs.conversational_ai.conversation.websockets.connect") as mock_connect: mock_connect.return_value.__aenter__.return_value = mock_ws - + await conversation.start_session() # Wait a bit for the callback to be called @@ -180,7 +180,7 @@ async def test_async_conversation_with_dynamic_variables(): init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] assert len(init_messages) == 1 init_message = init_messages[0] - + assert init_message["type"] == "conversation_initiation_client_data" assert init_message["custom_llm_extra_body"] == {} assert init_message["conversation_config_override"] == {} @@ -320,10 +320,10 @@ async def test_async_conversation_callback_flows(): "audio_event": {"event_id": "789", "audio_base_64": "dGVzdA=="} # "test" in base64 } ] - + mock_ws = create_mock_async_websocket(messages) mock_client = MagicMock() - + # Setup callbacks agent_response_callback = AsyncMock() agent_response_correction_callback = AsyncMock() @@ -349,7 +349,7 @@ async def test_async_conversation_callback_flows(): mock_connect.return_value.__aenter__.return_value = mock_ws await conversation.start_session() - + # Wait for callbacks to be processed await asyncio.sleep(0.2) @@ -364,3 +364,53 @@ async def test_async_conversation_callback_flows(): end_session_callback.assert_called_once() assert conversation._conversation_id == TEST_CONVERSATION_ID assert conversation._last_interrupt_id == 456 + + +@pytest.mark.asyncio +async def test_async_conversation_wss_url_generation_without_get_environment(): + + from elevenlabs.core.client_wrapper import SyncClientWrapper + + # Test with various base URL formats to ensure robustness + test_cases = [ + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io"), + ("https://api.us.elevenlabs.io/", "wss://api.us.elevenlabs.io"), + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io"), + ("http://localhost:8000/", "ws://localhost:8000"), + ] + + for base_url, expected_ws_base in test_cases: + # Create a real SyncClientWrapper to ensure it doesn't have get_environment method + mock_client = MagicMock() + mock_client._client_wrapper = SyncClientWrapper( + base_url=base_url, + api_key="test_key", + httpx_client=MagicMock(), + timeout=30.0 + ) + + conversation = AsyncConversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAsyncAudioInterface() + ) + + try: + wss_url = conversation._get_wss_url() + + # Verify the URL is correctly generated + expected_url = f"{expected_ws_base}/v1/convai/conversation?agent_id={TEST_AGENT_ID}&source=python_sdk&version=" + assert wss_url.startswith(expected_url), f"URL should start with {expected_url}, got {wss_url}" + + # Verify the URL contains version parameter + assert "version=" in wss_url, f"URL should contain version parameter, got {wss_url}" + + except AttributeError as e: + if "get_environment" in str(e): + assert False + else: + raise # Re-raise if it's a different AttributeError + + except Exception as e: + assert False, f"Unexpected error generating WebSocket URL: {e}" diff --git a/tests/test_convai.py b/tests/test_convai.py index 310969df..8b855ca5 100644 --- a/tests/test_convai.py +++ b/tests/test_convai.py @@ -84,7 +84,7 @@ def test_conversation_basic_flow(): init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] assert len(init_messages) == 1 init_message = init_messages[0] - + assert init_message["type"] == "conversation_initiation_client_data" assert init_message["custom_llm_extra_body"] == {} assert init_message["conversation_config_override"] == {} @@ -166,7 +166,7 @@ def test_conversation_with_dynamic_variables(): init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] assert len(init_messages) == 1 init_message = init_messages[0] - + assert init_message["type"] == "conversation_initiation_client_data" assert init_message["custom_llm_extra_body"] == {} assert init_message["conversation_config_override"] == {} @@ -206,3 +206,53 @@ def test_conversation_with_contextual_update(): # Assertions expected = json.dumps({"type": "contextual_update", "text": "User appears to be looking at pricing page"}) mock_ws.send.assert_any_call(expected) + + +def test_conversation_wss_url_generation_without_get_environment(): + + from elevenlabs.core.client_wrapper import SyncClientWrapper + + # Test with various base URL formats to ensure robustness + test_cases = [ + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io"), + ("https://api.us.elevenlabs.io/", "wss://api.us.elevenlabs.io"), + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io"), + ("http://localhost:8000/", "ws://localhost:8000"), + ] + + for base_url, expected_ws_base in test_cases: + # Create a real SyncClientWrapper to ensure it doesn't have get_environment method + mock_client = MagicMock() + mock_client._client_wrapper = SyncClientWrapper( + base_url=base_url, + api_key="test_key", + httpx_client=MagicMock(), + timeout=30.0 + ) + + # Create conversation with requires_auth=False + conversation = Conversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAudioInterface() + ) + + try: + wss_url = conversation._get_wss_url() + + # Verify the URL is correctly generated + expected_url = f"{expected_ws_base}/v1/convai/conversation?agent_id={TEST_AGENT_ID}&source=python_sdk&version=" + assert wss_url.startswith(expected_url), f"URL should start with {expected_url}, got {wss_url}" + + # Verify the URL contains version parameter + assert "version=" in wss_url, f"URL should contain version parameter, got {wss_url}" + + except AttributeError as e: + if "get_environment" in str(e): + assert False + else: + raise # Re-raise if it's a different AttributeError + + except Exception as e: + assert False, f"Unexpected error generating WebSocket URL: {e}" From ab823bf0a20c7362e99e17741c95b486e46836cb Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Tue, 9 Sep 2025 11:00:44 +0200 Subject: [PATCH 15/34] Add asyncio event loop (#616) * Add asyncio event loop * address feedback * fix --- README.md | 97 ++++++ .../conversational_ai/conversation.py | 144 ++++---- tests/test_client_tools.py | 312 ++++++++++++++++++ 3 files changed, 494 insertions(+), 59 deletions(-) create mode 100644 tests/test_client_tools.py diff --git a/README.md b/README.md index 6265d707..a3616199 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,103 @@ async def print_models() -> None: asyncio.run(print_models()) ``` +## Conversational AI + +Build interactive AI agents with real-time audio capabilities using ElevenLabs Conversational AI. + +### Basic Usage + +```python +from elevenlabs.client import ElevenLabs +from elevenlabs.conversational_ai.conversation import Conversation, ClientTools +from elevenlabs.conversational_ai.default_audio_interface import DefaultAudioInterface + +client = ElevenLabs(api_key="YOUR_API_KEY") + +# Create audio interface for real-time audio input/output +audio_interface = DefaultAudioInterface() + +# Create conversation +conversation = Conversation( + client=client, + agent_id="your-agent-id", + requires_auth=True, + audio_interface=audio_interface, +) + +# Start the conversation +conversation.start_session() + +# The conversation runs in background until you call: +conversation.end_session() +``` + +### Custom Event Loop Support + +For advanced use cases involving context propagation, resource reuse, or specific event loop management, `ClientTools` supports custom asyncio event loops: + +```python +import asyncio +from elevenlabs.conversational_ai.conversation import ClientTools + +async def main(): + # Get the current event loop + custom_loop = asyncio.get_running_loop() + + # Create ClientTools with custom loop to prevent "different event loop" errors + client_tools = ClientTools(loop=custom_loop) + + # Register your tools + async def get_weather(params): + location = params.get("location", "Unknown") + # Your async logic here + return f"Weather in {location}: Sunny, 72°F" + + client_tools.register("get_weather", get_weather, is_async=True) + + # Use with conversation + conversation = Conversation( + client=client, + agent_id="your-agent-id", + requires_auth=True, + audio_interface=audio_interface, + client_tools=client_tools + ) + +asyncio.run(main()) +``` + +**Benefits of Custom Event Loop:** +- **Context Propagation**: Maintain request-scoped state across async operations +- **Resource Reuse**: Share existing async resources like HTTP sessions or database pools +- **Loop Management**: Prevent "Task got Future attached to a different event loop" errors +- **Performance**: Better control over async task scheduling and execution + +**Important:** When using a custom loop, you're responsible for its lifecycle +Don't close the loop while ClientTools are still using it. + +### Tool Registration + +Register custom tools that the AI agent can call during conversations: + +```python +client_tools = ClientTools() + +# Sync tool +def calculate_sum(params): + numbers = params.get("numbers", []) + return sum(numbers) + +# Async tool +async def fetch_data(params): + url = params.get("url") + # Your async HTTP request logic + return {"data": "fetched"} + +client_tools.register("calculate_sum", calculate_sum, is_async=False) +client_tools.register("fetch_data", fetch_data, is_async=True) +``` + ## Languages Supported Explore [all models & languages](https://elevenlabs.io/docs/models). diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index b604b11c..dbc72c5b 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -155,11 +155,18 @@ class ClientTools: Supports both synchronous and asynchronous tools running in a dedicated event loop, ensuring non-blocking operation of the main conversation thread. + + Args: + loop: Optional custom asyncio event loop to use for tool execution. If not provided, + a new event loop will be created and run in a separate thread. Using a custom + loop prevents "different event loop" runtime errors and allows for better + context propagation and resource management. """ - def __init__(self) -> None: + def __init__(self, loop: Optional[asyncio.AbstractEventLoop] = None) -> None: self.tools: Dict[str, Tuple[Union[Callable[[dict], Any], Callable[[dict], Awaitable[Any]]], bool]] = {} self.lock = threading.Lock() + self._custom_loop = loop self._loop = None self._thread = None self._running = threading.Event() @@ -170,27 +177,39 @@ def start(self): if self._running.is_set(): return - def run_event_loop(): - self._loop = asyncio.new_event_loop() - asyncio.set_event_loop(self._loop) + if self._custom_loop is not None: + # Use the provided custom event loop + self._loop = self._custom_loop self._running.set() - try: - self._loop.run_forever() - finally: - self._running.clear() - self._loop.close() - self._loop = None + else: + # Create and run our own event loop in a separate thread + def run_event_loop(): + self._loop = asyncio.new_event_loop() + asyncio.set_event_loop(self._loop) + self._running.set() + try: + self._loop.run_forever() + finally: + self._running.clear() + self._loop.close() + self._loop = None - self._thread = threading.Thread(target=run_event_loop, daemon=True, name="ClientTools-EventLoop") - self._thread.start() - # Wait for loop to be ready - self._running.wait() + self._thread = threading.Thread(target=run_event_loop, daemon=True, name="ClientTools-EventLoop") + self._thread.start() + # Wait for loop to be ready + self._running.wait() def stop(self): """Gracefully stop the event loop and clean up resources.""" if self._loop and self._running.is_set(): - self._loop.call_soon_threadsafe(self._loop.stop) - self._thread.join() + if self._custom_loop is not None: + # For custom loops, we don't stop the loop itself, just clear our running flag + self._running.clear() + else: + # For our own loop, stop it and join the thread + self._loop.call_soon_threadsafe(self._loop.stop) + if self._thread: + self._thread.join() self.thread_pool.shutdown(wait=False) def register( @@ -257,7 +276,14 @@ async def _execute_and_callback(): } callback(response) - asyncio.run_coroutine_threadsafe(_execute_and_callback(), self._loop) + self._schedule_coroutine(_execute_and_callback()) + + def _schedule_coroutine(self, coro): + """Schedule a coroutine on the appropriate event loop.""" + if self._custom_loop is not None: + return self._loop.create_task(coro) + else: + return asyncio.run_coroutine_threadsafe(coro, self._loop) class ConversationInitiationData: @@ -278,7 +304,7 @@ def __init__( class BaseConversation: """Base class for conversation implementations with shared parameters and logic.""" - + def __init__( self, client: BaseElevenLabs, @@ -295,9 +321,9 @@ def __init__( self.requires_auth = requires_auth self.config = config or ConversationInitiationData() self.client_tools = client_tools or ClientTools() - + self.client_tools.start() - + self._conversation_id = None self._last_interrupt_id = 0 @@ -330,7 +356,7 @@ def _create_initiation_message(self): def _handle_message_core(self, message, message_handler): """Core message handling logic shared between sync and async implementations. - + Args: message: The parsed message dictionary message_handler: Handler object with methods for different operations @@ -346,36 +372,36 @@ def _handle_message_core(self, message, message_handler): return audio = base64.b64decode(event["audio_base_64"]) message_handler.handle_audio_output(audio) - + elif message["type"] == "agent_response": if message_handler.callback_agent_response: event = message["agent_response_event"] message_handler.handle_agent_response(event["agent_response"].strip()) - + elif message["type"] == "agent_response_correction": if message_handler.callback_agent_response_correction: event = message["agent_response_correction_event"] message_handler.handle_agent_response_correction( - event["original_agent_response"].strip(), + event["original_agent_response"].strip(), event["corrected_agent_response"].strip() ) - + elif message["type"] == "user_transcript": if message_handler.callback_user_transcript: event = message["user_transcription_event"] message_handler.handle_user_transcript(event["user_transcript"].strip()) - + elif message["type"] == "interruption": event = message["interruption_event"] self._last_interrupt_id = int(event["event_id"]) message_handler.handle_interruption() - + elif message["type"] == "ping": event = message["ping_event"] message_handler.handle_ping(event) if message_handler.callback_latency_measurement and event["ping_ms"]: message_handler.handle_latency_measurement(int(event["ping_ms"])) - + elif message["type"] == "client_tool_call": tool_call = message.get("client_tool_call", {}) tool_name = tool_call.get("tool_name") @@ -397,36 +423,36 @@ async def _handle_message_core_async(self, message, message_handler): return audio = base64.b64decode(event["audio_base_64"]) await message_handler.handle_audio_output(audio) - + elif message["type"] == "agent_response": if message_handler.callback_agent_response: event = message["agent_response_event"] await message_handler.handle_agent_response(event["agent_response"].strip()) - + elif message["type"] == "agent_response_correction": if message_handler.callback_agent_response_correction: event = message["agent_response_correction_event"] await message_handler.handle_agent_response_correction( - event["original_agent_response"].strip(), + event["original_agent_response"].strip(), event["corrected_agent_response"].strip() ) - + elif message["type"] == "user_transcript": if message_handler.callback_user_transcript: event = message["user_transcription_event"] await message_handler.handle_user_transcript(event["user_transcript"].strip()) - + elif message["type"] == "interruption": event = message["interruption_event"] self._last_interrupt_id = int(event["event_id"]) await message_handler.handle_interruption() - + elif message["type"] == "ping": event = message["ping_event"] await message_handler.handle_ping(event) if message_handler.callback_latency_measurement and event["ping_ms"]: await message_handler.handle_latency_measurement(int(event["ping_ms"])) - + elif message["type"] == "client_tool_call": tool_call = message.get("client_tool_call", {}) tool_name = tool_call.get("tool_name") @@ -491,7 +517,7 @@ def __init__( config=config, client_tools=client_tools, ) - + self.audio_interface = audio_interface self.callback_agent_response = callback_agent_response self.callback_agent_response_correction = callback_agent_response_correction @@ -640,22 +666,22 @@ def __init__(self, conversation, ws): self.callback_agent_response_correction = conversation.callback_agent_response_correction self.callback_user_transcript = conversation.callback_user_transcript self.callback_latency_measurement = conversation.callback_latency_measurement - + def handle_audio_output(self, audio): self.conversation.audio_interface.output(audio) - + def handle_agent_response(self, response): self.conversation.callback_agent_response(response) - + def handle_agent_response_correction(self, original, corrected): self.conversation.callback_agent_response_correction(original, corrected) - + def handle_user_transcript(self, transcript): self.conversation.callback_user_transcript(transcript) - + def handle_interruption(self): self.conversation.audio_interface.interrupt() - + def handle_ping(self, event): self.ws.send( json.dumps( @@ -665,17 +691,17 @@ def handle_ping(self, event): } ) ) - + def handle_latency_measurement(self, latency): self.conversation.callback_latency_measurement(latency) - + def handle_client_tool_call(self, tool_name, parameters): def send_response(response): if not self.conversation._should_stop.is_set(): self.ws.send(json.dumps(response)) - + self.conversation.client_tools.execute_tool(tool_name, parameters, send_response) - + handler = SyncMessageHandler(self, ws) self._handle_message_core(message, handler) @@ -736,7 +762,7 @@ def __init__( config=config, client_tools=client_tools, ) - + self.audio_interface = audio_interface self.callback_agent_response = callback_agent_response self.callback_agent_response_correction = callback_agent_response_correction @@ -858,7 +884,7 @@ async def input_callback(audio): await self.end_session() await self.audio_interface.start(input_callback) - + try: while not self._should_stop.is_set(): try: @@ -888,22 +914,22 @@ def __init__(self, conversation, ws): self.callback_agent_response_correction = conversation.callback_agent_response_correction self.callback_user_transcript = conversation.callback_user_transcript self.callback_latency_measurement = conversation.callback_latency_measurement - + async def handle_audio_output(self, audio): await self.conversation.audio_interface.output(audio) - + async def handle_agent_response(self, response): await self.conversation.callback_agent_response(response) - + async def handle_agent_response_correction(self, original, corrected): await self.conversation.callback_agent_response_correction(original, corrected) - + async def handle_user_transcript(self, transcript): await self.conversation.callback_user_transcript(transcript) - + async def handle_interruption(self): await self.conversation.audio_interface.interrupt() - + async def handle_ping(self, event): await self.ws.send( json.dumps( @@ -913,18 +939,18 @@ async def handle_ping(self, event): } ) ) - + async def handle_latency_measurement(self, latency): await self.conversation.callback_latency_measurement(latency) - + def handle_client_tool_call(self, tool_name, parameters): def send_response(response): if not self.conversation._should_stop.is_set(): asyncio.create_task(self.ws.send(json.dumps(response))) - + self.conversation.client_tools.execute_tool(tool_name, parameters, send_response) - + handler = AsyncMessageHandler(self, ws) - + # Use the shared core message handling logic with async wrapper await self._handle_message_core_async(message, handler) diff --git a/tests/test_client_tools.py b/tests/test_client_tools.py new file mode 100644 index 00000000..5df2efd1 --- /dev/null +++ b/tests/test_client_tools.py @@ -0,0 +1,312 @@ +""" +Tests for ClientTools custom event loop functionality. +""" + +import asyncio +import pytest +import threading +import time +from elevenlabs.conversational_ai.conversation import ClientTools + + +class TestClientTools: + """Test suite for ClientTools functionality.""" + + def test_default_initialization(self): + """Test that ClientTools can be initialized without parameters (backwards compatibility).""" + client_tools = ClientTools() + assert client_tools._custom_loop is None + assert client_tools._loop is None + assert not client_tools._running.is_set() + + def test_custom_loop_initialization(self): + """Test that ClientTools can be initialized with a custom event loop.""" + loop = asyncio.new_event_loop() + try: + client_tools = ClientTools(loop=loop) + assert client_tools._custom_loop is loop + assert client_tools._loop is None + assert not client_tools._running.is_set() + finally: + loop.close() + + def test_start_with_default_loop(self): + """Test starting ClientTools with default behavior (creates own loop).""" + client_tools = ClientTools() + + try: + client_tools.start() + assert client_tools._running.is_set() + assert client_tools._loop is not None + assert client_tools._thread is not None + assert client_tools._thread.is_alive() + finally: + client_tools.stop() + + @pytest.mark.asyncio + async def test_start_with_custom_loop(self): + """Test starting ClientTools with a custom event loop.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + + try: + client_tools.start() + assert client_tools._running.is_set() + assert client_tools._loop is custom_loop + assert client_tools._thread is None # No thread created for custom loop + finally: + client_tools.stop() + + def test_tool_registration(self): + """Test that tools can be registered correctly.""" + client_tools = ClientTools() + + def sync_tool(params): + return "sync result" + + async def async_tool(params): + return "async result" + + client_tools.register("sync_tool", sync_tool, is_async=False) + client_tools.register("async_tool", async_tool, is_async=True) + + assert "sync_tool" in client_tools.tools + assert "async_tool" in client_tools.tools + + sync_handler, sync_is_async = client_tools.tools["sync_tool"] + async_handler, async_is_async = client_tools.tools["async_tool"] + + assert sync_handler is sync_tool + assert not sync_is_async + assert async_handler is async_tool + assert async_is_async + + def test_duplicate_tool_registration(self): + """Test that registering a tool with the same name raises an error.""" + client_tools = ClientTools() + + def tool(params): + return "result" + + client_tools.register("test_tool", tool) + + with pytest.raises(ValueError, match="Tool 'test_tool' is already registered"): + client_tools.register("test_tool", tool) + + def test_invalid_handler_registration(self): + """Test that registering a non-callable handler raises an error.""" + client_tools = ClientTools() + + with pytest.raises(ValueError, match="Handler must be callable"): + client_tools.register("invalid_tool", "not_callable") + + @pytest.mark.asyncio + async def test_sync_tool_execution_with_custom_loop(self): + """Test executing a sync tool with a custom event loop.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + + def sync_tool(params): + return f"sync result: {params.get('input', 'default')}" + + client_tools.register("sync_tool", sync_tool, is_async=False) + client_tools.start() + + try: + result = await client_tools.handle("sync_tool", {"input": "test"}) + assert result == "sync result: test" + finally: + client_tools.stop() + + @pytest.mark.asyncio + async def test_async_tool_execution_with_custom_loop(self): + """Test executing an async tool with a custom event loop.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + + async def async_tool(params): + await asyncio.sleep(0.01) # Simulate async work + return f"async result: {params.get('input', 'default')}" + + client_tools.register("async_tool", async_tool, is_async=True) + client_tools.start() + + try: + result = await client_tools.handle("async_tool", {"input": "test"}) + assert result == "async result: test" + finally: + client_tools.stop() + + @pytest.mark.asyncio + async def test_tool_execution_with_callback_custom_loop(self): + """Test executing a tool via callback mechanism with custom event loop.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + + def sync_tool(params): + return f"callback result: {params.get('data', 'none')}" + + client_tools.register("callback_tool", sync_tool, is_async=False) + client_tools.start() + + callback_results = [] + + def test_callback(response): + callback_results.append(response) + + try: + client_tools.execute_tool( + "callback_tool", + {"tool_call_id": "test123", "data": "callback_test"}, + test_callback + ) + + # Wait for callback to be executed + await asyncio.sleep(0.1) + + assert len(callback_results) == 1 + response = callback_results[0] + assert response["type"] == "client_tool_result" + assert response["tool_call_id"] == "test123" + assert "callback result: callback_test" in response["result"] + assert response["is_error"] is False + finally: + client_tools.stop() + + def test_sync_tool_execution_with_default_loop(self): + """Test executing a sync tool with default loop behavior.""" + client_tools = ClientTools() + + def sync_tool(params): + return f"default sync: {params.get('value', 'empty')}" + + client_tools.register("sync_tool", sync_tool, is_async=False) + client_tools.start() + + # Use asyncio.run to test from a fresh event loop + async def test(): + result = await client_tools.handle("sync_tool", {"value": "default_test"}) + return result + + try: + result = asyncio.run(test()) + assert result == "default sync: default_test" + finally: + client_tools.stop() + + @pytest.mark.asyncio + async def test_unregistered_tool_error(self): + """Test that calling an unregistered tool raises an error.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + client_tools.start() + + try: + with pytest.raises(ValueError, match="Tool 'nonexistent' is not registered"): + await client_tools.handle("nonexistent", {}) + finally: + client_tools.stop() + + def test_execute_tool_without_start(self): + """Test that execute_tool raises error when not started.""" + client_tools = ClientTools() + + def callback(response): + pass + + with pytest.raises(RuntimeError, match="ClientTools event loop is not running"): + client_tools.execute_tool("any_tool", {}, callback) + + @pytest.mark.asyncio + async def test_tool_exception_handling(self): + """Test that tool exceptions are handled correctly.""" + custom_loop = asyncio.get_running_loop() + client_tools = ClientTools(loop=custom_loop) + + def failing_tool(params): + raise ValueError("Tool failed intentionally") + + client_tools.register("failing_tool", failing_tool, is_async=False) + client_tools.start() + + callback_results = [] + + def error_callback(response): + callback_results.append(response) + + try: + client_tools.execute_tool( + "failing_tool", + {"tool_call_id": "error_test"}, + error_callback + ) + + # Wait for callback + await asyncio.sleep(0.1) + + assert len(callback_results) == 1 + response = callback_results[0] + assert response["type"] == "client_tool_result" + assert response["tool_call_id"] == "error_test" + assert response["is_error"] is True + assert "Tool failed intentionally" in response["result"] + finally: + client_tools.stop() + + @pytest.mark.asyncio + async def test_event_loop_isolation(self): + """Test that custom loop prevents 'different event loop' errors.""" + # This test simulates the scenario mentioned in the GitHub issue + main_loop = asyncio.get_running_loop() + + # Create ClientTools with the current loop + client_tools = ClientTools(loop=main_loop) + + async def loop_aware_tool(params): + # This tool checks which loop it's running on + current_loop = asyncio.get_running_loop() + return f"Running on loop: {id(current_loop)}" + + client_tools.register("loop_tool", loop_aware_tool, is_async=True) + client_tools.start() + + try: + result = await client_tools.handle("loop_tool", {}) + # The result should indicate it's running on the same loop + expected_loop_id = str(id(main_loop)) + assert expected_loop_id in result + finally: + client_tools.stop() + + def test_stop_custom_loop_behavior(self): + """Test that stop() doesn't close custom loops.""" + custom_loop = asyncio.new_event_loop() + client_tools = ClientTools(loop=custom_loop) + + try: + client_tools.start() + assert client_tools._running.is_set() + + client_tools.stop() + assert not client_tools._running.is_set() + + # Custom loop should still be open and usable + assert not custom_loop.is_closed() + finally: + custom_loop.close() + + def test_stop_default_loop_behavior(self): + """Test that stop() properly cleans up default loops.""" + client_tools = ClientTools() + + client_tools.start() + assert client_tools._running.is_set() + assert client_tools._thread is not None + thread = client_tools._thread + + client_tools.stop() + assert not client_tools._running.is_set() + + # Wait for thread to finish + thread.join(timeout=1.0) + assert not thread.is_alive() \ No newline at end of file From 46a9d19798b9b396a6bb1e0e81f308d0b11340c6 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Mon, 15 Sep 2025 13:34:47 +0200 Subject: [PATCH 16/34] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3616199..f023d00c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ For more detailed information about these models and others, visit the [ElevenLa ```py from dotenv import load_dotenv from elevenlabs.client import ElevenLabs -from elevenlabs import play +from elevenlabs.play import play load_dotenv() @@ -97,7 +97,7 @@ Clone your voice in an instant. Note that voice cloning requires an API key, see ```py from elevenlabs.client import ElevenLabs -from elevenlabs import play +from elevenlabs.play import play client = ElevenLabs( api_key="YOUR_API_KEY", From f6cd4399b21923b8e02c826ff2e11c1610efb600 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Thu, 18 Sep 2025 13:59:42 +0200 Subject: [PATCH 17/34] bump version --- pyproject.toml | 2 +- src/elevenlabs/core/client_wrapper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2696993b..fee74ead 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.15.0" +version = "v2.15.1" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index c5d83f29..b8020a0d 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.15.0", + "User-Agent": "elevenlabs/v2.15.1", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.15.0", + "X-Fern-SDK-Version": "v2.15.1", **(self.get_custom_headers() or {}), } if self._api_key is not None: From 0430688e6b1d0026a44e74bcb2a88eb732377a8e Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 14:57:43 +0100 Subject: [PATCH 18/34] SDK regeneration (#628) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 339 ++++++++++++++++-- src/elevenlabs/__init__.py | 69 +++- src/elevenlabs/audio_native/__init__.py | 28 ++ src/elevenlabs/audio_native/client.py | 21 ++ src/elevenlabs/audio_native/raw_client.py | 21 ++ src/elevenlabs/audio_native/types/__init__.py | 34 ++ ...create_request_apply_text_normalization.py | 7 + .../conversational_ai/agents/client.py | 48 ++- .../conversational_ai/agents/raw_client.py | 42 ++- .../knowledge_base/client.py | 42 ++- .../knowledge_base/raw_client.py | 42 ++- .../mcp_servers/approval_policy/client.py | 4 +- .../mcp_servers/approval_policy/raw_client.py | 4 +- .../conversational_ai/mcp_servers/client.py | 107 ++++++ .../mcp_servers/raw_client.py | 139 +++++++ .../conversational_ai/phone_numbers/client.py | 43 ++- .../phone_numbers/raw_client.py | 39 +- .../types/phone_numbers_get_response.py | 2 + .../types/phone_numbers_list_response_item.py | 2 + .../types/phone_numbers_update_response.py | 2 + .../conversational_ai/settings/client.py | 9 + .../conversational_ai/settings/raw_client.py | 9 + .../conversational_ai/tests/client.py | 17 + .../conversational_ai/tests/raw_client.py | 17 + src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/dubbing/__init__.py | 8 +- src/elevenlabs/dubbing/client.py | 25 +- src/elevenlabs/dubbing/raw_client.py | 25 +- src/elevenlabs/dubbing/resource/client.py | 12 +- src/elevenlabs/dubbing/resource/raw_client.py | 16 +- src/elevenlabs/dubbing/types/__init__.py | 4 +- .../dubbing_list_request_order_direction.py | 5 + src/elevenlabs/history/__init__.py | 9 +- src/elevenlabs/history/client.py | 45 ++- src/elevenlabs/history/raw_client.py | 45 ++- src/elevenlabs/history/types/__init__.py | 8 +- .../history_list_request_sort_direction.py | 5 + src/elevenlabs/music/client.py | 40 +++ src/elevenlabs/music/raw_client.py | 40 +++ ...es_add_from_rules_post_workspace_access.py | 2 +- ...eate_from_file_request_workspace_access.py | 2 +- .../speech_to_text/transcripts/client.py | 74 ++++ .../speech_to_text/transcripts/raw_client.py | 126 +++++++ src/elevenlabs/text_to_speech/__init__.py | 12 +- src/elevenlabs/text_to_speech/client.py | 36 +- src/elevenlabs/text_to_speech/raw_client.py | 36 +- .../text_to_speech/types/__init__.py | 20 +- ...ith_timestamps_apply_text_normalization.py | 5 + ...th_timestamps_apply_text_normalization.py} | 2 +- ...imestamps_post_apply_text_normalization.py | 7 - src/elevenlabs/types/__init__.py | 42 ++- ...y_response_model_permission_on_resource.py | 2 +- src/elevenlabs/types/agent_metadata.py | 21 ++ src/elevenlabs/types/agent_sort_by.py | 5 + src/elevenlabs/types/attached_test_model.py | 1 + src/elevenlabs/types/breakdown_types.py | 1 + .../types/client_tool_config_input.py | 6 +- .../types/client_tool_config_output.py | 6 +- ...n_history_transcript_common_model_input.py | 2 + ..._history_transcript_common_model_output.py | 2 + ...nscript_other_tools_result_common_model.py | 2 +- src/elevenlabs/types/conversational_config.py | 6 + ...onal_config_api_model_workflow_override.py | 6 + ...available_agent_identifier_access_level.py | 4 +- ..._available_tool_identifier_access_level.py | 4 +- .../types/dubbing_metadata_response.py | 2 +- ...agent_response_model_phone_numbers_item.py | 2 + .../get_conv_ai_settings_response_model.py | 2 + ...t_phone_number_sip_trunk_response_model.py | 6 + ...a_response_model_permission_on_resource.py | 2 +- .../types/get_speech_history_response.py | 5 + .../types/get_unit_test_response_model.py | 2 + .../types/knowledge_base_sort_by.py | 5 + .../types/literal_json_schema_property.py | 5 + src/elevenlabs/types/livekit_stack_type.py | 5 + src/elevenlabs/types/llm.py | 3 + src/elevenlabs/types/llm_reasoning_effort.py | 5 + ..._anything_parameter_evaluation_strategy.py | 18 + .../types/mcp_server_config_input.py | 4 + .../types/mcp_server_config_output.py | 4 + src/elevenlabs/types/model.py | 3 +- .../model_response_model_concurrency_group.py | 5 - .../types/model_settings_response_model.py | 5 - ...ct_extended_response_model_access_level.py | 4 +- .../project_response_model_access_level.py | 2 +- .../types/prompt_agent_api_model_input.py | 6 + ...prompt_agent_api_model_input_tools_item.py | 2 +- .../types/prompt_agent_api_model_output.py | 6 + ...rompt_agent_api_model_output_tools_item.py | 2 +- ...rompt_agent_api_model_workflow_override.py | 6 + ..._api_model_workflow_override_tools_item.py | 2 +- ...n_response_model_permission_on_resource.py | 2 +- .../types/resource_access_info_role.py | 2 +- ...e_model_anonymous_access_level_override.py | 2 +- .../sip_trunk_credentials_request_model.py | 4 +- src/elevenlabs/types/sort_direction.py | 5 + .../types/system_tool_config_input.py | 6 +- .../types/system_tool_config_output.py | 6 +- ...o_speech_stream_with_timestamps_request.py | 5 + .../text_to_speech_with_timestamps_request.py | 5 + .../types/tool_request_model_tool_config.py | 2 +- .../types/tool_response_model_tool_config.py | 2 +- .../types/tts_conversational_model.py | 5 +- .../types/unit_test_common_model_type.py | 5 + .../types/unit_test_run_response_model.py | 1 + .../types/unit_test_summary_response_model.py | 6 + ...t_test_tool_call_evaluation_model_input.py | 7 +- ..._test_tool_call_evaluation_model_output.py | 7 +- .../unit_test_tool_call_parameter_eval.py | 18 +- src/elevenlabs/types/vad_config.py | 23 ++ .../types/vad_config_workflow_override.py | 23 ++ .../types/webhook_tool_config_input.py | 6 +- .../types/webhook_tool_config_output.py | 6 +- ...e_resources_resource_id_share_post_role.py | 2 +- 115 files changed, 1844 insertions(+), 231 deletions(-) create mode 100644 src/elevenlabs/audio_native/types/__init__.py create mode 100644 src/elevenlabs/audio_native/types/audio_native_create_request_apply_text_normalization.py create mode 100644 src/elevenlabs/dubbing/types/dubbing_list_request_order_direction.py create mode 100644 src/elevenlabs/history/types/history_list_request_sort_direction.py create mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_full_with_timestamps_apply_text_normalization.py rename src/elevenlabs/text_to_speech/types/{body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization.py => body_text_to_speech_stream_with_timestamps_apply_text_normalization.py} (55%) delete mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization.py create mode 100644 src/elevenlabs/types/agent_metadata.py create mode 100644 src/elevenlabs/types/agent_sort_by.py create mode 100644 src/elevenlabs/types/knowledge_base_sort_by.py create mode 100644 src/elevenlabs/types/livekit_stack_type.py create mode 100644 src/elevenlabs/types/llm_reasoning_effort.py create mode 100644 src/elevenlabs/types/match_anything_parameter_evaluation_strategy.py delete mode 100644 src/elevenlabs/types/model_response_model_concurrency_group.py create mode 100644 src/elevenlabs/types/sort_direction.py create mode 100644 src/elevenlabs/types/text_to_speech_stream_with_timestamps_request.py create mode 100644 src/elevenlabs/types/text_to_speech_with_timestamps_request.py create mode 100644 src/elevenlabs/types/unit_test_common_model_type.py create mode 100644 src/elevenlabs/types/vad_config.py create mode 100644 src/elevenlabs/types/vad_config_workflow_override.py diff --git a/pyproject.toml b/pyproject.toml index fee74ead..42f39513 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.15.1" +version = "v2.16.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index a7b9ea98..92e426bc 100644 --- a/reference.md +++ b/reference.md @@ -132,7 +132,39 @@ client.history.list()
-**search:** `typing.Optional[str]` — Search term used for filtering history items. If provided, source becomes required. +**model_id:** `typing.Optional[str]` — Search term used for filtering history items. If provided, source becomes required. + +
+
+ +
+
+ +**date_before_unix:** `typing.Optional[int]` — Unix timestamp to filter history items before this date (exclusive). + +
+
+ +
+
+ +**date_after_unix:** `typing.Optional[int]` — Unix timestamp to filter history items after this date (inclusive). + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[HistoryListRequestSortDirection]` — Sort direction for the results. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — search term used for filtering
@@ -883,9 +915,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -1309,9 +1339,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -3726,6 +3754,22 @@ client.dubbing.list()
+**order_by:** `typing.Optional[typing.Literal["created_at"]]` — The field to use for ordering results from this query. + +
+
+ +
+
+ +**order_direction:** `typing.Optional[DubbingListRequestOrderDirection]` — The order direction to use for results from this query. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3930,7 +3974,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**disable_voice_cloning:** `typing.Optional[bool]` — [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. +**disable_voice_cloning:** `typing.Optional[bool]` — Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices.
@@ -4310,6 +4354,21 @@ typing.Optional[core.File]` — See core.File for more documentation **auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not. + +
+ +
+
+ +**apply_text_normalization:** `typing.Optional[AudioNativeCreateRequestApplyTextNormalization]` + + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + +
@@ -6812,7 +6871,7 @@ client.conversational_ai.agents.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. +**page_size:** `typing.Optional[int]` — How many Agents to return at maximum. Can not exceed 100, defaults to 30.
@@ -6820,7 +6879,7 @@ client.conversational_ai.agents.list()
-**page_size:** `typing.Optional[int]` — How many Agents to return at maximum. Can not exceed 100, defaults to 30. +**search:** `typing.Optional[str]` — Search by agents name.
@@ -6828,7 +6887,23 @@ client.conversational_ai.agents.list()
-**search:** `typing.Optional[str]` — Search by agents name. +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[AgentSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
@@ -7360,6 +7435,14 @@ client.conversational_ai.tests.create(
+**type:** `typing.Optional[UnitTestCommonModelType]` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7583,6 +7666,14 @@ client.conversational_ai.tests.update(
+**type:** `typing.Optional[UnitTestCommonModelType]` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -8110,7 +8201,7 @@ client.conversational_ai.phone_numbers.delete(
-Update Phone Number details by ID +Update assigned agent of a phone number
@@ -8164,6 +8255,30 @@ client.conversational_ai.phone_numbers.update(
+**inbound_trunk_config:** `typing.Optional[InboundSipTrunkConfigRequestModel]` + +
+
+ +
+
+ +**outbound_trunk_config:** `typing.Optional[OutboundSipTrunkConfigRequestModel]` + +
+
+ +
+
+ +**livekit_stack:** `typing.Optional[LivekitStackType]` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -8314,14 +8429,6 @@ client.conversational_ai.knowledge_base.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. - -
-
- -
-
- **page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30.
@@ -8358,6 +8465,22 @@ client.conversational_ai.knowledge_base.list()
+**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[KnowledgeBaseSortBy]` — The field to sort the results by + +
+
+ +
+
+ **use_typesense:** `typing.Optional[bool]` — If set to true, the endpoint will use typesense DB to search for the documents).
@@ -8366,6 +8489,14 @@ client.conversational_ai.knowledge_base.list()
+**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -8975,6 +9106,14 @@ client.conversational_ai.settings.update()
+**default_livekit_stack:** `typing.Optional[LivekitStackType]` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -9890,6 +10029,92 @@ client.conversational_ai.mcp_servers.get(
+ +
+
+ +
client.conversational_ai.mcp_servers.update(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the configuration settings for an MCP server. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.update( + mcp_server_id="mcp_server_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**approval_policy:** `typing.Optional[McpApprovalPolicy]` — The approval mode to set for the MCP server + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — Whether to force pre-tool speech for all tools from this MCP server + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -11371,7 +11596,7 @@ client.conversational_ai.mcp_servers.tools.list(
-Update the approval policy configuration for an MCP server. +Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead.
@@ -12189,7 +12414,7 @@ client.dubbing.resource.render(
-**should_normalize_volume:** `typing.Optional[bool]` — Whether to normalize the volume of the rendered audio. +**normalize_volume:** `typing.Optional[bool]` — Whether to normalize the volume of the rendered audio.
@@ -13551,6 +13776,76 @@ client.speech_to_text.transcripts.get( + + +
+ +
client.speech_to_text.transcripts.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a previously generated transcript by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.speech_to_text.transcripts.delete( + transcription_id="transcription_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transcription_id:** `str` — The unique ID of the transcript to delete + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 838ca4a9..65e1e3bc 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -28,10 +28,12 @@ AgentConfigOverride, AgentConfigOverrideConfig, AgentFailureResponseExample, + AgentMetadata, AgentMetadataResponseModel, AgentPlatformSettingsRequestModel, AgentPlatformSettingsResponseModel, AgentSimulatedChatTestResponseModel, + AgentSortBy, AgentSuccessfulResponseExample, AgentSummaryResponseModel, AgentTestingSettings, @@ -405,6 +407,7 @@ KnowledgeBaseDocumentMetadataResponseModel, KnowledgeBaseDocumentType, KnowledgeBaseLocator, + KnowledgeBaseSortBy, LanguageAddedResponse, LanguageDetectionToolConfig, LanguageDetectionToolResultModel, @@ -418,10 +421,12 @@ LiteralJsonSchemaProperty, LiteralJsonSchemaPropertyConstantValue, LiteralJsonSchemaPropertyType, + LivekitStackType, Llm, LlmCategoryUsage, LlmInputOutputTokensUsage, LlmParameterEvaluationStrategy, + LlmReasoningEffort, LlmTokensCategoryUsage, LlmUsageCalculatorLlmResponseModel, LlmUsageCalculatorResponseModel, @@ -429,6 +434,7 @@ LlmUsageOutput, ManualVerificationFileResponse, ManualVerificationResponse, + MatchAnythingParameterEvaluationStrategy, McpApprovalPolicy, McpServerConfigInput, McpServerConfigInputRequestHeadersValue, @@ -451,7 +457,6 @@ MetricType, Model, ModelRatesResponseModel, - ModelResponseModelConcurrencyGroup, ModelSettingsResponseModel, ModerationStatusResponseModel, ModerationStatusResponseModelSafetyStatus, @@ -602,6 +607,7 @@ SkipTurnToolResponseModel, SongMetadata, SongSection, + SortDirection, SpeakerAudioResponseModel, SpeakerResponseModel, SpeakerSegment, @@ -659,6 +665,8 @@ TextToSpeechApplyTextNormalizationEnum, TextToSpeechOutputFormatEnum, TextToSpeechStreamRequest, + TextToSpeechStreamWithTimestampsRequest, + TextToSpeechWithTimestampsRequest, TokenResponseModel, Tool, ToolAnnotations, @@ -701,12 +709,14 @@ TurnMode, TwilioOutboundCallResponse, TxtExportOptions, + UnitTestCommonModelType, UnitTestRunResponseModel, UnitTestSummaryResponseModel, UnitTestToolCallEvaluationModelInput, UnitTestToolCallEvaluationModelOutput, UnitTestToolCallParameter, UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Anything, UnitTestToolCallParameterEval_Exact, UnitTestToolCallParameterEval_Llm, UnitTestToolCallParameterEval_Regex, @@ -722,6 +732,8 @@ UserFeedback, UserFeedbackScore, UtteranceResponseModel, + VadConfig, + VadConfigWorkflowOverride, ValidationError, ValidationErrorLocItem, VerificationAttemptResponse, @@ -866,10 +878,15 @@ workspace, ) from .audio_isolation import AudioIsolationConvertRequestFileFormat, AudioIsolationStreamRequestFileFormat + from .audio_native import AudioNativeCreateRequestApplyTextNormalization from .client import AsyncElevenLabs, ElevenLabs - from .dubbing import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator + from .dubbing import ( + DubbingListRequestDubbingStatus, + DubbingListRequestFilterByCreator, + DubbingListRequestOrderDirection, + ) from .environment import ElevenLabsEnvironment - from .history import HistoryListRequestSource + from .history import HistoryListRequestSortDirection, HistoryListRequestSource from .music import ( MusicComposeDetailedRequestOutputFormat, MusicComposeRequestOutputFormat, @@ -915,10 +932,10 @@ ) from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat from .text_to_speech import ( + BodyTextToSpeechFullWithTimestampsApplyTextNormalization, + BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, TextToSpeechConvertRequestOutputFormat, TextToSpeechConvertWithTimestampsRequestOutputFormat, TextToSpeechStreamRequestOutputFormat, @@ -956,10 +973,12 @@ "AgentConfigOverride": ".types", "AgentConfigOverrideConfig": ".types", "AgentFailureResponseExample": ".types", + "AgentMetadata": ".types", "AgentMetadataResponseModel": ".types", "AgentPlatformSettingsRequestModel": ".types", "AgentPlatformSettingsResponseModel": ".types", "AgentSimulatedChatTestResponseModel": ".types", + "AgentSortBy": ".types", "AgentSuccessfulResponseExample": ".types", "AgentSummaryResponseModel": ".types", "AgentTestingSettings": ".types", @@ -990,6 +1009,7 @@ "AudioIsolationConvertRequestFileFormat": ".audio_isolation", "AudioIsolationStreamRequestFileFormat": ".audio_isolation", "AudioNativeCreateProjectResponseModel": ".types", + "AudioNativeCreateRequestApplyTextNormalization": ".audio_native", "AudioNativeEditContentResponseModel": ".types", "AudioNativeProjectSettingsResponseModel": ".types", "AudioNativeProjectSettingsResponseModelStatus": ".types", @@ -1023,10 +1043,10 @@ "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender": ".types", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".text_to_dialogue", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".text_to_dialogue", + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".text_to_speech", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".text_to_speech", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".text_to_speech", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".text_to_speech", "BreakdownTypes": ".types", "BuiltInToolsInput": ".types", "BuiltInToolsOutput": ".types", @@ -1217,6 +1237,7 @@ "DubbedSegment": ".types", "DubbingListRequestDubbingStatus": ".dubbing", "DubbingListRequestFilterByCreator": ".dubbing", + "DubbingListRequestOrderDirection": ".dubbing", "DubbingMediaMetadata": ".types", "DubbingMediaReference": ".types", "DubbingMetadataPageResponseModel": ".types", @@ -1346,6 +1367,7 @@ "HistoryAlignmentResponseModel": ".types", "HistoryAlignmentsResponseModel": ".types", "HistoryItemResponse": ".types", + "HistoryListRequestSortDirection": ".history", "HistoryListRequestSource": ".history", "HtmlExportOptions": ".types", "HttpValidationError": ".types", @@ -1362,6 +1384,7 @@ "KnowledgeBaseDocumentMetadataResponseModel": ".types", "KnowledgeBaseDocumentType": ".types", "KnowledgeBaseLocator": ".types", + "KnowledgeBaseSortBy": ".types", "LanguageAddedResponse": ".types", "LanguageDetectionToolConfig": ".types", "LanguageDetectionToolResultModel": ".types", @@ -1375,10 +1398,12 @@ "LiteralJsonSchemaProperty": ".types", "LiteralJsonSchemaPropertyConstantValue": ".types", "LiteralJsonSchemaPropertyType": ".types", + "LivekitStackType": ".types", "Llm": ".types", "LlmCategoryUsage": ".types", "LlmInputOutputTokensUsage": ".types", "LlmParameterEvaluationStrategy": ".types", + "LlmReasoningEffort": ".types", "LlmTokensCategoryUsage": ".types", "LlmUsageCalculatorLlmResponseModel": ".types", "LlmUsageCalculatorResponseModel": ".types", @@ -1386,6 +1411,7 @@ "LlmUsageOutput": ".types", "ManualVerificationFileResponse": ".types", "ManualVerificationResponse": ".types", + "MatchAnythingParameterEvaluationStrategy": ".types", "McpApprovalPolicy": ".types", "McpServerConfigInput": ".types", "McpServerConfigInputRequestHeadersValue": ".types", @@ -1408,7 +1434,6 @@ "MetricType": ".types", "Model": ".types", "ModelRatesResponseModel": ".types", - "ModelResponseModelConcurrencyGroup": ".types", "ModelSettingsResponseModel": ".types", "ModerationStatusResponseModel": ".types", "ModerationStatusResponseModelSafetyStatus": ".types", @@ -1569,6 +1594,7 @@ "SkipTurnToolResponseModel": ".types", "SongMetadata": ".types", "SongSection": ".types", + "SortDirection": ".types", "SpeakerAudioResponseModel": ".types", "SpeakerResponseModel": ".types", "SpeakerSegment": ".types", @@ -1640,7 +1666,9 @@ "TextToSpeechOutputFormatEnum": ".types", "TextToSpeechStreamRequest": ".types", "TextToSpeechStreamRequestOutputFormat": ".text_to_speech", + "TextToSpeechStreamWithTimestampsRequest": ".types", "TextToSpeechStreamWithTimestampsRequestOutputFormat": ".text_to_speech", + "TextToSpeechWithTimestampsRequest": ".types", "TextToVoiceCreatePreviewsRequestOutputFormat": ".text_to_voice", "TextToVoiceDesignRequestOutputFormat": ".text_to_voice", "TextToVoiceRemixRequestOutputFormat": ".text_to_voice", @@ -1688,12 +1716,14 @@ "TwilioOutboundCallResponse": ".types", "TxtExportOptions": ".types", "UnauthorizedError": ".errors", + "UnitTestCommonModelType": ".types", "UnitTestRunResponseModel": ".types", "UnitTestSummaryResponseModel": ".types", "UnitTestToolCallEvaluationModelInput": ".types", "UnitTestToolCallEvaluationModelOutput": ".types", "UnitTestToolCallParameter": ".types", "UnitTestToolCallParameterEval": ".types", + "UnitTestToolCallParameterEval_Anything": ".types", "UnitTestToolCallParameterEval_Exact": ".types", "UnitTestToolCallParameterEval_Llm": ".types", "UnitTestToolCallParameterEval_Regex": ".types", @@ -1710,6 +1740,8 @@ "UserFeedback": ".types", "UserFeedbackScore": ".types", "UtteranceResponseModel": ".types", + "VadConfig": ".types", + "VadConfigWorkflowOverride": ".types", "ValidationError": ".types", "ValidationErrorLocItem": ".types", "VerificationAttemptResponse": ".types", @@ -1892,10 +1924,12 @@ def __dir__(): "AgentConfigOverride", "AgentConfigOverrideConfig", "AgentFailureResponseExample", + "AgentMetadata", "AgentMetadataResponseModel", "AgentPlatformSettingsRequestModel", "AgentPlatformSettingsResponseModel", "AgentSimulatedChatTestResponseModel", + "AgentSortBy", "AgentSuccessfulResponseExample", "AgentSummaryResponseModel", "AgentTestingSettings", @@ -1926,6 +1960,7 @@ def __dir__(): "AudioIsolationConvertRequestFileFormat", "AudioIsolationStreamRequestFileFormat", "AudioNativeCreateProjectResponseModel", + "AudioNativeCreateRequestApplyTextNormalization", "AudioNativeEditContentResponseModel", "AudioNativeProjectSettingsResponseModel", "AudioNativeProjectSettingsResponseModelStatus", @@ -1959,10 +1994,10 @@ def __dir__(): "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization", "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", @@ -2153,6 +2188,7 @@ def __dir__(): "DubbedSegment", "DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", + "DubbingListRequestOrderDirection", "DubbingMediaMetadata", "DubbingMediaReference", "DubbingMetadataPageResponseModel", @@ -2282,6 +2318,7 @@ def __dir__(): "HistoryAlignmentResponseModel", "HistoryAlignmentsResponseModel", "HistoryItemResponse", + "HistoryListRequestSortDirection", "HistoryListRequestSource", "HtmlExportOptions", "HttpValidationError", @@ -2298,6 +2335,7 @@ def __dir__(): "KnowledgeBaseDocumentMetadataResponseModel", "KnowledgeBaseDocumentType", "KnowledgeBaseLocator", + "KnowledgeBaseSortBy", "LanguageAddedResponse", "LanguageDetectionToolConfig", "LanguageDetectionToolResultModel", @@ -2311,10 +2349,12 @@ def __dir__(): "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", + "LivekitStackType", "Llm", "LlmCategoryUsage", "LlmInputOutputTokensUsage", "LlmParameterEvaluationStrategy", + "LlmReasoningEffort", "LlmTokensCategoryUsage", "LlmUsageCalculatorLlmResponseModel", "LlmUsageCalculatorResponseModel", @@ -2322,6 +2362,7 @@ def __dir__(): "LlmUsageOutput", "ManualVerificationFileResponse", "ManualVerificationResponse", + "MatchAnythingParameterEvaluationStrategy", "McpApprovalPolicy", "McpServerConfigInput", "McpServerConfigInputRequestHeadersValue", @@ -2344,7 +2385,6 @@ def __dir__(): "MetricType", "Model", "ModelRatesResponseModel", - "ModelResponseModelConcurrencyGroup", "ModelSettingsResponseModel", "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", @@ -2505,6 +2545,7 @@ def __dir__(): "SkipTurnToolResponseModel", "SongMetadata", "SongSection", + "SortDirection", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -2576,7 +2617,9 @@ def __dir__(): "TextToSpeechOutputFormatEnum", "TextToSpeechStreamRequest", "TextToSpeechStreamRequestOutputFormat", + "TextToSpeechStreamWithTimestampsRequest", "TextToSpeechStreamWithTimestampsRequestOutputFormat", + "TextToSpeechWithTimestampsRequest", "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", "TextToVoiceRemixRequestOutputFormat", @@ -2624,12 +2667,14 @@ def __dir__(): "TwilioOutboundCallResponse", "TxtExportOptions", "UnauthorizedError", + "UnitTestCommonModelType", "UnitTestRunResponseModel", "UnitTestSummaryResponseModel", "UnitTestToolCallEvaluationModelInput", "UnitTestToolCallEvaluationModelOutput", "UnitTestToolCallParameter", "UnitTestToolCallParameterEval", + "UnitTestToolCallParameterEval_Anything", "UnitTestToolCallParameterEval_Exact", "UnitTestToolCallParameterEval_Llm", "UnitTestToolCallParameterEval_Regex", @@ -2646,6 +2691,8 @@ def __dir__(): "UserFeedback", "UserFeedbackScore", "UtteranceResponseModel", + "VadConfig", + "VadConfigWorkflowOverride", "ValidationError", "ValidationErrorLocItem", "VerificationAttemptResponse", diff --git a/src/elevenlabs/audio_native/__init__.py b/src/elevenlabs/audio_native/__init__.py index 5cde0202..90f944e5 100644 --- a/src/elevenlabs/audio_native/__init__.py +++ b/src/elevenlabs/audio_native/__init__.py @@ -2,3 +2,31 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import AudioNativeCreateRequestApplyTextNormalization +_dynamic_imports: typing.Dict[str, str] = {"AudioNativeCreateRequestApplyTextNormalization": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AudioNativeCreateRequestApplyTextNormalization"] diff --git a/src/elevenlabs/audio_native/client.py b/src/elevenlabs/audio_native/client.py index 9ca194b8..6e6ffb8d 100644 --- a/src/elevenlabs/audio_native/client.py +++ b/src/elevenlabs/audio_native/client.py @@ -9,6 +9,7 @@ from ..types.audio_native_edit_content_response_model import AudioNativeEditContentResponseModel from ..types.get_audio_native_project_settings_response_model import GetAudioNativeProjectSettingsResponseModel from .raw_client import AsyncRawAudioNativeClient, RawAudioNativeClient +from .types.audio_native_create_request_apply_text_normalization import AudioNativeCreateRequestApplyTextNormalization # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -44,6 +45,7 @@ def create( model_id: typing.Optional[str] = OMIT, file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, + apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioNativeCreateProjectResponseModel: """ @@ -87,6 +89,14 @@ def create( auto_convert : typing.Optional[bool] Whether to auto convert the project to audio or not. + apply_text_normalization : typing.Optional[AudioNativeCreateRequestApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -119,6 +129,7 @@ def create( model_id=model_id, file=file, auto_convert=auto_convert, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) return _response.data @@ -237,6 +248,7 @@ async def create( model_id: typing.Optional[str] = OMIT, file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, + apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioNativeCreateProjectResponseModel: """ @@ -280,6 +292,14 @@ async def create( auto_convert : typing.Optional[bool] Whether to auto convert the project to audio or not. + apply_text_normalization : typing.Optional[AudioNativeCreateRequestApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -320,6 +340,7 @@ async def main() -> None: model_id=model_id, file=file, auto_convert=auto_convert, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/audio_native/raw_client.py b/src/elevenlabs/audio_native/raw_client.py index 4382309c..f19844b6 100644 --- a/src/elevenlabs/audio_native/raw_client.py +++ b/src/elevenlabs/audio_native/raw_client.py @@ -15,6 +15,7 @@ from ..types.audio_native_edit_content_response_model import AudioNativeEditContentResponseModel from ..types.get_audio_native_project_settings_response_model import GetAudioNativeProjectSettingsResponseModel from ..types.http_validation_error import HttpValidationError +from .types.audio_native_create_request_apply_text_normalization import AudioNativeCreateRequestApplyTextNormalization # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -39,6 +40,7 @@ def create( model_id: typing.Optional[str] = OMIT, file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, + apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AudioNativeCreateProjectResponseModel]: """ @@ -82,6 +84,14 @@ def create( auto_convert : typing.Optional[bool] Whether to auto convert the project to audio or not. + apply_text_normalization : typing.Optional[AudioNativeCreateRequestApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -105,6 +115,7 @@ def create( "voice_id": voice_id, "model_id": model_id, "auto_convert": auto_convert, + "apply_text_normalization": apply_text_normalization, }, files={ **({"file": file} if file is not None else {}), @@ -283,6 +294,7 @@ async def create( model_id: typing.Optional[str] = OMIT, file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, + apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AudioNativeCreateProjectResponseModel]: """ @@ -326,6 +338,14 @@ async def create( auto_convert : typing.Optional[bool] Whether to auto convert the project to audio or not. + apply_text_normalization : typing.Optional[AudioNativeCreateRequestApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -349,6 +369,7 @@ async def create( "voice_id": voice_id, "model_id": model_id, "auto_convert": auto_convert, + "apply_text_normalization": apply_text_normalization, }, files={ **({"file": file} if file is not None else {}), diff --git a/src/elevenlabs/audio_native/types/__init__.py b/src/elevenlabs/audio_native/types/__init__.py new file mode 100644 index 00000000..4adb0b49 --- /dev/null +++ b/src/elevenlabs/audio_native/types/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .audio_native_create_request_apply_text_normalization import AudioNativeCreateRequestApplyTextNormalization +_dynamic_imports: typing.Dict[str, str] = { + "AudioNativeCreateRequestApplyTextNormalization": ".audio_native_create_request_apply_text_normalization" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AudioNativeCreateRequestApplyTextNormalization"] diff --git a/src/elevenlabs/audio_native/types/audio_native_create_request_apply_text_normalization.py b/src/elevenlabs/audio_native/types/audio_native_create_request_apply_text_normalization.py new file mode 100644 index 00000000..a132540c --- /dev/null +++ b/src/elevenlabs/audio_native/types/audio_native_create_request_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AudioNativeCreateRequestApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off", "apply_english"], typing.Any +] diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 3e0b121a..923c365a 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -9,6 +9,7 @@ from ...types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel +from ...types.agent_sort_by import AgentSortBy from ...types.conversation_simulation_specification import ConversationSimulationSpecification from ...types.conversational_config import ConversationalConfig from ...types.create_agent_response_model import CreateAgentResponseModel @@ -17,6 +18,7 @@ from ...types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from ...types.prompt_evaluation_criteria import PromptEvaluationCriteria from ...types.single_test_run_request_model import SingleTestRunRequestModel +from ...types.sort_direction import SortDirection from .raw_client import AsyncRawAgentsClient, RawAgentsClient if typing.TYPE_CHECKING: @@ -233,9 +235,11 @@ def update( def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[AgentSortBy] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetAgentsPageResponseModel: """ @@ -243,15 +247,21 @@ def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many Agents to return at maximum. Can not exceed 100, defaults to 30. search : typing.Optional[str] Search by agents name. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[AgentSortBy] + The field to sort the results by + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -270,7 +280,12 @@ def list( client.conversational_ai.agents.list() """ _response = self._raw_client.list( - cursor=cursor, page_size=page_size, search=search, request_options=request_options + page_size=page_size, + search=search, + sort_direction=sort_direction, + sort_by=sort_by, + cursor=cursor, + request_options=request_options, ) return _response.data @@ -766,9 +781,11 @@ async def main() -> None: async def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[AgentSortBy] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetAgentsPageResponseModel: """ @@ -776,15 +793,21 @@ async def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many Agents to return at maximum. Can not exceed 100, defaults to 30. search : typing.Optional[str] Search by agents name. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[AgentSortBy] + The field to sort the results by + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -811,7 +834,12 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.list( - cursor=cursor, page_size=page_size, search=search, request_options=request_options + page_size=page_size, + search=search, + sort_direction=sort_direction, + sort_by=sort_by, + cursor=cursor, + request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index 8bba27fe..cd649e1f 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -14,6 +14,7 @@ from ...types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel +from ...types.agent_sort_by import AgentSortBy from ...types.conversation_simulation_specification import ConversationSimulationSpecification from ...types.conversational_config import ConversationalConfig from ...types.create_agent_response_model import CreateAgentResponseModel @@ -23,6 +24,7 @@ from ...types.http_validation_error import HttpValidationError from ...types.prompt_evaluation_criteria import PromptEvaluationCriteria from ...types.single_test_run_request_model import SingleTestRunRequestModel +from ...types.sort_direction import SortDirection # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -295,9 +297,11 @@ def update( def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[AgentSortBy] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetAgentsPageResponseModel]: """ @@ -305,15 +309,21 @@ def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many Agents to return at maximum. Can not exceed 100, defaults to 30. search : typing.Optional[str] Search by agents name. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[AgentSortBy] + The field to sort the results by + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -326,9 +336,11 @@ def list( "v1/convai/agents", method="GET", params={ - "cursor": cursor, "page_size": page_size, "search": search, + "sort_direction": sort_direction, + "sort_by": sort_by, + "cursor": cursor, }, request_options=request_options, ) @@ -919,9 +931,11 @@ async def update( async def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[AgentSortBy] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetAgentsPageResponseModel]: """ @@ -929,15 +943,21 @@ async def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many Agents to return at maximum. Can not exceed 100, defaults to 30. search : typing.Optional[str] Search by agents name. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[AgentSortBy] + The field to sort the results by + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -950,9 +970,11 @@ async def list( "v1/convai/agents", method="GET", params={ - "cursor": cursor, "page_size": page_size, "search": search, + "sort_direction": sort_direction, + "sort_by": sort_by, + "cursor": cursor, }, request_options=request_options, ) diff --git a/src/elevenlabs/conversational_ai/knowledge_base/client.py b/src/elevenlabs/conversational_ai/knowledge_base/client.py index 847e3d2e..3edec4e1 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/client.py @@ -8,6 +8,8 @@ from ...core.request_options import RequestOptions from ...types.get_knowledge_base_list_response_model import GetKnowledgeBaseListResponseModel from ...types.knowledge_base_document_type import KnowledgeBaseDocumentType +from ...types.knowledge_base_sort_by import KnowledgeBaseSortBy +from ...types.sort_direction import SortDirection from .raw_client import AsyncRawKnowledgeBaseClient, RawKnowledgeBaseClient if typing.TYPE_CHECKING: @@ -36,14 +38,16 @@ def with_raw_response(self) -> RawKnowledgeBaseClient: def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, show_only_owned_documents: typing.Optional[bool] = None, types: typing.Optional[ typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]] ] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[KnowledgeBaseSortBy] = None, use_typesense: typing.Optional[bool] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetKnowledgeBaseListResponseModel: """ @@ -51,9 +55,6 @@ def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many documents to return at maximum. Can not exceed 100, defaults to 30. @@ -66,9 +67,18 @@ def list( types : typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]] If present, the endpoint will return only documents of the given types. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[KnowledgeBaseSortBy] + The field to sort the results by + use_typesense : typing.Optional[bool] If set to true, the endpoint will use typesense DB to search for the documents). + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -87,12 +97,14 @@ def list( client.conversational_ai.knowledge_base.list() """ _response = self._raw_client.list( - cursor=cursor, page_size=page_size, search=search, show_only_owned_documents=show_only_owned_documents, types=types, + sort_direction=sort_direction, + sort_by=sort_by, use_typesense=use_typesense, + cursor=cursor, request_options=request_options, ) return _response.data @@ -135,14 +147,16 @@ def with_raw_response(self) -> AsyncRawKnowledgeBaseClient: async def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, show_only_owned_documents: typing.Optional[bool] = None, types: typing.Optional[ typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]] ] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[KnowledgeBaseSortBy] = None, use_typesense: typing.Optional[bool] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetKnowledgeBaseListResponseModel: """ @@ -150,9 +164,6 @@ async def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many documents to return at maximum. Can not exceed 100, defaults to 30. @@ -165,9 +176,18 @@ async def list( types : typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]] If present, the endpoint will return only documents of the given types. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[KnowledgeBaseSortBy] + The field to sort the results by + use_typesense : typing.Optional[bool] If set to true, the endpoint will use typesense DB to search for the documents). + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -194,12 +214,14 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.list( - cursor=cursor, page_size=page_size, search=search, show_only_owned_documents=show_only_owned_documents, types=types, + sort_direction=sort_direction, + sort_by=sort_by, use_typesense=use_typesense, + cursor=cursor, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/knowledge_base/raw_client.py b/src/elevenlabs/conversational_ai/knowledge_base/raw_client.py index fc11364c..15efdca9 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/raw_client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/raw_client.py @@ -12,6 +12,8 @@ from ...types.get_knowledge_base_list_response_model import GetKnowledgeBaseListResponseModel from ...types.http_validation_error import HttpValidationError from ...types.knowledge_base_document_type import KnowledgeBaseDocumentType +from ...types.knowledge_base_sort_by import KnowledgeBaseSortBy +from ...types.sort_direction import SortDirection class RawKnowledgeBaseClient: @@ -21,14 +23,16 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, show_only_owned_documents: typing.Optional[bool] = None, types: typing.Optional[ typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]] ] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[KnowledgeBaseSortBy] = None, use_typesense: typing.Optional[bool] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetKnowledgeBaseListResponseModel]: """ @@ -36,9 +40,6 @@ def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many documents to return at maximum. Can not exceed 100, defaults to 30. @@ -51,9 +52,18 @@ def list( types : typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]] If present, the endpoint will return only documents of the given types. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[KnowledgeBaseSortBy] + The field to sort the results by + use_typesense : typing.Optional[bool] If set to true, the endpoint will use typesense DB to search for the documents). + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -66,12 +76,14 @@ def list( "v1/convai/knowledge-base", method="GET", params={ - "cursor": cursor, "page_size": page_size, "search": search, "show_only_owned_documents": show_only_owned_documents, "types": types, + "sort_direction": sort_direction, + "sort_by": sort_by, "use_typesense": use_typesense, + "cursor": cursor, }, request_options=request_options, ) @@ -109,14 +121,16 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - cursor: typing.Optional[str] = None, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, show_only_owned_documents: typing.Optional[bool] = None, types: typing.Optional[ typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]] ] = None, + sort_direction: typing.Optional[SortDirection] = None, + sort_by: typing.Optional[KnowledgeBaseSortBy] = None, use_typesense: typing.Optional[bool] = None, + cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetKnowledgeBaseListResponseModel]: """ @@ -124,9 +138,6 @@ async def list( Parameters ---------- - cursor : typing.Optional[str] - Used for fetching next page. Cursor is returned in the response. - page_size : typing.Optional[int] How many documents to return at maximum. Can not exceed 100, defaults to 30. @@ -139,9 +150,18 @@ async def list( types : typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]] If present, the endpoint will return only documents of the given types. + sort_direction : typing.Optional[SortDirection] + The direction to sort the results + + sort_by : typing.Optional[KnowledgeBaseSortBy] + The field to sort the results by + use_typesense : typing.Optional[bool] If set to true, the endpoint will use typesense DB to search for the documents). + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -154,12 +174,14 @@ async def list( "v1/convai/knowledge-base", method="GET", params={ - "cursor": cursor, "page_size": page_size, "search": search, "show_only_owned_documents": show_only_owned_documents, "types": types, + "sort_direction": sort_direction, + "sort_by": sort_by, "use_typesense": use_typesense, + "cursor": cursor, }, request_options=request_options, ) diff --git a/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/client.py b/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/client.py index aef59ada..85ec9765 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/client.py @@ -35,7 +35,7 @@ def update( request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ - Update the approval policy configuration for an MCP server. + Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead. Parameters ---------- @@ -94,7 +94,7 @@ async def update( request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ - Update the approval policy configuration for an MCP server. + Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead. Parameters ---------- diff --git a/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/raw_client.py index 6bdcc6f8..5eed9759 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/raw_client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/approval_policy/raw_client.py @@ -30,7 +30,7 @@ def update( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[McpServerResponseModel]: """ - Update the approval policy configuration for an MCP server. + Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead. Parameters ---------- @@ -99,7 +99,7 @@ async def update( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[McpServerResponseModel]: """ - Update the approval policy configuration for an MCP server. + Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead. Parameters ---------- diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py index 095b1be3..b2607475 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py @@ -6,6 +6,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions +from ...types.mcp_approval_policy import McpApprovalPolicy from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel @@ -133,6 +134,55 @@ def get( _response = self._raw_client.get(mcp_server_id, request_options=request_options) return _response.data + def update( + self, + mcp_server_id: str, + *, + approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Update the configuration settings for an MCP server. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + approval_policy : typing.Optional[McpApprovalPolicy] + The approval mode to set for the MCP server + + force_pre_tool_speech : typing.Optional[bool] + Whether to force pre-tool speech for all tools from this MCP server + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.mcp_servers.update( + mcp_server_id="mcp_server_id", + ) + """ + _response = self._raw_client.update( + mcp_server_id, + approval_policy=approval_policy, + force_pre_tool_speech=force_pre_tool_speech, + request_options=request_options, + ) + return _response.data + @property def tools(self): if self._tools is None: @@ -296,6 +346,63 @@ async def main() -> None: _response = await self._raw_client.get(mcp_server_id, request_options=request_options) return _response.data + async def update( + self, + mcp_server_id: str, + *, + approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Update the configuration settings for an MCP server. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + approval_policy : typing.Optional[McpApprovalPolicy] + The approval mode to set for the MCP server + + force_pre_tool_speech : typing.Optional[bool] + Whether to force pre-tool speech for all tools from this MCP server + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.mcp_servers.update( + mcp_server_id="mcp_server_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + mcp_server_id, + approval_policy=approval_policy, + force_pre_tool_speech=force_pre_tool_speech, + request_options=request_options, + ) + return _response.data + @property def tools(self): if self._tools is None: diff --git a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py index 9904503e..b3581e5b 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py @@ -12,6 +12,7 @@ from ...core.unchecked_base_model import construct_type from ...errors.unprocessable_entity_error import UnprocessableEntityError from ...types.http_validation_error import HttpValidationError +from ...types.mcp_approval_policy import McpApprovalPolicy from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel @@ -178,6 +179,75 @@ def get( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def update( + self, + mcp_server_id: str, + *, + approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[McpServerResponseModel]: + """ + Update the configuration settings for an MCP server. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + approval_policy : typing.Optional[McpApprovalPolicy] + The approval mode to set for the MCP server + + force_pre_tool_speech : typing.Optional[bool] + Whether to force pre-tool speech for all tools from this MCP server + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[McpServerResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}", + method="PATCH", + json={ + "approval_policy": approval_policy, + "force_pre_tool_speech": force_pre_tool_speech, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawMcpServersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -338,3 +408,72 @@ async def get( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + mcp_server_id: str, + *, + approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[McpServerResponseModel]: + """ + Update the configuration settings for an MCP server. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + approval_policy : typing.Optional[McpApprovalPolicy] + The approval mode to set for the MCP server + + force_pre_tool_speech : typing.Optional[bool] + Whether to force pre-tool speech for all tools from this MCP server + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[McpServerResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}", + method="PATCH", + json={ + "approval_policy": approval_policy, + "force_pre_tool_speech": force_pre_tool_speech, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/phone_numbers/client.py b/src/elevenlabs/conversational_ai/phone_numbers/client.py index 50d328e7..bda88e04 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/client.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/client.py @@ -5,6 +5,9 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.create_phone_number_response_model import CreatePhoneNumberResponseModel +from ...types.inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel +from ...types.livekit_stack_type import LivekitStackType +from ...types.outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel from .raw_client import AsyncRawPhoneNumbersClient, RawPhoneNumbersClient from .types.phone_numbers_create_request_body import PhoneNumbersCreateRequestBody from .types.phone_numbers_get_response import PhoneNumbersGetResponse @@ -169,10 +172,13 @@ def update( phone_number_id: str, *, agent_id: typing.Optional[str] = OMIT, + inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT, + outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT, + livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> PhoneNumbersUpdateResponse: """ - Update Phone Number details by ID + Update assigned agent of a phone number Parameters ---------- @@ -181,6 +187,12 @@ def update( agent_id : typing.Optional[str] + inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel] + + outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel] + + livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -200,7 +212,14 @@ def update( phone_number_id="TeaqRRdTcIfIu2i7BYfT", ) """ - _response = self._raw_client.update(phone_number_id, agent_id=agent_id, request_options=request_options) + _response = self._raw_client.update( + phone_number_id, + agent_id=agent_id, + inbound_trunk_config=inbound_trunk_config, + outbound_trunk_config=outbound_trunk_config, + livekit_stack=livekit_stack, + request_options=request_options, + ) return _response.data @@ -390,10 +409,13 @@ async def update( phone_number_id: str, *, agent_id: typing.Optional[str] = OMIT, + inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT, + outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT, + livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> PhoneNumbersUpdateResponse: """ - Update Phone Number details by ID + Update assigned agent of a phone number Parameters ---------- @@ -402,6 +424,12 @@ async def update( agent_id : typing.Optional[str] + inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel] + + outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel] + + livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -429,5 +457,12 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update(phone_number_id, agent_id=agent_id, request_options=request_options) + _response = await self._raw_client.update( + phone_number_id, + agent_id=agent_id, + inbound_trunk_config=inbound_trunk_config, + outbound_trunk_config=outbound_trunk_config, + livekit_stack=livekit_stack, + request_options=request_options, + ) return _response.data diff --git a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py index 243f606f..be9eaa2e 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py @@ -13,6 +13,9 @@ from ...errors.unprocessable_entity_error import UnprocessableEntityError from ...types.create_phone_number_response_model import CreatePhoneNumberResponseModel from ...types.http_validation_error import HttpValidationError +from ...types.inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel +from ...types.livekit_stack_type import LivekitStackType +from ...types.outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel from .types.phone_numbers_create_request_body import PhoneNumbersCreateRequestBody from .types.phone_numbers_get_response import PhoneNumbersGetResponse from .types.phone_numbers_list_response_item import PhoneNumbersListResponseItem @@ -236,10 +239,13 @@ def update( phone_number_id: str, *, agent_id: typing.Optional[str] = OMIT, + inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT, + outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT, + livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PhoneNumbersUpdateResponse]: """ - Update Phone Number details by ID + Update assigned agent of a phone number Parameters ---------- @@ -248,6 +254,12 @@ def update( agent_id : typing.Optional[str] + inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel] + + outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel] + + livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -261,6 +273,13 @@ def update( method="PATCH", json={ "agent_id": agent_id, + "inbound_trunk_config": convert_and_respect_annotation_metadata( + object_=inbound_trunk_config, annotation=InboundSipTrunkConfigRequestModel, direction="write" + ), + "outbound_trunk_config": convert_and_respect_annotation_metadata( + object_=outbound_trunk_config, annotation=OutboundSipTrunkConfigRequestModel, direction="write" + ), + "livekit_stack": livekit_stack, }, headers={ "content-type": "application/json", @@ -509,10 +528,13 @@ async def update( phone_number_id: str, *, agent_id: typing.Optional[str] = OMIT, + inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT, + outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT, + livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PhoneNumbersUpdateResponse]: """ - Update Phone Number details by ID + Update assigned agent of a phone number Parameters ---------- @@ -521,6 +543,12 @@ async def update( agent_id : typing.Optional[str] + inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel] + + outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel] + + livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -534,6 +562,13 @@ async def update( method="PATCH", json={ "agent_id": agent_id, + "inbound_trunk_config": convert_and_respect_annotation_metadata( + object_=inbound_trunk_config, annotation=InboundSipTrunkConfigRequestModel, direction="write" + ), + "outbound_trunk_config": convert_and_respect_annotation_metadata( + object_=outbound_trunk_config, annotation=OutboundSipTrunkConfigRequestModel, direction="write" + ), + "livekit_stack": livekit_stack, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_get_response.py b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_get_response.py index 1b382f09..e65c5546 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_get_response.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_get_response.py @@ -14,6 +14,7 @@ from ....types.get_phone_number_outbound_sip_trunk_config_response_model import ( GetPhoneNumberOutboundSipTrunkConfigResponseModel, ) +from ....types.livekit_stack_type import LivekitStackType from ....types.phone_number_agent_info import PhoneNumberAgentInfo @@ -47,6 +48,7 @@ class PhoneNumbersGetResponse_SipTrunk(UncheckedBaseModel): provider_config: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None outbound_trunk: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None inbound_trunk: typing.Optional[GetPhoneNumberInboundSipTrunkConfigResponseModel] = None + livekit_stack: LivekitStackType if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_list_response_item.py b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_list_response_item.py index a585546b..90526d95 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_list_response_item.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_list_response_item.py @@ -14,6 +14,7 @@ from ....types.get_phone_number_outbound_sip_trunk_config_response_model import ( GetPhoneNumberOutboundSipTrunkConfigResponseModel, ) +from ....types.livekit_stack_type import LivekitStackType from ....types.phone_number_agent_info import PhoneNumberAgentInfo @@ -47,6 +48,7 @@ class PhoneNumbersListResponseItem_SipTrunk(UncheckedBaseModel): provider_config: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None outbound_trunk: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None inbound_trunk: typing.Optional[GetPhoneNumberInboundSipTrunkConfigResponseModel] = None + livekit_stack: LivekitStackType if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_update_response.py b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_update_response.py index 28361f3d..2ce845b9 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_update_response.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_update_response.py @@ -14,6 +14,7 @@ from ....types.get_phone_number_outbound_sip_trunk_config_response_model import ( GetPhoneNumberOutboundSipTrunkConfigResponseModel, ) +from ....types.livekit_stack_type import LivekitStackType from ....types.phone_number_agent_info import PhoneNumberAgentInfo @@ -47,6 +48,7 @@ class PhoneNumbersUpdateResponse_SipTrunk(UncheckedBaseModel): provider_config: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None outbound_trunk: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None inbound_trunk: typing.Optional[GetPhoneNumberInboundSipTrunkConfigResponseModel] = None + livekit_stack: LivekitStackType if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/conversational_ai/settings/client.py b/src/elevenlabs/conversational_ai/settings/client.py index f0d65ae6..6fe9893f 100644 --- a/src/elevenlabs/conversational_ai/settings/client.py +++ b/src/elevenlabs/conversational_ai/settings/client.py @@ -7,6 +7,7 @@ from ...types.conv_ai_webhooks import ConvAiWebhooks from ...types.conversation_initiation_client_data_webhook import ConversationInitiationClientDataWebhook from ...types.get_conv_ai_settings_response_model import GetConvAiSettingsResponseModel +from ...types.livekit_stack_type import LivekitStackType from .raw_client import AsyncRawSettingsClient, RawSettingsClient # this is used as the default value for optional parameters @@ -61,6 +62,7 @@ def update( webhooks: typing.Optional[ConvAiWebhooks] = OMIT, can_use_mcp_servers: typing.Optional[bool] = OMIT, rag_retention_period_days: typing.Optional[int] = OMIT, + default_livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetConvAiSettingsResponseModel: """ @@ -77,6 +79,8 @@ def update( rag_retention_period_days : typing.Optional[int] + default_livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -99,6 +103,7 @@ def update( webhooks=webhooks, can_use_mcp_servers=can_use_mcp_servers, rag_retention_period_days=rag_retention_period_days, + default_livekit_stack=default_livekit_stack, request_options=request_options, ) return _response.data @@ -160,6 +165,7 @@ async def update( webhooks: typing.Optional[ConvAiWebhooks] = OMIT, can_use_mcp_servers: typing.Optional[bool] = OMIT, rag_retention_period_days: typing.Optional[int] = OMIT, + default_livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetConvAiSettingsResponseModel: """ @@ -176,6 +182,8 @@ async def update( rag_retention_period_days : typing.Optional[int] + default_livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -206,6 +214,7 @@ async def main() -> None: webhooks=webhooks, can_use_mcp_servers=can_use_mcp_servers, rag_retention_period_days=rag_retention_period_days, + default_livekit_stack=default_livekit_stack, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/settings/raw_client.py b/src/elevenlabs/conversational_ai/settings/raw_client.py index 343f6573..c88c7f64 100644 --- a/src/elevenlabs/conversational_ai/settings/raw_client.py +++ b/src/elevenlabs/conversational_ai/settings/raw_client.py @@ -14,6 +14,7 @@ from ...types.conversation_initiation_client_data_webhook import ConversationInitiationClientDataWebhook from ...types.get_conv_ai_settings_response_model import GetConvAiSettingsResponseModel from ...types.http_validation_error import HttpValidationError +from ...types.livekit_stack_type import LivekitStackType # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -77,6 +78,7 @@ def update( webhooks: typing.Optional[ConvAiWebhooks] = OMIT, can_use_mcp_servers: typing.Optional[bool] = OMIT, rag_retention_period_days: typing.Optional[int] = OMIT, + default_livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetConvAiSettingsResponseModel]: """ @@ -93,6 +95,8 @@ def update( rag_retention_period_days : typing.Optional[int] + default_livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -115,6 +119,7 @@ def update( ), "can_use_mcp_servers": can_use_mcp_servers, "rag_retention_period_days": rag_retention_period_days, + "default_livekit_stack": default_livekit_stack, }, headers={ "content-type": "application/json", @@ -207,6 +212,7 @@ async def update( webhooks: typing.Optional[ConvAiWebhooks] = OMIT, can_use_mcp_servers: typing.Optional[bool] = OMIT, rag_retention_period_days: typing.Optional[int] = OMIT, + default_livekit_stack: typing.Optional[LivekitStackType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetConvAiSettingsResponseModel]: """ @@ -223,6 +229,8 @@ async def update( rag_retention_period_days : typing.Optional[int] + default_livekit_stack : typing.Optional[LivekitStackType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -245,6 +253,7 @@ async def update( ), "can_use_mcp_servers": can_use_mcp_servers, "rag_retention_period_days": rag_retention_period_days, + "default_livekit_stack": default_livekit_stack, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/tests/client.py b/src/elevenlabs/conversational_ai/tests/client.py index 265df7a1..f05fec77 100644 --- a/src/elevenlabs/conversational_ai/tests/client.py +++ b/src/elevenlabs/conversational_ai/tests/client.py @@ -13,6 +13,7 @@ from ...types.get_tests_page_response_model import GetTestsPageResponseModel from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from ...types.get_unit_test_response_model import GetUnitTestResponseModel +from ...types.unit_test_common_model_type import UnitTestCommonModelType from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput from .raw_client import AsyncRawTestsClient, RawTestsClient from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue @@ -53,6 +54,7 @@ def create( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateUnitTestResponseModel: """ @@ -79,6 +81,8 @@ def create( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -128,6 +132,7 @@ def create( name=name, tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, + type=type, request_options=request_options, ) return _response.data @@ -176,6 +181,7 @@ def update( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetUnitTestResponseModel: """ @@ -205,6 +211,8 @@ def update( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -256,6 +264,7 @@ def update( name=name, tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, + type=type, request_options=request_options, ) return _response.data @@ -408,6 +417,7 @@ async def create( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateUnitTestResponseModel: """ @@ -434,6 +444,8 @@ async def create( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -491,6 +503,7 @@ async def main() -> None: name=name, tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, + type=type, request_options=request_options, ) return _response.data @@ -549,6 +562,7 @@ async def update( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetUnitTestResponseModel: """ @@ -578,6 +592,8 @@ async def update( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -637,6 +653,7 @@ async def main() -> None: name=name, tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, + type=type, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/tests/raw_client.py b/src/elevenlabs/conversational_ai/tests/raw_client.py index 1194d582..40d9f9d1 100644 --- a/src/elevenlabs/conversational_ai/tests/raw_client.py +++ b/src/elevenlabs/conversational_ai/tests/raw_client.py @@ -19,6 +19,7 @@ from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from ...types.get_unit_test_response_model import GetUnitTestResponseModel from ...types.http_validation_error import HttpValidationError +from ...types.unit_test_common_model_type import UnitTestCommonModelType from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue from .types.update_unit_test_request_dynamic_variables_value import UpdateUnitTestRequestDynamicVariablesValue @@ -43,6 +44,7 @@ def create( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateUnitTestResponseModel]: """ @@ -69,6 +71,8 @@ def create( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -103,6 +107,7 @@ def create( annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], direction="write", ), + "type": type, "name": name, }, headers={ @@ -200,6 +205,7 @@ def update( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetUnitTestResponseModel]: """ @@ -229,6 +235,8 @@ def update( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -263,6 +271,7 @@ def update( annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], direction="write", ), + "type": type, "name": name, }, headers={ @@ -489,6 +498,7 @@ async def create( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateUnitTestResponseModel]: """ @@ -515,6 +525,8 @@ async def create( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -549,6 +561,7 @@ async def create( annotation=typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]], direction="write", ), + "type": type, "name": name, }, headers={ @@ -646,6 +659,7 @@ async def update( dynamic_variables: typing.Optional[ typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, + type: typing.Optional[UnitTestCommonModelType] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetUnitTestResponseModel]: """ @@ -675,6 +689,8 @@ async def update( dynamic_variables : typing.Optional[typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]]] Dynamic variables to replace in the agent config during testing + type : typing.Optional[UnitTestCommonModelType] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -709,6 +725,7 @@ async def update( annotation=typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]], direction="write", ), + "type": type, "name": name, }, headers={ diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index b8020a0d..eaa1c36e 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.15.1", + "User-Agent": "elevenlabs/v2.16.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.15.1", + "X-Fern-SDK-Version": "v2.16.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/dubbing/__init__.py b/src/elevenlabs/dubbing/__init__.py index 7b4f57e0..e9223970 100644 --- a/src/elevenlabs/dubbing/__init__.py +++ b/src/elevenlabs/dubbing/__init__.py @@ -6,12 +6,17 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator + from .types import ( + DubbingListRequestDubbingStatus, + DubbingListRequestFilterByCreator, + DubbingListRequestOrderDirection, + ) from . import audio, resource, transcript from .transcript import TranscriptGetTranscriptForDubRequestFormatType _dynamic_imports: typing.Dict[str, str] = { "DubbingListRequestDubbingStatus": ".types", "DubbingListRequestFilterByCreator": ".types", + "DubbingListRequestOrderDirection": ".types", "TranscriptGetTranscriptForDubRequestFormatType": ".transcript", "audio": ".", "resource": ".", @@ -41,6 +46,7 @@ def __dir__(): __all__ = [ "DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", + "DubbingListRequestOrderDirection", "TranscriptGetTranscriptForDubRequestFormatType", "audio", "resource", diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 60ac17f5..79a3baad 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -14,6 +14,7 @@ from .raw_client import AsyncRawDubbingClient, RawDubbingClient from .types.dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .types.dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator +from .types.dubbing_list_request_order_direction import DubbingListRequestOrderDirection if typing.TYPE_CHECKING: from .audio.client import AsyncAudioClient, AudioClient @@ -49,6 +50,8 @@ def list( page_size: typing.Optional[int] = None, dubbing_status: typing.Optional[DubbingListRequestDubbingStatus] = None, filter_by_creator: typing.Optional[DubbingListRequestFilterByCreator] = None, + order_by: typing.Optional[typing.Literal["created_at"]] = None, + order_direction: typing.Optional[DubbingListRequestOrderDirection] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingMetadataPageResponseModel: """ @@ -68,6 +71,12 @@ def list( filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. + order_by : typing.Optional[typing.Literal["created_at"]] + The field to use for ordering results from this query. + + order_direction : typing.Optional[DubbingListRequestOrderDirection] + The order direction to use for results from this query. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -90,6 +99,8 @@ def list( page_size=page_size, dubbing_status=dubbing_status, filter_by_creator=filter_by_creator, + order_by=order_by, + order_direction=order_direction, request_options=request_options, ) return _response.data @@ -176,7 +187,7 @@ def create( Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. disable_voice_cloning : typing.Optional[bool] - [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. + Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. mode : typing.Optional[str] automatic or manual. Manual mode is only supported when creating a dubbing studio project @@ -343,6 +354,8 @@ async def list( page_size: typing.Optional[int] = None, dubbing_status: typing.Optional[DubbingListRequestDubbingStatus] = None, filter_by_creator: typing.Optional[DubbingListRequestFilterByCreator] = None, + order_by: typing.Optional[typing.Literal["created_at"]] = None, + order_direction: typing.Optional[DubbingListRequestOrderDirection] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingMetadataPageResponseModel: """ @@ -362,6 +375,12 @@ async def list( filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. + order_by : typing.Optional[typing.Literal["created_at"]] + The field to use for ordering results from this query. + + order_direction : typing.Optional[DubbingListRequestOrderDirection] + The order direction to use for results from this query. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -392,6 +411,8 @@ async def main() -> None: page_size=page_size, dubbing_status=dubbing_status, filter_by_creator=filter_by_creator, + order_by=order_by, + order_direction=order_direction, request_options=request_options, ) return _response.data @@ -478,7 +499,7 @@ async def create( Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. disable_voice_cloning : typing.Optional[bool] - [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. + Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. mode : typing.Optional[str] automatic or manual. Manual mode is only supported when creating a dubbing studio project diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index fcafc693..7c84b3ad 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -18,6 +18,7 @@ from ..types.http_validation_error import HttpValidationError from .types.dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .types.dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator +from .types.dubbing_list_request_order_direction import DubbingListRequestOrderDirection # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -34,6 +35,8 @@ def list( page_size: typing.Optional[int] = None, dubbing_status: typing.Optional[DubbingListRequestDubbingStatus] = None, filter_by_creator: typing.Optional[DubbingListRequestFilterByCreator] = None, + order_by: typing.Optional[typing.Literal["created_at"]] = None, + order_direction: typing.Optional[DubbingListRequestOrderDirection] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DubbingMetadataPageResponseModel]: """ @@ -53,6 +56,12 @@ def list( filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. + order_by : typing.Optional[typing.Literal["created_at"]] + The field to use for ordering results from this query. + + order_direction : typing.Optional[DubbingListRequestOrderDirection] + The order direction to use for results from this query. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -69,6 +78,8 @@ def list( "page_size": page_size, "dubbing_status": dubbing_status, "filter_by_creator": filter_by_creator, + "order_by": order_by, + "order_direction": order_direction, }, request_options=request_options, ) @@ -180,7 +191,7 @@ def create( Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. disable_voice_cloning : typing.Optional[bool] - [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. + Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. mode : typing.Optional[str] automatic or manual. Manual mode is only supported when creating a dubbing studio project @@ -365,6 +376,8 @@ async def list( page_size: typing.Optional[int] = None, dubbing_status: typing.Optional[DubbingListRequestDubbingStatus] = None, filter_by_creator: typing.Optional[DubbingListRequestFilterByCreator] = None, + order_by: typing.Optional[typing.Literal["created_at"]] = None, + order_direction: typing.Optional[DubbingListRequestOrderDirection] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DubbingMetadataPageResponseModel]: """ @@ -384,6 +397,12 @@ async def list( filter_by_creator : typing.Optional[DubbingListRequestFilterByCreator] Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. + order_by : typing.Optional[typing.Literal["created_at"]] + The field to use for ordering results from this query. + + order_direction : typing.Optional[DubbingListRequestOrderDirection] + The order direction to use for results from this query. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -400,6 +419,8 @@ async def list( "page_size": page_size, "dubbing_status": dubbing_status, "filter_by_creator": filter_by_creator, + "order_by": order_by, + "order_direction": order_direction, }, request_options=request_options, ) @@ -511,7 +532,7 @@ async def create( Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. disable_voice_cloning : typing.Optional[bool] - [BETA] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. + Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. mode : typing.Optional[str] automatic or manual. Manual mode is only supported when creating a dubbing studio project diff --git a/src/elevenlabs/dubbing/resource/client.py b/src/elevenlabs/dubbing/resource/client.py index cc9de76b..43cb1695 100644 --- a/src/elevenlabs/dubbing/resource/client.py +++ b/src/elevenlabs/dubbing/resource/client.py @@ -213,7 +213,7 @@ def render( language: str, *, render_type: RenderType, - should_normalize_volume: typing.Optional[bool] = None, + normalize_volume: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingRenderResponseModel: """ @@ -230,7 +230,7 @@ def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] - should_normalize_volume : typing.Optional[bool] + normalize_volume : typing.Optional[bool] Whether to normalize the volume of the rendered audio. request_options : typing.Optional[RequestOptions] @@ -258,7 +258,7 @@ def render( dubbing_id, language, render_type=render_type, - should_normalize_volume=should_normalize_volume, + normalize_volume=normalize_volume, request_options=request_options, ) return _response.data @@ -511,7 +511,7 @@ async def render( language: str, *, render_type: RenderType, - should_normalize_volume: typing.Optional[bool] = None, + normalize_volume: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DubbingRenderResponseModel: """ @@ -528,7 +528,7 @@ async def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] - should_normalize_volume : typing.Optional[bool] + normalize_volume : typing.Optional[bool] Whether to normalize the volume of the rendered audio. request_options : typing.Optional[RequestOptions] @@ -564,7 +564,7 @@ async def main() -> None: dubbing_id, language, render_type=render_type, - should_normalize_volume=should_normalize_volume, + normalize_volume=normalize_volume, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/dubbing/resource/raw_client.py b/src/elevenlabs/dubbing/resource/raw_client.py index 0d6fa981..0de3f9be 100644 --- a/src/elevenlabs/dubbing/resource/raw_client.py +++ b/src/elevenlabs/dubbing/resource/raw_client.py @@ -284,7 +284,7 @@ def render( language: str, *, render_type: RenderType, - should_normalize_volume: typing.Optional[bool] = None, + normalize_volume: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DubbingRenderResponseModel]: """ @@ -301,7 +301,7 @@ def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] - should_normalize_volume : typing.Optional[bool] + normalize_volume : typing.Optional[bool] Whether to normalize the volume of the rendered audio. request_options : typing.Optional[RequestOptions] @@ -315,11 +315,9 @@ def render( _response = self._client_wrapper.httpx_client.request( f"v1/dubbing/resource/{jsonable_encoder(dubbing_id)}/render/{jsonable_encoder(language)}", method="POST", - params={ - "should_normalize_volume": should_normalize_volume, - }, json={ "render_type": render_type, + "normalize_volume": normalize_volume, }, headers={ "content-type": "application/json", @@ -616,7 +614,7 @@ async def render( language: str, *, render_type: RenderType, - should_normalize_volume: typing.Optional[bool] = None, + normalize_volume: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DubbingRenderResponseModel]: """ @@ -633,7 +631,7 @@ async def render( render_type : RenderType The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] - should_normalize_volume : typing.Optional[bool] + normalize_volume : typing.Optional[bool] Whether to normalize the volume of the rendered audio. request_options : typing.Optional[RequestOptions] @@ -647,11 +645,9 @@ async def render( _response = await self._client_wrapper.httpx_client.request( f"v1/dubbing/resource/{jsonable_encoder(dubbing_id)}/render/{jsonable_encoder(language)}", method="POST", - params={ - "should_normalize_volume": should_normalize_volume, - }, json={ "render_type": render_type, + "normalize_volume": normalize_volume, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/dubbing/types/__init__.py b/src/elevenlabs/dubbing/types/__init__.py index 2f5b95a0..2428669b 100644 --- a/src/elevenlabs/dubbing/types/__init__.py +++ b/src/elevenlabs/dubbing/types/__init__.py @@ -8,9 +8,11 @@ if typing.TYPE_CHECKING: from .dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator + from .dubbing_list_request_order_direction import DubbingListRequestOrderDirection _dynamic_imports: typing.Dict[str, str] = { "DubbingListRequestDubbingStatus": ".dubbing_list_request_dubbing_status", "DubbingListRequestFilterByCreator": ".dubbing_list_request_filter_by_creator", + "DubbingListRequestOrderDirection": ".dubbing_list_request_order_direction", } @@ -33,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator"] +__all__ = ["DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", "DubbingListRequestOrderDirection"] diff --git a/src/elevenlabs/dubbing/types/dubbing_list_request_order_direction.py b/src/elevenlabs/dubbing/types/dubbing_list_request_order_direction.py new file mode 100644 index 00000000..06b05b2e --- /dev/null +++ b/src/elevenlabs/dubbing/types/dubbing_list_request_order_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DubbingListRequestOrderDirection = typing.Union[typing.Literal["DESCENDING", "ASCENDING"], typing.Any] diff --git a/src/elevenlabs/history/__init__.py b/src/elevenlabs/history/__init__.py index 1a021521..a74ebe6c 100644 --- a/src/elevenlabs/history/__init__.py +++ b/src/elevenlabs/history/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import HistoryListRequestSource -_dynamic_imports: typing.Dict[str, str] = {"HistoryListRequestSource": ".types"} + from .types import HistoryListRequestSortDirection, HistoryListRequestSource +_dynamic_imports: typing.Dict[str, str] = { + "HistoryListRequestSortDirection": ".types", + "HistoryListRequestSource": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +32,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["HistoryListRequestSource"] +__all__ = ["HistoryListRequestSortDirection", "HistoryListRequestSource"] diff --git a/src/elevenlabs/history/client.py b/src/elevenlabs/history/client.py index ad7764f1..090248cc 100644 --- a/src/elevenlabs/history/client.py +++ b/src/elevenlabs/history/client.py @@ -8,6 +8,7 @@ from ..types.get_speech_history_response import GetSpeechHistoryResponse from ..types.speech_history_item_response import SpeechHistoryItemResponse from .raw_client import AsyncRawHistoryClient, RawHistoryClient +from .types.history_list_request_sort_direction import HistoryListRequestSortDirection from .types.history_list_request_source import HistoryListRequestSource # this is used as the default value for optional parameters @@ -35,6 +36,10 @@ def list( page_size: typing.Optional[int] = None, start_after_history_item_id: typing.Optional[str] = None, voice_id: typing.Optional[str] = None, + model_id: typing.Optional[str] = None, + date_before_unix: typing.Optional[int] = None, + date_after_unix: typing.Optional[int] = None, + sort_direction: typing.Optional[HistoryListRequestSortDirection] = None, search: typing.Optional[str] = None, source: typing.Optional[HistoryListRequestSource] = None, request_options: typing.Optional[RequestOptions] = None, @@ -53,9 +58,21 @@ def list( voice_id : typing.Optional[str] ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - search : typing.Optional[str] + model_id : typing.Optional[str] Search term used for filtering history items. If provided, source becomes required. + date_before_unix : typing.Optional[int] + Unix timestamp to filter history items before this date (exclusive). + + date_after_unix : typing.Optional[int] + Unix timestamp to filter history items after this date (inclusive). + + sort_direction : typing.Optional[HistoryListRequestSortDirection] + Sort direction for the results. + + search : typing.Optional[str] + search term used for filtering + source : typing.Optional[HistoryListRequestSource] Source of the generated history item @@ -80,6 +97,10 @@ def list( page_size=page_size, start_after_history_item_id=start_after_history_item_id, voice_id=voice_id, + model_id=model_id, + date_before_unix=date_before_unix, + date_after_unix=date_after_unix, + sort_direction=sort_direction, search=search, source=source, request_options=request_options, @@ -227,6 +248,10 @@ async def list( page_size: typing.Optional[int] = None, start_after_history_item_id: typing.Optional[str] = None, voice_id: typing.Optional[str] = None, + model_id: typing.Optional[str] = None, + date_before_unix: typing.Optional[int] = None, + date_after_unix: typing.Optional[int] = None, + sort_direction: typing.Optional[HistoryListRequestSortDirection] = None, search: typing.Optional[str] = None, source: typing.Optional[HistoryListRequestSource] = None, request_options: typing.Optional[RequestOptions] = None, @@ -245,9 +270,21 @@ async def list( voice_id : typing.Optional[str] ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - search : typing.Optional[str] + model_id : typing.Optional[str] Search term used for filtering history items. If provided, source becomes required. + date_before_unix : typing.Optional[int] + Unix timestamp to filter history items before this date (exclusive). + + date_after_unix : typing.Optional[int] + Unix timestamp to filter history items after this date (inclusive). + + sort_direction : typing.Optional[HistoryListRequestSortDirection] + Sort direction for the results. + + search : typing.Optional[str] + search term used for filtering + source : typing.Optional[HistoryListRequestSource] Source of the generated history item @@ -280,6 +317,10 @@ async def main() -> None: page_size=page_size, start_after_history_item_id=start_after_history_item_id, voice_id=voice_id, + model_id=model_id, + date_before_unix=date_before_unix, + date_after_unix=date_after_unix, + sort_direction=sort_direction, search=search, source=source, request_options=request_options, diff --git a/src/elevenlabs/history/raw_client.py b/src/elevenlabs/history/raw_client.py index df92eddb..1f786d6c 100644 --- a/src/elevenlabs/history/raw_client.py +++ b/src/elevenlabs/history/raw_client.py @@ -17,6 +17,7 @@ from ..types.get_speech_history_response import GetSpeechHistoryResponse from ..types.http_validation_error import HttpValidationError from ..types.speech_history_item_response import SpeechHistoryItemResponse +from .types.history_list_request_sort_direction import HistoryListRequestSortDirection from .types.history_list_request_source import HistoryListRequestSource # this is used as the default value for optional parameters @@ -33,6 +34,10 @@ def list( page_size: typing.Optional[int] = None, start_after_history_item_id: typing.Optional[str] = None, voice_id: typing.Optional[str] = None, + model_id: typing.Optional[str] = None, + date_before_unix: typing.Optional[int] = None, + date_after_unix: typing.Optional[int] = None, + sort_direction: typing.Optional[HistoryListRequestSortDirection] = None, search: typing.Optional[str] = None, source: typing.Optional[HistoryListRequestSource] = None, request_options: typing.Optional[RequestOptions] = None, @@ -51,9 +56,21 @@ def list( voice_id : typing.Optional[str] ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - search : typing.Optional[str] + model_id : typing.Optional[str] Search term used for filtering history items. If provided, source becomes required. + date_before_unix : typing.Optional[int] + Unix timestamp to filter history items before this date (exclusive). + + date_after_unix : typing.Optional[int] + Unix timestamp to filter history items after this date (inclusive). + + sort_direction : typing.Optional[HistoryListRequestSortDirection] + Sort direction for the results. + + search : typing.Optional[str] + search term used for filtering + source : typing.Optional[HistoryListRequestSource] Source of the generated history item @@ -72,6 +89,10 @@ def list( "page_size": page_size, "start_after_history_item_id": start_after_history_item_id, "voice_id": voice_id, + "model_id": model_id, + "date_before_unix": date_before_unix, + "date_after_unix": date_after_unix, + "sort_direction": sort_direction, "search": search, "source": source, }, @@ -348,6 +369,10 @@ async def list( page_size: typing.Optional[int] = None, start_after_history_item_id: typing.Optional[str] = None, voice_id: typing.Optional[str] = None, + model_id: typing.Optional[str] = None, + date_before_unix: typing.Optional[int] = None, + date_after_unix: typing.Optional[int] = None, + sort_direction: typing.Optional[HistoryListRequestSortDirection] = None, search: typing.Optional[str] = None, source: typing.Optional[HistoryListRequestSource] = None, request_options: typing.Optional[RequestOptions] = None, @@ -366,9 +391,21 @@ async def list( voice_id : typing.Optional[str] ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. - search : typing.Optional[str] + model_id : typing.Optional[str] Search term used for filtering history items. If provided, source becomes required. + date_before_unix : typing.Optional[int] + Unix timestamp to filter history items before this date (exclusive). + + date_after_unix : typing.Optional[int] + Unix timestamp to filter history items after this date (inclusive). + + sort_direction : typing.Optional[HistoryListRequestSortDirection] + Sort direction for the results. + + search : typing.Optional[str] + search term used for filtering + source : typing.Optional[HistoryListRequestSource] Source of the generated history item @@ -387,6 +424,10 @@ async def list( "page_size": page_size, "start_after_history_item_id": start_after_history_item_id, "voice_id": voice_id, + "model_id": model_id, + "date_before_unix": date_before_unix, + "date_after_unix": date_after_unix, + "sort_direction": sort_direction, "search": search, "source": source, }, diff --git a/src/elevenlabs/history/types/__init__.py b/src/elevenlabs/history/types/__init__.py index 8a14931e..ca843d97 100644 --- a/src/elevenlabs/history/types/__init__.py +++ b/src/elevenlabs/history/types/__init__.py @@ -6,8 +6,12 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .history_list_request_sort_direction import HistoryListRequestSortDirection from .history_list_request_source import HistoryListRequestSource -_dynamic_imports: typing.Dict[str, str] = {"HistoryListRequestSource": ".history_list_request_source"} +_dynamic_imports: typing.Dict[str, str] = { + "HistoryListRequestSortDirection": ".history_list_request_sort_direction", + "HistoryListRequestSource": ".history_list_request_source", +} def __getattr__(attr_name: str) -> typing.Any: @@ -29,4 +33,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["HistoryListRequestSource"] +__all__ = ["HistoryListRequestSortDirection", "HistoryListRequestSource"] diff --git a/src/elevenlabs/history/types/history_list_request_sort_direction.py b/src/elevenlabs/history/types/history_list_request_sort_direction.py new file mode 100644 index 00000000..7569de5f --- /dev/null +++ b/src/elevenlabs/history/types/history_list_request_sort_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HistoryListRequestSortDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 25b0c791..5bacf733 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -39,11 +39,13 @@ def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -54,6 +56,9 @@ def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -69,6 +74,9 @@ def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -79,11 +87,13 @@ def compose( """ with self._raw_client.compose( output_format=output_format, + respect_sections_durations=respect_sections_durations, prompt=prompt, music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: yield from r.data @@ -97,6 +107,7 @@ def compose_detailed( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -122,6 +133,9 @@ def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -137,6 +151,7 @@ def compose_detailed( composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: yield from r.data @@ -150,6 +165,7 @@ def stream( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -175,6 +191,9 @@ def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -190,6 +209,7 @@ def stream( composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: yield from r.data @@ -224,11 +244,13 @@ async def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -239,6 +261,9 @@ async def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -254,6 +279,9 @@ async def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -264,11 +292,13 @@ async def compose( """ async with self._raw_client.compose( output_format=output_format, + respect_sections_durations=respect_sections_durations, prompt=prompt, music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: async for _chunk in r.data: @@ -283,6 +313,7 @@ async def compose_detailed( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -308,6 +339,9 @@ async def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -323,6 +357,7 @@ async def compose_detailed( composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: async for _chunk in r.data: @@ -337,6 +372,7 @@ async def stream( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -362,6 +398,9 @@ async def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -377,6 +416,7 @@ async def stream( composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, + seed=seed, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index 19a60699..178cb404 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -30,11 +30,13 @@ def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -45,6 +47,9 @@ def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -60,6 +65,9 @@ def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -75,6 +83,7 @@ def compose( "output_format": output_format, }, json={ + "respect_sections_durations": respect_sections_durations, "prompt": prompt, "music_prompt": convert_and_respect_annotation_metadata( object_=music_prompt, annotation=MusicPrompt, direction="write" @@ -84,6 +93,7 @@ def compose( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", @@ -130,6 +140,7 @@ def compose_detailed( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -155,6 +166,9 @@ def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -179,6 +193,7 @@ def compose_detailed( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", @@ -225,6 +240,7 @@ def stream( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -250,6 +266,9 @@ def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -274,6 +293,7 @@ def stream( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", @@ -320,11 +340,13 @@ async def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, + respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -335,6 +357,9 @@ async def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -350,6 +375,9 @@ async def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -365,6 +393,7 @@ async def compose( "output_format": output_format, }, json={ + "respect_sections_durations": respect_sections_durations, "prompt": prompt, "music_prompt": convert_and_respect_annotation_metadata( object_=music_prompt, annotation=MusicPrompt, direction="write" @@ -374,6 +403,7 @@ async def compose( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", @@ -421,6 +451,7 @@ async def compose_detailed( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -446,6 +477,9 @@ async def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -470,6 +504,7 @@ async def compose_detailed( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", @@ -517,6 +552,7 @@ async def stream( composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, + seed: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -542,6 +578,9 @@ async def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. + seed : typing.Optional[int] + The seed to use for the generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -566,6 +605,7 @@ async def stream( ), "music_length_ms": music_length_ms, "model_id": model_id, + "seed": seed, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/pronunciation_dictionaries/types/body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access.py b/src/elevenlabs/pronunciation_dictionaries/types/body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access.py index 5467cdee..27c34f7b 100644 --- a/src/elevenlabs/pronunciation_dictionaries/types/body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access.py +++ b/src/elevenlabs/pronunciation_dictionaries/types/body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_access.py @@ -3,5 +3,5 @@ import typing BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/pronunciation_dictionaries/types/pronunciation_dictionaries_create_from_file_request_workspace_access.py b/src/elevenlabs/pronunciation_dictionaries/types/pronunciation_dictionaries_create_from_file_request_workspace_access.py index adf01cac..c34965cc 100644 --- a/src/elevenlabs/pronunciation_dictionaries/types/pronunciation_dictionaries_create_from_file_request_workspace_access.py +++ b/src/elevenlabs/pronunciation_dictionaries/types/pronunciation_dictionaries_create_from_file_request_workspace_access.py @@ -3,5 +3,5 @@ import typing PronunciationDictionariesCreateFromFileRequestWorkspaceAccess = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/speech_to_text/transcripts/client.py b/src/elevenlabs/speech_to_text/transcripts/client.py index 4c3dc629..8eb9d6cf 100644 --- a/src/elevenlabs/speech_to_text/transcripts/client.py +++ b/src/elevenlabs/speech_to_text/transcripts/client.py @@ -56,6 +56,39 @@ def get( _response = self._raw_client.get(transcription_id, request_options=request_options) return _response.data + def delete( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Delete a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Delete completed successfully. + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.speech_to_text.transcripts.delete( + transcription_id="transcription_id", + ) + """ + _response = self._raw_client.delete(transcription_id, request_options=request_options) + return _response.data + class AsyncTranscriptsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -112,3 +145,44 @@ async def main() -> None: """ _response = await self._raw_client.get(transcription_id, request_options=request_options) return _response.data + + async def delete( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Delete a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Delete completed successfully. + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.speech_to_text.transcripts.delete( + transcription_id="transcription_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(transcription_id, request_options=request_options) + return _response.data diff --git a/src/elevenlabs/speech_to_text/transcripts/raw_client.py b/src/elevenlabs/speech_to_text/transcripts/raw_client.py index 472387b8..a0e207c3 100644 --- a/src/elevenlabs/speech_to_text/transcripts/raw_client.py +++ b/src/elevenlabs/speech_to_text/transcripts/raw_client.py @@ -92,6 +92,69 @@ def get( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def delete( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Delete a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Delete completed successfully. + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/speech-to-text/transcripts/{jsonable_encoder(transcription_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawTranscriptsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -168,3 +231,66 @@ async def get( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, transcription_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Delete a previously generated transcript by its ID. + + Parameters + ---------- + transcription_id : str + The unique ID of the transcript to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Delete completed successfully. + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/speech-to-text/transcripts/{jsonable_encoder(transcription_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/text_to_speech/__init__.py b/src/elevenlabs/text_to_speech/__init__.py index ab1426d4..f1d79ae4 100644 --- a/src/elevenlabs/text_to_speech/__init__.py +++ b/src/elevenlabs/text_to_speech/__init__.py @@ -7,20 +7,20 @@ if typing.TYPE_CHECKING: from .types import ( + BodyTextToSpeechFullWithTimestampsApplyTextNormalization, + BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, TextToSpeechConvertRequestOutputFormat, TextToSpeechConvertWithTimestampsRequestOutputFormat, TextToSpeechStreamRequestOutputFormat, TextToSpeechStreamWithTimestampsRequestOutputFormat, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".types", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".types", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".types", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".types", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".types", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".types", "TextToSpeechConvertRequestOutputFormat": ".types", "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".types", "TextToSpeechStreamRequestOutputFormat": ".types", @@ -48,10 +48,10 @@ def __dir__(): __all__ = [ + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization", "TextToSpeechConvertRequestOutputFormat", "TextToSpeechConvertWithTimestampsRequestOutputFormat", "TextToSpeechStreamRequestOutputFormat", diff --git a/src/elevenlabs/text_to_speech/client.py b/src/elevenlabs/text_to_speech/client.py index 6d300574..7d0970d3 100644 --- a/src/elevenlabs/text_to_speech/client.py +++ b/src/elevenlabs/text_to_speech/client.py @@ -9,18 +9,18 @@ from ..types.streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from ..types.voice_settings import VoiceSettings from .raw_client import AsyncRawTextToSpeechClient, RawTextToSpeechClient +from .types.body_text_to_speech_full_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechFullWithTimestampsApplyTextNormalization, +) +from .types.body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, +) from .types.body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, ) -from .types.body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, -) from .types.body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, ) -from .types.body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, -) from .types.text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .types.text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -202,9 +202,7 @@ def convert_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: @@ -265,7 +263,7 @@ def convert_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -466,9 +464,7 @@ def stream_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[StreamingAudioChunkWithTimestampsResponse]: @@ -529,7 +525,7 @@ def stream_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -759,9 +755,7 @@ async def convert_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: @@ -822,7 +816,7 @@ async def convert_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -1040,9 +1034,7 @@ async def stream_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]: @@ -1103,7 +1095,7 @@ async def stream_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] diff --git a/src/elevenlabs/text_to_speech/raw_client.py b/src/elevenlabs/text_to_speech/raw_client.py index 9a5c361c..cb45dcdc 100644 --- a/src/elevenlabs/text_to_speech/raw_client.py +++ b/src/elevenlabs/text_to_speech/raw_client.py @@ -18,18 +18,18 @@ from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator from ..types.streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from ..types.voice_settings import VoiceSettings +from .types.body_text_to_speech_full_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechFullWithTimestampsApplyTextNormalization, +) +from .types.body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, +) from .types.body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, ) -from .types.body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, -) from .types.body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, ) -from .types.body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, -) from .types.text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .types.text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -229,9 +229,7 @@ def convert_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AudioWithTimestampsResponse]: @@ -292,7 +290,7 @@ def convert_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -550,9 +548,7 @@ def stream_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[StreamingAudioChunkWithTimestampsResponse]]]: @@ -613,7 +609,7 @@ def stream_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -893,9 +889,7 @@ async def convert_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AudioWithTimestampsResponse]: @@ -956,7 +950,7 @@ async def convert_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] @@ -1215,9 +1209,7 @@ async def stream_with_timestamps( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]]]: @@ -1278,7 +1270,7 @@ async def stream_with_timestamps( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] diff --git a/src/elevenlabs/text_to_speech/types/__init__.py b/src/elevenlabs/text_to_speech/types/__init__.py index 34f0fdb3..ab009034 100644 --- a/src/elevenlabs/text_to_speech/types/__init__.py +++ b/src/elevenlabs/text_to_speech/types/__init__.py @@ -6,18 +6,18 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .body_text_to_speech_full_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechFullWithTimestampsApplyTextNormalization, + ) + from .body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( + BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, + ) from .body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, ) - from .body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization, - ) from .body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, ) - from .body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization import ( - BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization, - ) from .text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -27,10 +27,10 @@ TextToSpeechStreamWithTimestampsRequestOutputFormat, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".body_text_to_speech_full_with_timestamps_apply_text_normalization", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".body_text_to_speech_stream_with_timestamps_apply_text_normalization", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization": ".body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization": ".body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization", "TextToSpeechConvertRequestOutputFormat": ".text_to_speech_convert_request_output_format", "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".text_to_speech_convert_with_timestamps_request_output_format", "TextToSpeechStreamRequestOutputFormat": ".text_to_speech_stream_request_output_format", @@ -58,10 +58,10 @@ def __dir__(): __all__ = [ + "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization", "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", - "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization", "TextToSpeechConvertRequestOutputFormat", "TextToSpeechConvertWithTimestampsRequestOutputFormat", "TextToSpeechStreamRequestOutputFormat", diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_with_timestamps_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_with_timestamps_apply_text_normalization.py new file mode 100644 index 00000000..5348a87b --- /dev/null +++ b/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_with_timestamps_apply_text_normalization.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToSpeechFullWithTimestampsApplyTextNormalization = typing.Union[typing.Literal["auto", "on", "off"], typing.Any] diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_with_timestamps_apply_text_normalization.py similarity index 55% rename from src/elevenlabs/text_to_speech/types/body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization.py rename to src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_with_timestamps_apply_text_normalization.py index b2e12a10..26bef3df 100644 --- a/src/elevenlabs/text_to_speech/types/body_text_to_speech_with_timestamps_v_1_text_to_speech_voice_id_with_timestamps_post_apply_text_normalization.py +++ b/src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_with_timestamps_apply_text_normalization.py @@ -2,6 +2,6 @@ import typing -BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization = typing.Union[ +BodyTextToSpeechStreamWithTimestampsApplyTextNormalization = typing.Union[ typing.Literal["auto", "on", "off"], typing.Any ] diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization.py deleted file mode 100644 index 7cbbc3b7..00000000 --- a/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_with_timestamps_v_1_text_to_speech_voice_id_stream_with_timestamps_post_apply_text_normalization.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostApplyTextNormalization = ( - typing.Union[typing.Literal["auto", "on", "off"], typing.Any] -) diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index e07f4adb..9da1301e 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -29,10 +29,12 @@ from .agent_config_override import AgentConfigOverride from .agent_config_override_config import AgentConfigOverrideConfig from .agent_failure_response_example import AgentFailureResponseExample + from .agent_metadata import AgentMetadata from .agent_metadata_response_model import AgentMetadataResponseModel from .agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel from .agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel + from .agent_sort_by import AgentSortBy from .agent_successful_response_example import AgentSuccessfulResponseExample from .agent_summary_response_model import AgentSummaryResponseModel from .agent_testing_settings import AgentTestingSettings @@ -496,6 +498,7 @@ from .knowledge_base_document_metadata_response_model import KnowledgeBaseDocumentMetadataResponseModel from .knowledge_base_document_type import KnowledgeBaseDocumentType from .knowledge_base_locator import KnowledgeBaseLocator + from .knowledge_base_sort_by import KnowledgeBaseSortBy from .language_added_response import LanguageAddedResponse from .language_detection_tool_config import LanguageDetectionToolConfig from .language_detection_tool_result_model import LanguageDetectionToolResultModel @@ -509,10 +512,12 @@ from .literal_json_schema_property import LiteralJsonSchemaProperty from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType + from .livekit_stack_type import LivekitStackType from .llm import Llm from .llm_category_usage import LlmCategoryUsage from .llm_input_output_tokens_usage import LlmInputOutputTokensUsage from .llm_parameter_evaluation_strategy import LlmParameterEvaluationStrategy + from .llm_reasoning_effort import LlmReasoningEffort from .llm_tokens_category_usage import LlmTokensCategoryUsage from .llm_usage_calculator_llm_response_model import LlmUsageCalculatorLlmResponseModel from .llm_usage_calculator_response_model import LlmUsageCalculatorResponseModel @@ -520,6 +525,7 @@ from .llm_usage_output import LlmUsageOutput from .manual_verification_file_response import ManualVerificationFileResponse from .manual_verification_response import ManualVerificationResponse + from .match_anything_parameter_evaluation_strategy import MatchAnythingParameterEvaluationStrategy from .mcp_approval_policy import McpApprovalPolicy from .mcp_server_config_input import McpServerConfigInput from .mcp_server_config_input_request_headers_value import McpServerConfigInputRequestHeadersValue @@ -544,7 +550,6 @@ from .metric_type import MetricType from .model import Model from .model_rates_response_model import ModelRatesResponseModel - from .model_response_model_concurrency_group import ModelResponseModelConcurrencyGroup from .model_settings_response_model import ModelSettingsResponseModel from .moderation_status_response_model import ModerationStatusResponseModel from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus @@ -709,6 +714,7 @@ from .skip_turn_tool_response_model import SkipTurnToolResponseModel from .song_metadata import SongMetadata from .song_section import SongSection + from .sort_direction import SortDirection from .speaker_audio_response_model import SpeakerAudioResponseModel from .speaker_response_model import SpeakerResponseModel from .speaker_segment import SpeakerSegment @@ -770,6 +776,8 @@ from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum from .text_to_speech_stream_request import TextToSpeechStreamRequest + from .text_to_speech_stream_with_timestamps_request import TextToSpeechStreamWithTimestampsRequest + from .text_to_speech_with_timestamps_request import TextToSpeechWithTimestampsRequest from .token_response_model import TokenResponseModel from .tool import Tool from .tool_annotations import ToolAnnotations @@ -816,6 +824,7 @@ from .turn_mode import TurnMode from .twilio_outbound_call_response import TwilioOutboundCallResponse from .txt_export_options import TxtExportOptions + from .unit_test_common_model_type import UnitTestCommonModelType from .unit_test_run_response_model import UnitTestRunResponseModel from .unit_test_summary_response_model import UnitTestSummaryResponseModel from .unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput @@ -823,6 +832,7 @@ from .unit_test_tool_call_parameter import UnitTestToolCallParameter from .unit_test_tool_call_parameter_eval import ( UnitTestToolCallParameterEval, + UnitTestToolCallParameterEval_Anything, UnitTestToolCallParameterEval_Exact, UnitTestToolCallParameterEval_Llm, UnitTestToolCallParameterEval_Regex, @@ -839,6 +849,8 @@ from .user_feedback import UserFeedback from .user_feedback_score import UserFeedbackScore from .utterance_response_model import UtteranceResponseModel + from .vad_config import VadConfig + from .vad_config_workflow_override import VadConfigWorkflowOverride from .validation_error import ValidationError from .validation_error_loc_item import ValidationErrorLocItem from .verification_attempt_response import VerificationAttemptResponse @@ -992,10 +1004,12 @@ "AgentConfigOverride": ".agent_config_override", "AgentConfigOverrideConfig": ".agent_config_override_config", "AgentFailureResponseExample": ".agent_failure_response_example", + "AgentMetadata": ".agent_metadata", "AgentMetadataResponseModel": ".agent_metadata_response_model", "AgentPlatformSettingsRequestModel": ".agent_platform_settings_request_model", "AgentPlatformSettingsResponseModel": ".agent_platform_settings_response_model", "AgentSimulatedChatTestResponseModel": ".agent_simulated_chat_test_response_model", + "AgentSortBy": ".agent_sort_by", "AgentSuccessfulResponseExample": ".agent_successful_response_example", "AgentSummaryResponseModel": ".agent_summary_response_model", "AgentTestingSettings": ".agent_testing_settings", @@ -1369,6 +1383,7 @@ "KnowledgeBaseDocumentMetadataResponseModel": ".knowledge_base_document_metadata_response_model", "KnowledgeBaseDocumentType": ".knowledge_base_document_type", "KnowledgeBaseLocator": ".knowledge_base_locator", + "KnowledgeBaseSortBy": ".knowledge_base_sort_by", "LanguageAddedResponse": ".language_added_response", "LanguageDetectionToolConfig": ".language_detection_tool_config", "LanguageDetectionToolResultModel": ".language_detection_tool_result_model", @@ -1382,10 +1397,12 @@ "LiteralJsonSchemaProperty": ".literal_json_schema_property", "LiteralJsonSchemaPropertyConstantValue": ".literal_json_schema_property_constant_value", "LiteralJsonSchemaPropertyType": ".literal_json_schema_property_type", + "LivekitStackType": ".livekit_stack_type", "Llm": ".llm", "LlmCategoryUsage": ".llm_category_usage", "LlmInputOutputTokensUsage": ".llm_input_output_tokens_usage", "LlmParameterEvaluationStrategy": ".llm_parameter_evaluation_strategy", + "LlmReasoningEffort": ".llm_reasoning_effort", "LlmTokensCategoryUsage": ".llm_tokens_category_usage", "LlmUsageCalculatorLlmResponseModel": ".llm_usage_calculator_llm_response_model", "LlmUsageCalculatorResponseModel": ".llm_usage_calculator_response_model", @@ -1393,6 +1410,7 @@ "LlmUsageOutput": ".llm_usage_output", "ManualVerificationFileResponse": ".manual_verification_file_response", "ManualVerificationResponse": ".manual_verification_response", + "MatchAnythingParameterEvaluationStrategy": ".match_anything_parameter_evaluation_strategy", "McpApprovalPolicy": ".mcp_approval_policy", "McpServerConfigInput": ".mcp_server_config_input", "McpServerConfigInputRequestHeadersValue": ".mcp_server_config_input_request_headers_value", @@ -1415,7 +1433,6 @@ "MetricType": ".metric_type", "Model": ".model", "ModelRatesResponseModel": ".model_rates_response_model", - "ModelResponseModelConcurrencyGroup": ".model_response_model_concurrency_group", "ModelSettingsResponseModel": ".model_settings_response_model", "ModerationStatusResponseModel": ".moderation_status_response_model", "ModerationStatusResponseModelSafetyStatus": ".moderation_status_response_model_safety_status", @@ -1566,6 +1583,7 @@ "SkipTurnToolResponseModel": ".skip_turn_tool_response_model", "SongMetadata": ".song_metadata", "SongSection": ".song_section", + "SortDirection": ".sort_direction", "SpeakerAudioResponseModel": ".speaker_audio_response_model", "SpeakerResponseModel": ".speaker_response_model", "SpeakerSegment": ".speaker_segment", @@ -1623,6 +1641,8 @@ "TextToSpeechApplyTextNormalizationEnum": ".text_to_speech_apply_text_normalization_enum", "TextToSpeechOutputFormatEnum": ".text_to_speech_output_format_enum", "TextToSpeechStreamRequest": ".text_to_speech_stream_request", + "TextToSpeechStreamWithTimestampsRequest": ".text_to_speech_stream_with_timestamps_request", + "TextToSpeechWithTimestampsRequest": ".text_to_speech_with_timestamps_request", "TokenResponseModel": ".token_response_model", "Tool": ".tool", "ToolAnnotations": ".tool_annotations", @@ -1665,12 +1685,14 @@ "TurnMode": ".turn_mode", "TwilioOutboundCallResponse": ".twilio_outbound_call_response", "TxtExportOptions": ".txt_export_options", + "UnitTestCommonModelType": ".unit_test_common_model_type", "UnitTestRunResponseModel": ".unit_test_run_response_model", "UnitTestSummaryResponseModel": ".unit_test_summary_response_model", "UnitTestToolCallEvaluationModelInput": ".unit_test_tool_call_evaluation_model_input", "UnitTestToolCallEvaluationModelOutput": ".unit_test_tool_call_evaluation_model_output", "UnitTestToolCallParameter": ".unit_test_tool_call_parameter", "UnitTestToolCallParameterEval": ".unit_test_tool_call_parameter_eval", + "UnitTestToolCallParameterEval_Anything": ".unit_test_tool_call_parameter_eval", "UnitTestToolCallParameterEval_Exact": ".unit_test_tool_call_parameter_eval", "UnitTestToolCallParameterEval_Llm": ".unit_test_tool_call_parameter_eval", "UnitTestToolCallParameterEval_Regex": ".unit_test_tool_call_parameter_eval", @@ -1686,6 +1708,8 @@ "UserFeedback": ".user_feedback", "UserFeedbackScore": ".user_feedback_score", "UtteranceResponseModel": ".utterance_response_model", + "VadConfig": ".vad_config", + "VadConfigWorkflowOverride": ".vad_config_workflow_override", "ValidationError": ".validation_error", "ValidationErrorLocItem": ".validation_error_loc_item", "VerificationAttemptResponse": ".verification_attempt_response", @@ -1837,10 +1861,12 @@ def __dir__(): "AgentConfigOverride", "AgentConfigOverrideConfig", "AgentFailureResponseExample", + "AgentMetadata", "AgentMetadataResponseModel", "AgentPlatformSettingsRequestModel", "AgentPlatformSettingsResponseModel", "AgentSimulatedChatTestResponseModel", + "AgentSortBy", "AgentSuccessfulResponseExample", "AgentSummaryResponseModel", "AgentTestingSettings", @@ -2214,6 +2240,7 @@ def __dir__(): "KnowledgeBaseDocumentMetadataResponseModel", "KnowledgeBaseDocumentType", "KnowledgeBaseLocator", + "KnowledgeBaseSortBy", "LanguageAddedResponse", "LanguageDetectionToolConfig", "LanguageDetectionToolResultModel", @@ -2227,10 +2254,12 @@ def __dir__(): "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", + "LivekitStackType", "Llm", "LlmCategoryUsage", "LlmInputOutputTokensUsage", "LlmParameterEvaluationStrategy", + "LlmReasoningEffort", "LlmTokensCategoryUsage", "LlmUsageCalculatorLlmResponseModel", "LlmUsageCalculatorResponseModel", @@ -2238,6 +2267,7 @@ def __dir__(): "LlmUsageOutput", "ManualVerificationFileResponse", "ManualVerificationResponse", + "MatchAnythingParameterEvaluationStrategy", "McpApprovalPolicy", "McpServerConfigInput", "McpServerConfigInputRequestHeadersValue", @@ -2260,7 +2290,6 @@ def __dir__(): "MetricType", "Model", "ModelRatesResponseModel", - "ModelResponseModelConcurrencyGroup", "ModelSettingsResponseModel", "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", @@ -2411,6 +2440,7 @@ def __dir__(): "SkipTurnToolResponseModel", "SongMetadata", "SongSection", + "SortDirection", "SpeakerAudioResponseModel", "SpeakerResponseModel", "SpeakerSegment", @@ -2468,6 +2498,8 @@ def __dir__(): "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechOutputFormatEnum", "TextToSpeechStreamRequest", + "TextToSpeechStreamWithTimestampsRequest", + "TextToSpeechWithTimestampsRequest", "TokenResponseModel", "Tool", "ToolAnnotations", @@ -2510,12 +2542,14 @@ def __dir__(): "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", + "UnitTestCommonModelType", "UnitTestRunResponseModel", "UnitTestSummaryResponseModel", "UnitTestToolCallEvaluationModelInput", "UnitTestToolCallEvaluationModelOutput", "UnitTestToolCallParameter", "UnitTestToolCallParameterEval", + "UnitTestToolCallParameterEval_Anything", "UnitTestToolCallParameterEval_Exact", "UnitTestToolCallParameterEval_Llm", "UnitTestToolCallParameterEval_Regex", @@ -2531,6 +2565,8 @@ def __dir__(): "UserFeedback", "UserFeedbackScore", "UtteranceResponseModel", + "VadConfig", + "VadConfigWorkflowOverride", "ValidationError", "ValidationErrorLocItem", "VerificationAttemptResponse", diff --git a/src/elevenlabs/types/add_pronunciation_dictionary_response_model_permission_on_resource.py b/src/elevenlabs/types/add_pronunciation_dictionary_response_model_permission_on_resource.py index d3f06f0e..d72f0ef1 100644 --- a/src/elevenlabs/types/add_pronunciation_dictionary_response_model_permission_on_resource.py +++ b/src/elevenlabs/types/add_pronunciation_dictionary_response_model_permission_on_resource.py @@ -3,5 +3,5 @@ import typing AddPronunciationDictionaryResponseModelPermissionOnResource = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/types/agent_metadata.py b/src/elevenlabs/types/agent_metadata.py new file mode 100644 index 00000000..57dac2b8 --- /dev/null +++ b/src/elevenlabs/types/agent_metadata.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AgentMetadata(UncheckedBaseModel): + agent_id: str + workflow_node_id: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/agent_sort_by.py b/src/elevenlabs/types/agent_sort_by.py new file mode 100644 index 00000000..8eb851b0 --- /dev/null +++ b/src/elevenlabs/types/agent_sort_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentSortBy = typing.Union[typing.Literal["name", "created_at"], typing.Any] diff --git a/src/elevenlabs/types/attached_test_model.py b/src/elevenlabs/types/attached_test_model.py index 23403ffe..1b10b99d 100644 --- a/src/elevenlabs/types/attached_test_model.py +++ b/src/elevenlabs/types/attached_test_model.py @@ -9,6 +9,7 @@ class AttachedTestModel(UncheckedBaseModel): test_id: str + workflow_node_id: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/breakdown_types.py b/src/elevenlabs/types/breakdown_types.py index 0e6f8ba8..23f0e846 100644 --- a/src/elevenlabs/types/breakdown_types.py +++ b/src/elevenlabs/types/breakdown_types.py @@ -19,6 +19,7 @@ "subresource_id", "reporting_workspace_id", "has_api_key", + "request_source", ], typing.Any, ] diff --git a/src/elevenlabs/types/client_tool_config_input.py b/src/elevenlabs/types/client_tool_config_input.py index 433a2b11..6b3d46a5 100644 --- a/src/elevenlabs/types/client_tool_config_input.py +++ b/src/elevenlabs/types/client_tool_config_input.py @@ -17,7 +17,11 @@ class ClientToolConfigInput(UncheckedBaseModel): """ name: str - description: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive). diff --git a/src/elevenlabs/types/client_tool_config_output.py b/src/elevenlabs/types/client_tool_config_output.py index ee2fa4aa..39d7a0a4 100644 --- a/src/elevenlabs/types/client_tool_config_output.py +++ b/src/elevenlabs/types/client_tool_config_output.py @@ -17,7 +17,11 @@ class ClientToolConfigOutput(UncheckedBaseModel): """ name: str - description: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive). diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py index 3fd4a2af..02f60289 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_metadata import AgentMetadata from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel from .conversation_history_transcript_common_model_input_role import ConversationHistoryTranscriptCommonModelInputRole from .conversation_history_transcript_common_model_input_source_medium import ( @@ -24,6 +25,7 @@ class ConversationHistoryTranscriptCommonModelInput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelInputRole + agent_metadata: typing.Optional[AgentMetadata] = None message: typing.Optional[str] = None multivoice_message: typing.Optional[ConversationHistoryMultivoiceMessageModel] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py index ac4008b1..ad2840a7 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_metadata import AgentMetadata from .conversation_history_multivoice_message_model import ConversationHistoryMultivoiceMessageModel from .conversation_history_transcript_common_model_output_role import ConversationHistoryTranscriptCommonModelOutputRole from .conversation_history_transcript_common_model_output_source_medium import ( @@ -24,6 +25,7 @@ class ConversationHistoryTranscriptCommonModelOutput(UncheckedBaseModel): role: ConversationHistoryTranscriptCommonModelOutputRole + agent_metadata: typing.Optional[AgentMetadata] = None message: typing.Optional[str] = None multivoice_message: typing.Optional[ConversationHistoryMultivoiceMessageModel] = None tool_calls: typing.Optional[typing.List[ConversationHistoryTranscriptToolCallCommonModel]] = None diff --git a/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py index bff49787..57dbacd2 100644 --- a/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py +++ b/src/elevenlabs/types/conversation_history_transcript_other_tools_result_common_model.py @@ -19,7 +19,7 @@ class ConversationHistoryTranscriptOtherToolsResultCommonModel(UncheckedBaseMode tool_has_been_called: bool tool_latency_secs: typing.Optional[float] = None dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None - type: ConversationHistoryTranscriptOtherToolsResultCommonModelType + type: typing.Optional[ConversationHistoryTranscriptOtherToolsResultCommonModelType] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/conversational_config.py b/src/elevenlabs/types/conversational_config.py index e545bd7e..56110fe6 100644 --- a/src/elevenlabs/types/conversational_config.py +++ b/src/elevenlabs/types/conversational_config.py @@ -13,6 +13,7 @@ from .language_preset_output import LanguagePresetOutput from .tts_conversational_config_output import TtsConversationalConfigOutput from .turn_config import TurnConfig +from .vad_config import VadConfig class ConversationalConfig(UncheckedBaseModel): @@ -41,6 +42,11 @@ class ConversationalConfig(UncheckedBaseModel): Language presets for conversations """ + vad: typing.Optional[VadConfig] = pydantic.Field(default=None) + """ + Configuration for voice activity detection + """ + agent: typing.Optional[AgentConfig] = pydantic.Field(default=None) """ Agent specific configuration diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override.py index d85dfc34..a0802045 100644 --- a/src/elevenlabs/types/conversational_config_api_model_workflow_override.py +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override.py @@ -13,6 +13,7 @@ from .language_preset_input import LanguagePresetInput from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride from .turn_config_workflow_override import TurnConfigWorkflowOverride +from .vad_config_workflow_override import VadConfigWorkflowOverride class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): @@ -43,6 +44,11 @@ class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): Language presets for conversations """ + vad: typing.Optional[VadConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for voice activity detection + """ + agent: typing.Optional[AgentConfigApiModelWorkflowOverride] = pydantic.Field(default=None) """ Agent specific configuration diff --git a/src/elevenlabs/types/dependent_available_agent_identifier_access_level.py b/src/elevenlabs/types/dependent_available_agent_identifier_access_level.py index eb3ae9bb..24700ba3 100644 --- a/src/elevenlabs/types/dependent_available_agent_identifier_access_level.py +++ b/src/elevenlabs/types/dependent_available_agent_identifier_access_level.py @@ -2,4 +2,6 @@ import typing -DependentAvailableAgentIdentifierAccessLevel = typing.Union[typing.Literal["admin", "editor", "viewer"], typing.Any] +DependentAvailableAgentIdentifierAccessLevel = typing.Union[ + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any +] diff --git a/src/elevenlabs/types/dependent_available_tool_identifier_access_level.py b/src/elevenlabs/types/dependent_available_tool_identifier_access_level.py index 0b22e39f..7a86c832 100644 --- a/src/elevenlabs/types/dependent_available_tool_identifier_access_level.py +++ b/src/elevenlabs/types/dependent_available_tool_identifier_access_level.py @@ -2,4 +2,6 @@ import typing -DependentAvailableToolIdentifierAccessLevel = typing.Union[typing.Literal["admin", "editor", "viewer"], typing.Any] +DependentAvailableToolIdentifierAccessLevel = typing.Union[ + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any +] diff --git a/src/elevenlabs/types/dubbing_metadata_response.py b/src/elevenlabs/types/dubbing_metadata_response.py index dbae7b95..3676dc56 100644 --- a/src/elevenlabs/types/dubbing_metadata_response.py +++ b/src/elevenlabs/types/dubbing_metadata_response.py @@ -22,7 +22,7 @@ class DubbingMetadataResponse(UncheckedBaseModel): status: str = pydantic.Field() """ - The status of the dubbing project. Either 'dubbed', 'dubbing' or 'failed'. + The status of the dubbing project. Either 'dubbed', 'dubbing', 'failed', or 'cloning'. """ target_languages: typing.List[str] = pydantic.Field() diff --git a/src/elevenlabs/types/get_agent_response_model_phone_numbers_item.py b/src/elevenlabs/types/get_agent_response_model_phone_numbers_item.py index a955974c..f25828bd 100644 --- a/src/elevenlabs/types/get_agent_response_model_phone_numbers_item.py +++ b/src/elevenlabs/types/get_agent_response_model_phone_numbers_item.py @@ -10,6 +10,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .get_phone_number_inbound_sip_trunk_config_response_model import GetPhoneNumberInboundSipTrunkConfigResponseModel from .get_phone_number_outbound_sip_trunk_config_response_model import GetPhoneNumberOutboundSipTrunkConfigResponseModel +from .livekit_stack_type import LivekitStackType from .phone_number_agent_info import PhoneNumberAgentInfo @@ -24,6 +25,7 @@ class GetAgentResponseModelPhoneNumbersItem_SipTrunk(UncheckedBaseModel): provider_config: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None outbound_trunk: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None inbound_trunk: typing.Optional[GetPhoneNumberInboundSipTrunkConfigResponseModel] = None + livekit_stack: LivekitStackType if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/get_conv_ai_settings_response_model.py b/src/elevenlabs/types/get_conv_ai_settings_response_model.py index 48de046f..eb0b1c48 100644 --- a/src/elevenlabs/types/get_conv_ai_settings_response_model.py +++ b/src/elevenlabs/types/get_conv_ai_settings_response_model.py @@ -7,6 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .conv_ai_webhooks import ConvAiWebhooks from .conversation_initiation_client_data_webhook import ConversationInitiationClientDataWebhook +from .livekit_stack_type import LivekitStackType class GetConvAiSettingsResponseModel(UncheckedBaseModel): @@ -18,6 +19,7 @@ class GetConvAiSettingsResponseModel(UncheckedBaseModel): """ rag_retention_period_days: typing.Optional[int] = None + default_livekit_stack: typing.Optional[LivekitStackType] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/get_phone_number_sip_trunk_response_model.py b/src/elevenlabs/types/get_phone_number_sip_trunk_response_model.py index 3c65a605..c5bea014 100644 --- a/src/elevenlabs/types/get_phone_number_sip_trunk_response_model.py +++ b/src/elevenlabs/types/get_phone_number_sip_trunk_response_model.py @@ -7,6 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .get_phone_number_inbound_sip_trunk_config_response_model import GetPhoneNumberInboundSipTrunkConfigResponseModel from .get_phone_number_outbound_sip_trunk_config_response_model import GetPhoneNumberOutboundSipTrunkConfigResponseModel +from .livekit_stack_type import LivekitStackType from .phone_number_agent_info import PhoneNumberAgentInfo @@ -52,6 +53,11 @@ class GetPhoneNumberSipTrunkResponseModel(UncheckedBaseModel): Configuration of the Inbound SIP trunk - if configured. """ + livekit_stack: LivekitStackType = pydantic.Field() + """ + Type of Livekit stack used for this number. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/get_pronunciation_dictionary_metadata_response_model_permission_on_resource.py b/src/elevenlabs/types/get_pronunciation_dictionary_metadata_response_model_permission_on_resource.py index 9535f1d2..d0b65837 100644 --- a/src/elevenlabs/types/get_pronunciation_dictionary_metadata_response_model_permission_on_resource.py +++ b/src/elevenlabs/types/get_pronunciation_dictionary_metadata_response_model_permission_on_resource.py @@ -3,5 +3,5 @@ import typing GetPronunciationDictionaryMetadataResponseModelPermissionOnResource = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/types/get_speech_history_response.py b/src/elevenlabs/types/get_speech_history_response.py index 609fda3c..a34331b3 100644 --- a/src/elevenlabs/types/get_speech_history_response.py +++ b/src/elevenlabs/types/get_speech_history_response.py @@ -24,6 +24,11 @@ class GetSpeechHistoryResponse(UncheckedBaseModel): Whether there are more history items to fetch. """ + scanned_until: typing.Optional[int] = pydantic.Field(default=None) + """ + The timestamp of the last history item. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/get_unit_test_response_model.py b/src/elevenlabs/types/get_unit_test_response_model.py index 5b86b4da..6aac041b 100644 --- a/src/elevenlabs/types/get_unit_test_response_model.py +++ b/src/elevenlabs/types/get_unit_test_response_model.py @@ -11,6 +11,7 @@ from .agent_successful_response_example import AgentSuccessfulResponseExample from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue +from .unit_test_common_model_type import UnitTestCommonModelType from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput @@ -43,6 +44,7 @@ class GetUnitTestResponseModel(UncheckedBaseModel): Dynamic variables to replace in the agent config during testing """ + type: typing.Optional[UnitTestCommonModelType] = None id: str name: str diff --git a/src/elevenlabs/types/knowledge_base_sort_by.py b/src/elevenlabs/types/knowledge_base_sort_by.py new file mode 100644 index 00000000..6d53be14 --- /dev/null +++ b/src/elevenlabs/types/knowledge_base_sort_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +KnowledgeBaseSortBy = typing.Union[typing.Literal["name", "created_at", "updated_at", "size"], typing.Any] diff --git a/src/elevenlabs/types/literal_json_schema_property.py b/src/elevenlabs/types/literal_json_schema_property.py index 6d45c31d..f62e68cf 100644 --- a/src/elevenlabs/types/literal_json_schema_property.py +++ b/src/elevenlabs/types/literal_json_schema_property.py @@ -16,6 +16,11 @@ class LiteralJsonSchemaProperty(UncheckedBaseModel): The description of the property """ + enum: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + List of allowed string values for string type parameters + """ + dynamic_variable: typing.Optional[str] = pydantic.Field(default=None) """ The dynamic variable of the property diff --git a/src/elevenlabs/types/livekit_stack_type.py b/src/elevenlabs/types/livekit_stack_type.py new file mode 100644 index 00000000..81e50541 --- /dev/null +++ b/src/elevenlabs/types/livekit_stack_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LivekitStackType = typing.Union[typing.Literal["standard", "static"], typing.Any] diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index f20f70ee..48767995 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -32,6 +32,7 @@ "qwen3-30b-a3b", "gpt-oss-20b", "gpt-oss-120b", + "glm-45-air-fp8", "gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-flash-lite-preview-06-17", @@ -61,6 +62,8 @@ "gpt-4-turbo-2024-04-09", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-1106", + "watt-tool-8b", + "watt-tool-70b", ], typing.Any, ] diff --git a/src/elevenlabs/types/llm_reasoning_effort.py b/src/elevenlabs/types/llm_reasoning_effort.py new file mode 100644 index 00000000..90ecc1b2 --- /dev/null +++ b/src/elevenlabs/types/llm_reasoning_effort.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmReasoningEffort = typing.Union[typing.Literal["minimal", "low", "medium", "high"], typing.Any] diff --git a/src/elevenlabs/types/match_anything_parameter_evaluation_strategy.py b/src/elevenlabs/types/match_anything_parameter_evaluation_strategy.py new file mode 100644 index 00000000..58fc5090 --- /dev/null +++ b/src/elevenlabs/types/match_anything_parameter_evaluation_strategy.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class MatchAnythingParameterEvaluationStrategy(UncheckedBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/mcp_server_config_input.py b/src/elevenlabs/types/mcp_server_config_input.py index 43df6d52..25adef82 100644 --- a/src/elevenlabs/types/mcp_server_config_input.py +++ b/src/elevenlabs/types/mcp_server_config_input.py @@ -44,6 +44,10 @@ class McpServerConfigInput(UncheckedBaseModel): name: str description: typing.Optional[str] = None + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, all tools from this MCP server will require pre-tool execution speech + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/mcp_server_config_output.py b/src/elevenlabs/types/mcp_server_config_output.py index 7341bc0c..407b9888 100644 --- a/src/elevenlabs/types/mcp_server_config_output.py +++ b/src/elevenlabs/types/mcp_server_config_output.py @@ -44,6 +44,10 @@ class McpServerConfigOutput(UncheckedBaseModel): name: str description: typing.Optional[str] = None + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, all tools from this MCP server will require pre-tool execution speech + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/model.py b/src/elevenlabs/types/model.py index 9148279f..74f368e6 100644 --- a/src/elevenlabs/types/model.py +++ b/src/elevenlabs/types/model.py @@ -7,7 +7,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .language_response import LanguageResponse from .model_rates_response_model import ModelRatesResponseModel -from .model_response_model_concurrency_group import ModelResponseModelConcurrencyGroup class Model(UncheckedBaseModel): @@ -91,7 +90,7 @@ class Model(UncheckedBaseModel): The rates for the model. """ - concurrency_group: typing.Optional[ModelResponseModelConcurrencyGroup] = pydantic.Field(default=None) + concurrency_group: typing.Optional[str] = pydantic.Field(default=None) """ The concurrency group for the model. """ diff --git a/src/elevenlabs/types/model_response_model_concurrency_group.py b/src/elevenlabs/types/model_response_model_concurrency_group.py deleted file mode 100644 index 1f25a1e0..00000000 --- a/src/elevenlabs/types/model_response_model_concurrency_group.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ModelResponseModelConcurrencyGroup = typing.Union[typing.Literal["standard", "turbo"], typing.Any] diff --git a/src/elevenlabs/types/model_settings_response_model.py b/src/elevenlabs/types/model_settings_response_model.py index 6dd5392a..d4b925b4 100644 --- a/src/elevenlabs/types/model_settings_response_model.py +++ b/src/elevenlabs/types/model_settings_response_model.py @@ -13,11 +13,6 @@ class ModelSettingsResponseModel(UncheckedBaseModel): Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. """ - use_speaker_boost: typing.Optional[bool] = pydantic.Field(default=None) - """ - This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/project_extended_response_model_access_level.py b/src/elevenlabs/types/project_extended_response_model_access_level.py index 53427425..a306aa5c 100644 --- a/src/elevenlabs/types/project_extended_response_model_access_level.py +++ b/src/elevenlabs/types/project_extended_response_model_access_level.py @@ -2,4 +2,6 @@ import typing -ProjectExtendedResponseModelAccessLevel = typing.Union[typing.Literal["admin", "editor", "viewer"], typing.Any] +ProjectExtendedResponseModelAccessLevel = typing.Union[ + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any +] diff --git a/src/elevenlabs/types/project_response_model_access_level.py b/src/elevenlabs/types/project_response_model_access_level.py index b5d62265..77f5755e 100644 --- a/src/elevenlabs/types/project_response_model_access_level.py +++ b/src/elevenlabs/types/project_response_model_access_level.py @@ -2,4 +2,4 @@ import typing -ProjectResponseModelAccessLevel = typing.Union[typing.Literal["admin", "editor", "viewer"], typing.Any] +ProjectResponseModelAccessLevel = typing.Union[typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any] diff --git a/src/elevenlabs/types/prompt_agent_api_model_input.py b/src/elevenlabs/types/prompt_agent_api_model_input.py index 0cf5a1c1..ecbba1b9 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input.py @@ -11,6 +11,7 @@ from .custom_llm import CustomLlm from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm +from .llm_reasoning_effort import LlmReasoningEffort from .prompt_agent_api_model_input_tools_item import PromptAgentApiModelInputToolsItem from .rag_config import RagConfig @@ -26,6 +27,11 @@ class PromptAgentApiModelInput(UncheckedBaseModel): The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment """ + reasoning_effort: typing.Optional[LlmReasoningEffort] = pydantic.Field(default=None) + """ + Reasoning effort of the model. Only available for some models. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index 51395a29..718b1ff5 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -60,7 +60,7 @@ class PromptAgentApiModelInputToolsItem_System(UncheckedBaseModel): type: typing.Literal["system"] = "system" name: str - description: str + description: typing.Optional[str] = None response_timeout_secs: typing.Optional[int] = None disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_output.py b/src/elevenlabs/types/prompt_agent_api_model_output.py index 8ab7dac5..917041cb 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output.py @@ -11,6 +11,7 @@ from .custom_llm import CustomLlm from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm +from .llm_reasoning_effort import LlmReasoningEffort from .prompt_agent_api_model_output_tools_item import PromptAgentApiModelOutputToolsItem from .rag_config import RagConfig @@ -26,6 +27,11 @@ class PromptAgentApiModelOutput(UncheckedBaseModel): The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment """ + reasoning_effort: typing.Optional[LlmReasoningEffort] = pydantic.Field(default=None) + """ + Reasoning effort of the model. Only available for some models. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index 2867ae48..143c47fb 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -60,7 +60,7 @@ class PromptAgentApiModelOutputToolsItem_System(UncheckedBaseModel): type: typing.Literal["system"] = "system" name: str - description: str + description: typing.Optional[str] = None response_timeout_secs: typing.Optional[int] = None disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py index b6205233..f71e897d 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py @@ -11,6 +11,7 @@ from .custom_llm import CustomLlm from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm +from .llm_reasoning_effort import LlmReasoningEffort from .prompt_agent_api_model_workflow_override_tools_item import PromptAgentApiModelWorkflowOverrideToolsItem from .rag_config_workflow_override import RagConfigWorkflowOverride @@ -26,6 +27,11 @@ class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment """ + reasoning_effort: typing.Optional[LlmReasoningEffort] = pydantic.Field(default=None) + """ + Reasoning effort of the model. Only available for some models. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py index 47e96009..bbbca393 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py @@ -60,7 +60,7 @@ class PromptAgentApiModelWorkflowOverrideToolsItem_System(UncheckedBaseModel): type: typing.Literal["system"] = "system" name: str - description: str + description: typing.Optional[str] = None response_timeout_secs: typing.Optional[int] = None disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None diff --git a/src/elevenlabs/types/pronunciation_dictionary_version_response_model_permission_on_resource.py b/src/elevenlabs/types/pronunciation_dictionary_version_response_model_permission_on_resource.py index ad649727..d474b428 100644 --- a/src/elevenlabs/types/pronunciation_dictionary_version_response_model_permission_on_resource.py +++ b/src/elevenlabs/types/pronunciation_dictionary_version_response_model_permission_on_resource.py @@ -3,5 +3,5 @@ import typing PronunciationDictionaryVersionResponseModelPermissionOnResource = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/types/resource_access_info_role.py b/src/elevenlabs/types/resource_access_info_role.py index 1281fe4a..51714cb5 100644 --- a/src/elevenlabs/types/resource_access_info_role.py +++ b/src/elevenlabs/types/resource_access_info_role.py @@ -2,4 +2,4 @@ import typing -ResourceAccessInfoRole = typing.Union[typing.Literal["admin", "editor", "viewer"], typing.Any] +ResourceAccessInfoRole = typing.Union[typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any] diff --git a/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py b/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py index 93840e72..75a9672c 100644 --- a/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py +++ b/src/elevenlabs/types/resource_metadata_response_model_anonymous_access_level_override.py @@ -3,5 +3,5 @@ import typing ResourceMetadataResponseModelAnonymousAccessLevelOverride = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] diff --git a/src/elevenlabs/types/sip_trunk_credentials_request_model.py b/src/elevenlabs/types/sip_trunk_credentials_request_model.py index 780a2f81..8ca53525 100644 --- a/src/elevenlabs/types/sip_trunk_credentials_request_model.py +++ b/src/elevenlabs/types/sip_trunk_credentials_request_model.py @@ -13,9 +13,9 @@ class SipTrunkCredentialsRequestModel(UncheckedBaseModel): SIP trunk username """ - password: str = pydantic.Field() + password: typing.Optional[str] = pydantic.Field(default=None) """ - SIP trunk password + SIP trunk password - if not specified, then remain unchanged """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/sort_direction.py b/src/elevenlabs/types/sort_direction.py new file mode 100644 index 00000000..4832af00 --- /dev/null +++ b/src/elevenlabs/types/sort_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SortDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/elevenlabs/types/system_tool_config_input.py b/src/elevenlabs/types/system_tool_config_input.py index ace6e126..f09e15ed 100644 --- a/src/elevenlabs/types/system_tool_config_input.py +++ b/src/elevenlabs/types/system_tool_config_input.py @@ -15,7 +15,11 @@ class SystemToolConfigInput(UncheckedBaseModel): """ name: str - description: str + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Description of when the tool should be used and what it does. Leave empty to use the default description that's optimized for the specific tool type. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. diff --git a/src/elevenlabs/types/system_tool_config_output.py b/src/elevenlabs/types/system_tool_config_output.py index 497ef7a7..9aef1f28 100644 --- a/src/elevenlabs/types/system_tool_config_output.py +++ b/src/elevenlabs/types/system_tool_config_output.py @@ -15,7 +15,11 @@ class SystemToolConfigOutput(UncheckedBaseModel): """ name: str - description: str + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Description of when the tool should be used and what it does. Leave empty to use the default description that's optimized for the specific tool type. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. diff --git a/src/elevenlabs/types/text_to_speech_stream_with_timestamps_request.py b/src/elevenlabs/types/text_to_speech_stream_with_timestamps_request.py new file mode 100644 index 00000000..9d32037d --- /dev/null +++ b/src/elevenlabs/types/text_to_speech_stream_with_timestamps_request.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToSpeechStreamWithTimestampsRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/text_to_speech_with_timestamps_request.py b/src/elevenlabs/types/text_to_speech_with_timestamps_request.py new file mode 100644 index 00000000..5206f704 --- /dev/null +++ b/src/elevenlabs/types/text_to_speech_with_timestamps_request.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToSpeechWithTimestampsRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index 707f2d3e..db3bf8d0 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -60,7 +60,7 @@ class ToolRequestModelToolConfig_System(UncheckedBaseModel): type: typing.Literal["system"] = "system" name: str - description: str + description: typing.Optional[str] = None response_timeout_secs: typing.Optional[int] = None disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index f974c4ae..fe15742e 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -60,7 +60,7 @@ class ToolResponseModelToolConfig_System(UncheckedBaseModel): type: typing.Literal["system"] = "system" name: str - description: str + description: typing.Optional[str] = None response_timeout_secs: typing.Optional[int] = None disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None diff --git a/src/elevenlabs/types/tts_conversational_model.py b/src/elevenlabs/types/tts_conversational_model.py index 76638646..6461071f 100644 --- a/src/elevenlabs/types/tts_conversational_model.py +++ b/src/elevenlabs/types/tts_conversational_model.py @@ -3,5 +3,8 @@ import typing TtsConversationalModel = typing.Union[ - typing.Literal["eleven_turbo_v2", "eleven_turbo_v2_5", "eleven_flash_v2", "eleven_flash_v2_5"], typing.Any + typing.Literal[ + "eleven_turbo_v2", "eleven_turbo_v2_5", "eleven_flash_v2", "eleven_flash_v2_5", "eleven_multilingual_v2" + ], + typing.Any, ] diff --git a/src/elevenlabs/types/unit_test_common_model_type.py b/src/elevenlabs/types/unit_test_common_model_type.py new file mode 100644 index 00000000..b871bc1c --- /dev/null +++ b/src/elevenlabs/types/unit_test_common_model_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UnitTestCommonModelType = typing.Union[typing.Literal["llm", "tool"], typing.Any] diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py index 58359c8b..d83e75a9 100644 --- a/src/elevenlabs/types/unit_test_run_response_model.py +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -21,6 +21,7 @@ class UnitTestRunResponseModel(UncheckedBaseModel): status: TestRunStatus agent_responses: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutput]] = None test_id: str + test_name: typing.Optional[str] = None condition_result: typing.Optional[TestConditionResultCommonModel] = None last_updated_at_unix: typing.Optional[int] = None metadata: typing.Optional[TestRunMetadata] = None diff --git a/src/elevenlabs/types/unit_test_summary_response_model.py b/src/elevenlabs/types/unit_test_summary_response_model.py index 9b9d9b43..811d31a2 100644 --- a/src/elevenlabs/types/unit_test_summary_response_model.py +++ b/src/elevenlabs/types/unit_test_summary_response_model.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .resource_access_info import ResourceAccessInfo +from .unit_test_common_model_type import UnitTestCommonModelType class UnitTestSummaryResponseModel(UncheckedBaseModel): @@ -34,6 +35,11 @@ class UnitTestSummaryResponseModel(UncheckedBaseModel): Last update time of the test in unix seconds """ + type: UnitTestCommonModelType = pydantic.Field() + """ + Type of the test + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py index 4ad13ec6..4e43a28c 100644 --- a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py +++ b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_input.py @@ -15,11 +15,16 @@ class UnitTestToolCallEvaluationModelInput(UncheckedBaseModel): Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated. """ - referenced_tool: ReferencedToolCommonModel = pydantic.Field() + referenced_tool: typing.Optional[ReferencedToolCommonModel] = pydantic.Field(default=None) """ The tool to evaluate a call against. """ + verify_absence: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to verify that the tool was NOT called. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py index c8c08dfa..db756d88 100644 --- a/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py +++ b/src/elevenlabs/types/unit_test_tool_call_evaluation_model_output.py @@ -15,11 +15,16 @@ class UnitTestToolCallEvaluationModelOutput(UncheckedBaseModel): Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated. """ - referenced_tool: ReferencedToolCommonModel = pydantic.Field() + referenced_tool: typing.Optional[ReferencedToolCommonModel] = pydantic.Field(default=None) """ The tool to evaluate a call against. """ + verify_absence: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to verify that the tool was NOT called. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py b/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py index bc2d3090..99ffb0b9 100644 --- a/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py +++ b/src/elevenlabs/types/unit_test_tool_call_parameter_eval.py @@ -10,6 +10,19 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +class UnitTestToolCallParameterEval_Anything(UncheckedBaseModel): + type: typing.Literal["anything"] = "anything" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class UnitTestToolCallParameterEval_Exact(UncheckedBaseModel): type: typing.Literal["exact"] = "exact" expected_value: str @@ -54,7 +67,10 @@ class Config: UnitTestToolCallParameterEval = typing_extensions.Annotated[ typing.Union[ - UnitTestToolCallParameterEval_Exact, UnitTestToolCallParameterEval_Llm, UnitTestToolCallParameterEval_Regex + UnitTestToolCallParameterEval_Anything, + UnitTestToolCallParameterEval_Exact, + UnitTestToolCallParameterEval_Llm, + UnitTestToolCallParameterEval_Regex, ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/vad_config.py b/src/elevenlabs/types/vad_config.py new file mode 100644 index 00000000..e15f61d9 --- /dev/null +++ b/src/elevenlabs/types/vad_config.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VadConfig(UncheckedBaseModel): + background_voice_detection: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to use background voice filtering + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/vad_config_workflow_override.py b/src/elevenlabs/types/vad_config_workflow_override.py new file mode 100644 index 00000000..d025badf --- /dev/null +++ b/src/elevenlabs/types/vad_config_workflow_override.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VadConfigWorkflowOverride(UncheckedBaseModel): + background_voice_detection: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to use background voice filtering + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index 24fdc637..bbd51412 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -18,7 +18,11 @@ class WebhookToolConfigInput(UncheckedBaseModel): """ name: str - description: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index 56e9a61e..c9d94439 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -18,7 +18,11 @@ class WebhookToolConfigOutput(UncheckedBaseModel): """ name: str - description: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) """ The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). diff --git a/src/elevenlabs/workspace/resources/types/body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role.py b/src/elevenlabs/workspace/resources/types/body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role.py index dfc93844..d8ba5ecc 100644 --- a/src/elevenlabs/workspace/resources/types/body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role.py +++ b/src/elevenlabs/workspace/resources/types/body_share_workspace_resource_v_1_workspace_resources_resource_id_share_post_role.py @@ -3,5 +3,5 @@ import typing BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole = typing.Union[ - typing.Literal["admin", "editor", "viewer"], typing.Any + typing.Literal["admin", "editor", "commenter", "viewer"], typing.Any ] From 949bb68b9ce3a1cb722fb0254cd8a70bc51a0c1b Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Tue, 30 Sep 2025 12:43:42 +0200 Subject: [PATCH 19/34] Fix url generation (#631) * fix url generation * move import * move these back * fix tests * make ruff happy --- .../conversational_ai/conversation.py | 8 +- tests/test_async_convai.py | 98 +++++++++++++------ tests/test_convai.py | 72 +++++++++++++- 3 files changed, 143 insertions(+), 35 deletions(-) diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index dbc72c5b..207eda6e 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -6,6 +6,7 @@ import asyncio from concurrent.futures import ThreadPoolExecutor from enum import Enum +import urllib.parse from websockets.sync.client import connect, Connection import websockets @@ -329,8 +330,11 @@ def __init__( def _get_wss_url(http://github.com/self): base_http_url = self.client._client_wrapper.get_base_url() - base_ws_url = base_http_url.replace("https://", "wss://").replace("http://", "ws://") - return f"{base_ws_url}/v1/convai/conversation?agent_id={self.agent_id}&source=python_sdk&version={__version__}" + base_ws_url = urllib.parse.urlparse(base_http_url)._replace(scheme="wss" if base_http_url.startswith("https") else "ws").geturl() + # Ensure base URL ends with '/' for proper joining + if not base_ws_url.endswith('/'): + base_ws_url += '/' + return f"{base_ws_url}v1/convai/conversation?agent_id={self.agent_id}&source=python_sdk&version={__version__}" def _get_signed_url(http://github.com/self): response = self.client.conversational_ai.conversations.get_signed_url(http://github.com/agent_id=self.agent_id) diff --git a/tests/test_async_convai.py b/tests/test_async_convai.py index 7d78fa68..e397db55 100644 --- a/tests/test_async_convai.py +++ b/tests/test_async_convai.py @@ -1,11 +1,12 @@ import asyncio import json from unittest.mock import AsyncMock, MagicMock, patch + import pytest from elevenlabs.conversational_ai.conversation import ( - AsyncConversation, AsyncAudioInterface, + AsyncConversation, ConversationInitiationData, ) @@ -45,7 +46,6 @@ def create_mock_async_websocket(messages=None): # Convert messages to JSON strings json_messages = [json.dumps(msg) for msg in messages] - json_messages.extend(['{"type": "keep_alive"}'] * 10) # Add some keep-alive messages # Create an iterator message_iter = iter(json_messages) @@ -54,8 +54,9 @@ async def mock_recv(): try: return next(message_iter) except StopIteration: - # Simulate connection close after messages - raise asyncio.TimeoutError() + # After all messages, simulate timeout by sleeping forever + # This will be caught by asyncio.wait_for timeout in the conversation + await asyncio.sleep(float("inf")) mock_ws.recv = mock_recv return mock_ws @@ -66,6 +67,7 @@ async def test_async_conversation_basic_flow(): # Mock setup mock_ws = create_mock_async_websocket() mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" agent_response_callback = AsyncMock() test_user_id = "test_user_123" @@ -94,7 +96,7 @@ async def test_async_conversation_basic_flow(): # Assertions - check the call was made with the right structure send_calls = [call[0][0] for call in mock_ws.send.call_args_list] - init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + init_messages = [json.loads(call) for call in send_calls if "conversation_initiation_client_data" in call] assert len(init_messages) == 1 init_message = init_messages[0] @@ -148,6 +150,7 @@ async def test_async_conversation_with_dynamic_variables(): # Mock setup mock_ws = create_mock_async_websocket() mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" agent_response_callback = AsyncMock() dynamic_variables = {"name": "angelo"} @@ -177,7 +180,7 @@ async def test_async_conversation_with_dynamic_variables(): # Assertions - check the call was made with the right structure send_calls = [call[0][0] for call in mock_ws.send.call_args_list] - init_messages = [json.loads(call) for call in send_calls if 'conversation_initiation_client_data' in call] + init_messages = [json.loads(call) for call in send_calls if "conversation_initiation_client_data" in call] assert len(init_messages) == 1 init_message = init_messages[0] @@ -196,6 +199,7 @@ async def test_async_conversation_with_contextual_update(): # Mock setup mock_ws = create_mock_async_websocket([]) mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" # Setup the conversation conversation = AsyncConversation( @@ -228,6 +232,7 @@ async def test_async_conversation_send_user_message(): # Mock setup mock_ws = create_mock_async_websocket([]) mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" # Setup the conversation conversation = AsyncConversation( @@ -260,6 +265,7 @@ async def test_async_conversation_register_user_activity(): # Mock setup mock_ws = create_mock_async_websocket([]) mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" # Setup the conversation conversation = AsyncConversation( @@ -300,29 +306,21 @@ async def test_async_conversation_callback_flows(): "type": "agent_response_correction", "agent_response_correction_event": { "original_agent_response": "Hello ther!", - "corrected_agent_response": "Hello there!" - } - }, - { - "type": "user_transcript", - "user_transcription_event": {"user_transcript": "Hi, how are you?"} - }, - { - "type": "ping", - "ping_event": {"event_id": "123", "ping_ms": 50} - }, - { - "type": "interruption", - "interruption_event": {"event_id": "456"} + "corrected_agent_response": "Hello there!", + }, }, + {"type": "user_transcript", "user_transcription_event": {"user_transcript": "Hi, how are you?"}}, + {"type": "ping", "ping_event": {"event_id": "123", "ping_ms": 50}}, + {"type": "interruption", "interruption_event": {"event_id": "456"}}, { "type": "audio", - "audio_event": {"event_id": "789", "audio_base_64": "dGVzdA=="} # "test" in base64 - } + "audio_event": {"event_id": "789", "audio_base_64": "dGVzdA=="}, # "test" in base64 + }, ] mock_ws = create_mock_async_websocket(messages) mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" # Setup callbacks agent_response_callback = AsyncMock() @@ -368,7 +366,6 @@ async def test_async_conversation_callback_flows(): @pytest.mark.asyncio async def test_async_conversation_wss_url_generation_without_get_environment(): - from elevenlabs.core.client_wrapper import SyncClientWrapper # Test with various base URL formats to ensure robustness @@ -383,24 +380,20 @@ async def test_async_conversation_wss_url_generation_without_get_environment(): # Create a real SyncClientWrapper to ensure it doesn't have get_environment method mock_client = MagicMock() mock_client._client_wrapper = SyncClientWrapper( - base_url=base_url, - api_key="test_key", - httpx_client=MagicMock(), - timeout=30.0 + base_url=base_url, api_key="test_key", httpx_client=MagicMock(), timeout=30.0 ) conversation = AsyncConversation( - client=mock_client, - agent_id=TEST_AGENT_ID, - requires_auth=False, - audio_interface=MockAsyncAudioInterface() + client=mock_client, agent_id=TEST_AGENT_ID, requires_auth=False, audio_interface=MockAsyncAudioInterface() ) try: wss_url = conversation._get_wss_url() # Verify the URL is correctly generated - expected_url = f"{expected_ws_base}/v1/convai/conversation?agent_id={TEST_AGENT_ID}&source=python_sdk&version=" + expected_url = ( + f"{expected_ws_base}/v1/convai/conversation?agent_id={TEST_AGENT_ID}&source=python_sdk&version=" + ) assert wss_url.startswith(expected_url), f"URL should start with {expected_url}, got {wss_url}" # Verify the URL contains version parameter @@ -414,3 +407,44 @@ async def test_async_conversation_wss_url_generation_without_get_environment(): except Exception as e: assert False, f"Unexpected error generating WebSocket URL: {e}" + + +@pytest.mark.asyncio +async def test_async_websocket_url_construction_edge_cases(): + """Test WebSocket URL construction edge cases for async conversation, specifically for trailing slash handling.""" + from elevenlabs.conversational_ai.conversation import AsyncConversation + from elevenlabs.core.client_wrapper import SyncClientWrapper + + # Test cases with various base URL formats + test_cases = [ + # Base URLs without trailing slashes (the main edge case) + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io"), + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io"), + ("http://localhost:8000/", "ws://localhost:8000"), + # Base URLs with trailing slashes (should still work) + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io"), + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io"), + ("http://localhost:8000/", "ws://localhost:8000"), + ] + + for base_url, expected_ws_base in test_cases: + # Test async conversation WebSocket URL construction + mock_client = MagicMock() + mock_client._client_wrapper = SyncClientWrapper( + base_url=base_url, api_key="test_key", httpx_client=MagicMock(), timeout=30.0 + ) + + conversation = AsyncConversation( + client=mock_client, agent_id=TEST_AGENT_ID, requires_auth=False, audio_interface=MockAsyncAudioInterface() + ) + + # Test conversation URL generation + conv_url = conversation._get_wss_url() + expected_conv_url = f"{expected_ws_base}/v1/convai/conversation" + assert ( + expected_conv_url in conv_url + ), f"Async conversation URL should contain {expected_conv_url}, got {conv_url}" + + # Ensure no double slashes in the path (except after the protocol) + url_path = conv_url.split("://", 1)[1] # Remove protocol + assert "//" not in url_path, f"Async conversation URL should not contain double slashes in path: {conv_url}" diff --git a/tests/test_convai.py b/tests/test_convai.py index 8b855ca5..d8f12121 100644 --- a/tests/test_convai.py +++ b/tests/test_convai.py @@ -3,7 +3,6 @@ import json import time - class MockAudioInterface(AudioInterface): def start(self, input_callback): print("Audio interface started") @@ -51,6 +50,7 @@ def test_conversation_basic_flow(): # Mock setup mock_ws = create_mock_websocket() mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" agent_response_callback = MagicMock() test_user_id = "test_user_123" @@ -132,6 +132,7 @@ def test_conversation_with_dynamic_variables(): # Mock setup mock_ws = create_mock_websocket() mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" agent_response_callback = MagicMock() dynamic_variables = {"name": "angelo"} @@ -181,6 +182,7 @@ def test_conversation_with_contextual_update(): # Mock setup mock_ws = create_mock_websocket([]) mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" # Setup the conversation conversation = Conversation( @@ -256,3 +258,71 @@ def test_conversation_wss_url_generation_without_get_environment(): except Exception as e: assert False, f"Unexpected error generating WebSocket URL: {e}" + + +def test_websocket_url_construction_edge_cases(): + """Test WebSocket URL construction edge cases, specifically for trailing slash handling.""" + from elevenlabs.core.client_wrapper import SyncClientWrapper + from elevenlabs.conversational_ai.conversation import Conversation + from elevenlabs.realtime_tts import RealtimeTextToSpeechClient + + # Test cases with various base URL formats + test_cases = [ + # Base URLs without trailing slashes (the main edge case) + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io", "wss://api.eu.residency.elevenlabs.io"), + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io", "wss://api.elevenlabs.io"), + ("http://localhost:8000/", "ws://localhost:8000", "wss://localhost:8000"), + # Base URLs with trailing slashes (should still work) + ("https://api.eu.residency.elevenlabs.io/", "wss://api.eu.residency.elevenlabs.io", "wss://api.eu.residency.elevenlabs.io/"), + ("https://api.elevenlabs.io/", "wss://api.elevenlabs.io", "wss://api.elevenlabs.io/"), + ("http://localhost:8000/", "ws://localhost:8000", "wss://localhost:8000/"), + ] + + for base_url, expected_ws_base, expected_tts_ws_base in test_cases: + # Test conversation WebSocket URL construction + mock_client = MagicMock() + mock_client._client_wrapper = SyncClientWrapper( + base_url=base_url, + api_key="test_key", + httpx_client=MagicMock(), + timeout=30.0 + ) + + conversation = Conversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAudioInterface() + ) + + # Test conversation URL generation + conv_url = conversation._get_wss_url() + expected_conv_url = f"{expected_ws_base}/v1/convai/conversation" + assert expected_conv_url in conv_url, f"Conversation URL should contain {expected_conv_url}, got {conv_url}" + + # Ensure no double slashes in the path (except after the protocol) + url_path = conv_url.split("://", 1)[1] # Remove protocol + assert "//" not in url_path, f"URL should not contain double slashes in path: {conv_url}" + + # Test realtime TTS WebSocket URL construction + realtime_client = RealtimeTextToSpeechClient(client_wrapper=mock_client._client_wrapper) + + # Test the WebSocket base URL construction + # Note: realtime TTS always uses wss scheme, not ws + assert realtime_client._ws_base_url == expected_tts_ws_base, f"TTS WebSocket base URL should be {expected_tts_ws_base}, got {realtime_client._ws_base_url}" + + # Test full URL construction using urljoin (simulating the actual method) + import urllib.parse + test_voice_id = "test_voice_123" + test_model = "eleven_turbo_v2_5" + test_format = "mp3_44100_128" + relative_path = f"v1/text-to-speech/{test_voice_id}/stream-input?model_id={test_model}&output_format={test_format}" + + full_tts_url = urllib.parse.urljoin(realtime_client._ws_base_url, relative_path) + # For URLs with trailing slash, expect it to be preserved in the joined URL + expected_tts_url_base = expected_tts_ws_base.rstrip('/') + "/v1/text-to-speech/" + test_voice_id + "/stream-input" + assert expected_tts_url_base in full_tts_url, f"TTS URL should contain {expected_tts_url_base}, got {full_tts_url}" + + # Ensure no double slashes in the path + tts_url_path = full_tts_url.split("://", 1)[1] + assert "//" not in tts_url_path, f"TTS URL should not contain double slashes in path: {full_tts_url}" From 1e127c3589991f8e9eb1c34b6d148f22c1445043 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:02:50 +0200 Subject: [PATCH 20/34] SDK regeneration (#633) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 1693 +++++++++++++++-- src/elevenlabs/__init__.py | 714 ++++++- .../conversational_ai/agents/client.py | 16 +- .../conversational_ai/agents/widget/client.py | 2 + .../conversational_ai/batch_calls/client.py | 10 +- .../batch_calls/raw_client.py | 4 +- src/elevenlabs/conversational_ai/client.py | 8 +- .../conversations/audio/client.py | 30 + .../conversational_ai/conversations/client.py | 26 +- .../knowledge_base/client.py | 20 +- .../knowledge_base/documents/client.py | 8 + .../conversational_ai/mcp_servers/client.py | 10 + .../mcp_servers/raw_client.py | 10 + .../conversational_ai/tests/client.py | 33 +- .../tests/invocations/client.py | 105 + .../tests/invocations/raw_client.py | 133 ++ .../conversational_ai/tests/raw_client.py | 29 + .../conversational_ai/tools/client.py | 4 + src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/dubbing/__init__.py | 3 + src/elevenlabs/dubbing/audio/client.py | 32 + src/elevenlabs/dubbing/client.py | 29 +- src/elevenlabs/dubbing/raw_client.py | 13 +- src/elevenlabs/dubbing/types/__init__.py | 9 +- .../types/dubbing_create_request_mode.py | 5 + src/elevenlabs/history/client.py | 84 +- src/elevenlabs/music/client.py | 128 +- src/elevenlabs/music/raw_client.py | 50 +- .../pronunciation_dictionaries/client.py | 46 +- src/elevenlabs/speech_to_text/client.py | 2 + src/elevenlabs/studio/__init__.py | 3 + src/elevenlabs/studio/client.py | 23 + .../projects/chapters/snapshots/client.py | 34 + src/elevenlabs/studio/projects/client.py | 2 + .../studio/projects/snapshots/client.py | 64 + src/elevenlabs/studio/raw_client.py | 23 + src/elevenlabs/studio/types/__init__.py | 5 + ..._podcasts_post_apply_text_normalization.py | 7 + src/elevenlabs/text_to_speech/__init__.py | 12 +- src/elevenlabs/text_to_speech/client.py | 78 +- src/elevenlabs/text_to_speech/raw_client.py | 72 +- .../text_to_speech/types/__init__.py | 16 +- ...to_speech_full_apply_text_normalization.py | 5 + ..._speech_stream_apply_text_normalization.py | 5 + ...id_stream_post_apply_text_normalization.py | 7 - ..._voice_id_post_apply_text_normalization.py | 7 - src/elevenlabs/text_to_voice/client.py | 6 + .../text_to_voice/preview/client.py | 30 + src/elevenlabs/types/__init__.py | 726 +++++++ ..._config_override_for_test_request_model.py | 8 + .../agent_platform_settings_request_model.py | 5 + .../agent_platform_settings_response_model.py | 5 + .../types/agent_workflow_request_model.py | 8 + ...gent_workflow_request_model_nodes_value.py | 6 + src/elevenlabs/types/ast_and_operator_node.py | 34 + .../ast_and_operator_node_children_item.py | 250 +++ src/elevenlabs/types/ast_boolean_node.py | 20 + .../types/ast_dynamic_variable_node.py | 20 + .../types/ast_equals_operator_node.py | 36 + .../types/ast_equals_operator_node_left.py | 250 +++ .../types/ast_equals_operator_node_right.py | 250 +++ .../types/ast_greater_than_operator_node.py | 36 + .../ast_greater_than_operator_node_left.py | 250 +++ .../ast_greater_than_operator_node_right.py | 250 +++ ...st_greater_than_or_equals_operator_node.py | 36 + ...eater_than_or_equals_operator_node_left.py | 250 +++ ...ater_than_or_equals_operator_node_right.py | 250 +++ .../types/ast_less_than_operator_node.py | 36 + .../types/ast_less_than_operator_node_left.py | 250 +++ .../ast_less_than_operator_node_right.py | 250 +++ .../ast_less_than_or_equals_operator_node.py | 36 + ..._less_than_or_equals_operator_node_left.py | 250 +++ ...less_than_or_equals_operator_node_right.py | 250 +++ .../types/ast_not_equals_operator_node.py | 36 + .../ast_not_equals_operator_node_left.py | 250 +++ .../ast_not_equals_operator_node_right.py | 250 +++ src/elevenlabs/types/ast_number_node.py | 20 + src/elevenlabs/types/ast_or_operator_node.py | 34 + .../ast_or_operator_node_children_item.py | 250 +++ src/elevenlabs/types/ast_string_node.py | 20 + src/elevenlabs/types/astllm_node.py | 20 + .../conversation_charging_common_model.py | 2 + ...inbound_sip_trunk_config_response_model.py | 5 + ...et_test_invocations_page_response_model.py | 32 + ...et_test_suite_invocation_response_model.py | 1 + .../types/get_unit_test_response_model.py | 6 + .../inbound_sip_trunk_config_request_model.py | 5 + src/elevenlabs/types/list_response_meta.py | 22 + .../types/mcp_server_config_input.py | 5 + .../types/mcp_server_config_output.py | 5 + src/elevenlabs/types/music_prompt.py | 4 +- .../types/prompt_agent_api_model_input.py | 2 +- .../types/prompt_agent_api_model_output.py | 2 +- ...rompt_agent_api_model_workflow_override.py | 2 +- src/elevenlabs/types/song_section.py | 4 +- .../subscription_extras_response_model.py | 5 + .../test_from_conversation_metadata_input.py | 35 + .../test_from_conversation_metadata_output.py | 35 + .../test_invocation_summary_response_model.py | 59 + .../types/text_to_speech_request.py | 5 + src/elevenlabs/types/workflow_edge_model.py | 16 +- .../workflow_edge_model_backward_condition.py | 30 +- .../workflow_edge_model_forward_condition.py | 30 +- .../types/workflow_end_node_model.py | 5 + .../workflow_expression_condition_model.py | 36 + ...w_expression_condition_model_expression.py | 264 +++ .../workflow_override_agent_node_model.py | 5 + .../types/workflow_phone_number_node_model.py | 5 + .../workflow_standalone_agent_node_model.py | 5 + .../types/workflow_start_node_model.py | 5 + .../types/workflow_tool_node_model.py | 5 + src/elevenlabs/usage/client.py | 10 + src/elevenlabs/voices/client.py | 56 +- src/elevenlabs/voices/pvc/samples/client.py | 14 +- .../voices/pvc/samples/raw_client.py | 14 +- src/elevenlabs/voices/samples/audio/client.py | 32 + 117 files changed, 8789 insertions(+), 282 deletions(-) create mode 100644 src/elevenlabs/dubbing/types/dubbing_create_request_mode.py create mode 100644 src/elevenlabs/studio/types/body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization.py create mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_full_apply_text_normalization.py create mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_apply_text_normalization.py delete mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization.py delete mode 100644 src/elevenlabs/text_to_speech/types/body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization.py create mode 100644 src/elevenlabs/types/ast_and_operator_node.py create mode 100644 src/elevenlabs/types/ast_and_operator_node_children_item.py create mode 100644 src/elevenlabs/types/ast_boolean_node.py create mode 100644 src/elevenlabs/types/ast_dynamic_variable_node.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_number_node.py create mode 100644 src/elevenlabs/types/ast_or_operator_node.py create mode 100644 src/elevenlabs/types/ast_or_operator_node_children_item.py create mode 100644 src/elevenlabs/types/ast_string_node.py create mode 100644 src/elevenlabs/types/astllm_node.py create mode 100644 src/elevenlabs/types/get_test_invocations_page_response_model.py create mode 100644 src/elevenlabs/types/list_response_meta.py create mode 100644 src/elevenlabs/types/test_from_conversation_metadata_input.py create mode 100644 src/elevenlabs/types/test_from_conversation_metadata_output.py create mode 100644 src/elevenlabs/types/test_invocation_summary_response_model.py create mode 100644 src/elevenlabs/types/text_to_speech_request.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model_expression.py diff --git a/pyproject.toml b/pyproject.toml index 42f39513..a3650b89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.16.0" +version = "v2.17.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 92e426bc..591588ae 100644 --- a/reference.md +++ b/reference.md @@ -92,7 +92,17 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.history.list() +client.history.list( + page_size=1, + start_after_history_item_id="start_after_history_item_id", + voice_id="voice_id", + model_id="model_id", + date_before_unix=1, + date_after_unix=1, + sort_direction="asc", + search="search", + source="TTS", +) ``` @@ -328,6 +338,154 @@ client.history.delete( + + +
+ +
client.history.get_audio(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the audio of an history item. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.history.get_audio( + history_item_id="history_item_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ +
client.history.download(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Download one or more history items. If one history item ID is provided, we will return a single audio file. If more than one history item IDs are provided, we will provide the history items packed into a .zip file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.history.download( + history_item_ids=["history_item_ids", "history_item_ids"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_ids:** `typing.Sequence[str]` — A list of history items to download, you can get IDs of history items and other metadata using the GET https://api.elevenlabs.io/v1/history endpoint. + +
+
+ +
+
+ +**output_format:** `typing.Optional[str]` — Output format to transcode the audio file, can be wav or default. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ +
@@ -707,7 +865,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechFullApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -723,6 +881,14 @@ Defaults to None.
+**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -769,6 +935,9 @@ client = ElevenLabs( ) client.text_to_speech.convert_with_timestamps( voice_id="21m00Tcm4TlvDq8ikWAM", + enable_logging=True, + optimize_streaming_latency=1, + output_format="mp3_22050_32", text="This is a test for the API of ElevenLabs.", ) @@ -931,6 +1100,14 @@ Defaults to None.
+**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1125,9 +1302,7 @@ Defaults to None.
-**apply_text_normalization:** `typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization -]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechStreamApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans.
@@ -1143,6 +1318,14 @@ Defaults to None.
+**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1355,6 +1538,14 @@ Defaults to None.
+**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1987,6 +2178,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.text_to_voice.create_previews( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) @@ -2217,6 +2409,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.text_to_voice.design( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) @@ -2392,6 +2585,7 @@ client = ElevenLabs( ) client.text_to_voice.remix( voice_id="21m00Tcm4TlvDq8ikWAM", + output_format="mp3_22050_32", voice_description="Make the voice have a higher pitch.", ) @@ -2611,7 +2805,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.voices.get_all() +client.voices.get_all( + show_legacy=True, +) ``` @@ -2680,6 +2876,15 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.voices.search( + next_page_token="next_page_token", + page_size=1, + search="search", + sort="sort", + sort_direction="sort_direction", + voice_type="voice_type", + category="category", + fine_tuning_state="fine_tuning_state", + collection_id="collection_id", include_total_count=True, ) @@ -2831,6 +3036,7 @@ client = ElevenLabs( ) client.voices.get( voice_id="21m00Tcm4TlvDq8ikWAM", + with_settings=True, ) ``` @@ -3179,8 +3385,22 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.voices.get_shared( + page_size=1, + category="professional", + gender="gender", + age="age", + accent="accent", + language="language", + locale="locale", + search="search", featured=True, + min_notice_period_days=1, + include_custom_rates=True, + include_live_moderated=True, reader_app_enabled=True, + owner_id="owner_id", + sort="sort", + page=1, ) ``` @@ -3655,6 +3875,21 @@ long - produces podcasts longer than 7 minutes. } + +
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization]` + + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + +
@@ -3706,7 +3941,13 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.dubbing.list() +client.dubbing.list( + cursor="cursor", + page_size=1, + dubbing_status="dubbing", + filter_by_creator="personal", + order_direction="DESCENDING", +) ``` @@ -3982,7 +4223,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**mode:** `typing.Optional[str]` — automatic or manual. Manual mode is only supported when creating a dubbing studio project +**mode:** `typing.Optional[DubbingCreateRequestMode]` — The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use.
@@ -4589,6 +4830,11 @@ client = ElevenLabs( client.usage.get( start_unix=1, end_unix=1, + include_workspace_metrics=True, + breakdown_type="none", + aggregation_interval="hour", + aggregation_bucket_size=1, + metric="credits", ) ``` @@ -5037,7 +5283,7 @@ client.pronunciation_dictionaries.update(
-
client.pronunciation_dictionaries.list(...) +
client.pronunciation_dictionaries.download(...)
@@ -5049,7 +5295,7 @@ client.pronunciation_dictionaries.update(
-Get a list of the pronunciation dictionaries you have access to and their metadata +Get a PLS file with a pronunciation dictionary version rules
@@ -5069,7 +5315,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.pronunciation_dictionaries.list() +client.pronunciation_dictionaries.download( + dictionary_id="dictionary_id", + version_id="version_id", +) ``` @@ -5085,23 +5334,7 @@ client.pronunciation_dictionaries.list()
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30. - -
-
- -
-
- -**sort:** `typing.Optional[PronunciationDictionariesListRequestSort]` — Which field to sort by, one of 'created_at_unix' or 'name'. +**dictionary_id:** `str` — The id of the pronunciation dictionary
@@ -5109,7 +5342,7 @@ client.pronunciation_dictionaries.list()
-**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'ascending' or 'descending'. +**version_id:** `str` — The id of the version of the pronunciation dictionary
@@ -5117,7 +5350,7 @@ client.pronunciation_dictionaries.list()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -5129,8 +5362,7 @@ client.pronunciation_dictionaries.list()
-## ServiceAccounts -
client.service_accounts.list() +
client.pronunciation_dictionaries.list(...)
@@ -5142,7 +5374,7 @@ client.pronunciation_dictionaries.list()
-List all service accounts in the workspace +Get a list of the pronunciation dictionaries you have access to and their metadata
@@ -5162,7 +5394,12 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.service_accounts.list() +client.pronunciation_dictionaries.list( + cursor="cursor", + page_size=1, + sort="creation_time_unix", + sort_direction="sort_direction", +) ``` @@ -5178,6 +5415,38 @@ client.service_accounts.list()
+**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**sort:** `typing.Optional[PronunciationDictionariesListRequestSort]` — Which field to sort by, one of 'created_at_unix' or 'name'. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'ascending' or 'descending'. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -5190,8 +5459,8 @@ client.service_accounts.list()
-## Webhooks -
client.webhooks.list(...) +## ServiceAccounts +
client.service_accounts.list()
@@ -5203,7 +5472,7 @@ client.service_accounts.list()
-List all webhooks for a workspace +List all service accounts in the workspace
@@ -5223,7 +5492,68 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.webhooks.list( +client.service_accounts.list() + +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +## Webhooks +
client.webhooks.list(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all webhooks for a workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.webhooks.list( include_usages=False, ) @@ -5295,6 +5625,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.speech_to_text.convert( + enable_logging=True, model_id="model_id", ) @@ -5592,7 +5923,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.add_to_knowledge_base() +client.conversational_ai.add_to_knowledge_base( + agent_id="agent_id", +) ```
@@ -5750,32 +6083,437 @@ Delete RAG index for the knowledgebase document.
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.delete_document_rag_index( - documentation_id="21m00Tcm4TlvDq8ikWAM", - rag_index_id="21m00Tcm4TlvDq8ikWAM", -) - -``` -
-
+```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.delete_document_rag_index( + documentation_id="21m00Tcm4TlvDq8ikWAM", + rag_index_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**rag_index_id:** `str` — The id of RAG index of document from the knowledge base. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.conversational_ai.rag_index_overview() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Provides total size and other information of RAG indexes used by knowledgebase documents +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.rag_index_overview() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.update_secret(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an existing secret for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.update_secret( + secret_id="secret_id", + name="name", + value="value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Music +
client.music.compose(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Compose a song from a prompt or a composition plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.music.compose() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicComposeRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**model_id:** `typing.Optional[typing.Literal["music_v1"]]` — The model to use for the generation. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — The seed to use for the generation. + +
+
+ +
+
+ +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + +
+
+ +
+
+ +**respect_sections_durations:** `typing.Optional[bool]` — Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ +
client.music.compose_detailed(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Compose a song from a prompt or a composition plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.music.compose_detailed() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicComposeDetailedRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +
-#### ⚙️ Parameters -
+**model_id:** `typing.Optional[typing.Literal["music_v1"]]` — The model to use for the generation. + +
+
+
-**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. +**seed:** `typing.Optional[int]` — The seed to use for the generation.
@@ -5783,7 +6521,7 @@ client.conversational_ai.delete_document_rag_index(
-**rag_index_id:** `str` — The id of RAG index of document from the knowledge base. +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.
@@ -5791,7 +6529,7 @@ client.conversational_ai.delete_document_rag_index(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -5803,7 +6541,7 @@ client.conversational_ai.delete_document_rag_index(
-
client.conversational_ai.rag_index_overview() +
client.music.stream(...)
@@ -5815,7 +6553,7 @@ client.conversational_ai.delete_document_rag_index(
-Provides total size and other information of RAG indexes used by knowledgebase documents +Stream a composed song from a prompt or a composition plan.
@@ -5835,7 +6573,7 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.rag_index_overview() +client.music.stream() ``` @@ -5851,71 +6589,47 @@ client.conversational_ai.rag_index_overview()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**output_format:** `typing.Optional[MusicStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
- -
+
+
+**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. +
-
-
client.conversational_ai.update_secret(...)
-#### 📝 Description - -
-
+**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. + +
+
-Update an existing secret for the workspace -
-
+**composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. +
-#### 🔌 Usage - -
-
-
-```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.update_secret( - secret_id="secret_id", - name="name", - value="value", -) - -``` -
-
+**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +
-#### ⚙️ Parameters - -
-
-
-**secret_id:** `str` +**model_id:** `typing.Optional[typing.Literal["music_v1"]]` — The model to use for the generation.
@@ -5923,7 +6637,7 @@ client.conversational_ai.update_secret(
-**name:** `str` +**seed:** `typing.Optional[int]` — The seed to use for the generation.
@@ -5931,7 +6645,7 @@ client.conversational_ai.update_secret(
-**value:** `str` +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.
@@ -5939,7 +6653,7 @@ client.conversational_ai.update_secret(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -5951,7 +6665,6 @@ client.conversational_ai.update_secret(
-## Music ## ConversationalAi Conversations
client.conversational_ai.conversations.get_signed_url(...)
@@ -5987,6 +6700,7 @@ client = ElevenLabs( ) client.conversational_ai.conversations.get_signed_url( agent_id="21m00Tcm4TlvDq8ikWAM", + include_conversation_id=True, ) ``` @@ -6065,6 +6779,7 @@ client = ElevenLabs( ) client.conversational_ai.conversations.get_webrtc_token( agent_id="21m00Tcm4TlvDq8ikWAM", + participant_name="participant_name", ) ``` @@ -6141,7 +6856,16 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.conversations.list() +client.conversational_ai.conversations.list( + cursor="cursor", + agent_id="agent_id", + call_successful="success", + call_start_before_unix=1, + call_start_after_unix=1, + user_id="user_id", + page_size=1, + summary_mode="exclude", +) ``` @@ -6855,7 +7579,13 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.agents.list() +client.conversational_ai.agents.list( + page_size=1, + search="search", + sort_direction="asc", + sort_by="name", + cursor="cursor", +) ``` @@ -7443,6 +8173,14 @@ client.conversational_ai.tests.create(
+**from_conversation_metadata:** `typing.Optional[TestFromConversationMetadataInput]` — Metadata of a conversation this test was created from (if applicable). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7674,6 +8412,14 @@ client.conversational_ai.tests.update(
+**from_conversation_metadata:** `typing.Optional[TestFromConversationMetadataInput]` — Metadata of a conversation this test was created from (if applicable). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7858,7 +8604,11 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.tests.list() +client.conversational_ai.tests.list( + cursor="cursor", + page_size=1, + search="search", +) ``` @@ -8413,7 +9163,15 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.knowledge_base.list() +client.conversational_ai.knowledge_base.list( + page_size=1, + search="search", + show_only_owned_documents=True, + sort_direction="asc", + sort_by="name", + use_typesense=True, + cursor="cursor", +) ``` @@ -8913,6 +9671,8 @@ client = ElevenLabs( ) client.conversational_ai.tools.get_dependent_agents( tool_id="tool_id", + cursor="cursor", + page_size=1, ) ``` @@ -9478,7 +10238,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.batch_calls.list() +client.conversational_ai.batch_calls.list( + limit=1, + last_doc="last_doc", +) ``` @@ -10107,6 +10870,14 @@ client.conversational_ai.mcp_servers.update(
+**disable_interruptions:** `typing.Optional[bool]` — Whether to disable interruptions for all tools from this MCP server + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10154,6 +10925,7 @@ client = ElevenLabs( ) client.conversational_ai.agents.widget.get( agent_id="21m00Tcm4TlvDq8ikWAM", + conversation_signature="conversation_signature", ) ``` @@ -10517,6 +11289,76 @@ core.File` — See core.File for more documentation
## ConversationalAi Conversations Audio +
client.conversational_ai.conversations.audio.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the audio recording of a particular conversation +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.conversations.audio.get( + conversation_id="conversation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ ## ConversationalAi Conversations Feedback
client.conversational_ai.conversations.feedback.create(...)
@@ -10995,6 +11837,7 @@ client = ElevenLabs( ) client.conversational_ai.knowledge_base.documents.get( documentation_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_id", ) ``` @@ -11073,6 +11916,7 @@ client = ElevenLabs( ) client.conversational_ai.knowledge_base.documents.delete( documentation_id="21m00Tcm4TlvDq8ikWAM", + force=True, ) ``` @@ -11230,6 +12074,8 @@ client = ElevenLabs( ) client.conversational_ai.knowledge_base.documents.get_agents( documentation_id="21m00Tcm4TlvDq8ikWAM", + cursor="cursor", + page_size=1, ) ``` @@ -11740,7 +12586,86 @@ client.conversational_ai.mcp_servers.tool_approvals.create(
-**input_schema:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — The input schema of the MCP tool (the schema defined on the MCP server before ElevenLabs does any extra processing) +**input_schema:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — The input schema of the MCP tool (the schema defined on the MCP server before ElevenLabs does any extra processing) + +
+
+ +
+
+ +**approval_policy:** `typing.Optional[McpToolApprovalPolicy]` — The tool-level approval policy + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
+ + + + +
+ +
client.conversational_ai.mcp_servers.tool_approvals.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove approval for a specific MCP tool when using per-tool approval mode. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.tool_approvals.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server.
@@ -11748,7 +12673,7 @@ client.conversational_ai.mcp_servers.tool_approvals.create(
-**approval_policy:** `typing.Optional[McpToolApprovalPolicy]` — The tool-level approval policy +**tool_name:** `str` — Name of the MCP tool to remove approval for.
@@ -11768,7 +12693,8 @@ client.conversational_ai.mcp_servers.tool_approvals.create(
-
client.conversational_ai.mcp_servers.tool_approvals.delete(...) +## ConversationalAi Tests Invocations +
client.conversational_ai.tests.invocations.list(...)
@@ -11780,7 +12706,7 @@ client.conversational_ai.mcp_servers.tool_approvals.create(
-Remove approval for a specific MCP tool when using per-tool approval mode. +Lists all test invocations with pagination support and optional search filtering.
@@ -11800,9 +12726,10 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.conversational_ai.mcp_servers.tool_approvals.delete( - mcp_server_id="mcp_server_id", - tool_name="tool_name", +client.conversational_ai.tests.invocations.list( + agent_id="agent_id", + page_size=1, + cursor="cursor", ) ``` @@ -11819,7 +12746,7 @@ client.conversational_ai.mcp_servers.tool_approvals.delete(
-**mcp_server_id:** `str` — ID of the MCP Server. +**agent_id:** `str` — Filter by agent ID
@@ -11827,7 +12754,15 @@ client.conversational_ai.mcp_servers.tool_approvals.delete(
-**tool_name:** `str` — Name of the MCP tool to remove approval for. +**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
@@ -11847,7 +12782,6 @@ client.conversational_ai.mcp_servers.tool_approvals.delete(
-## ConversationalAi Tests Invocations
client.conversational_ai.tests.invocations.get(...)
@@ -12435,6 +13369,85 @@ client.dubbing.resource.render(
## Dubbing Audio +
client.dubbing.audio.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns dub as a streamed MP3 or MP4 file. If this dub has been edited using Dubbing Studio you need to use the resource render endpoint as this endpoint only returns the original automatic dub result. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.dubbing.audio.get( + dubbing_id="dubbing_id", + language_code="language_code", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language_code:** `str` — ID of the language. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ ## Dubbing Transcript
client.dubbing.transcript.get_transcript_for_dub(...)
@@ -14301,6 +15314,7 @@ client = ElevenLabs( ) client.studio.projects.get( project_id="21m00Tcm4TlvDq8ikWAM", + share_id="share_id", ) ``` @@ -14769,15 +15783,181 @@ client.studio.projects.snapshots.list(
-#### ⚙️ Parameters - +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.studio.projects.snapshots.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the project snapshot. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.studio.projects.snapshots.get( + project_id="21m00Tcm4TlvDq8ikWAM", + project_snapshot_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**project_snapshot_id:** `str` — The ID of the Studio project snapshot. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.snapshots.stream(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream the audio from a Studio project snapshot. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.studio.projects.snapshots.stream( + project_id="project_id", + project_snapshot_id="project_snapshot_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+
+**project_snapshot_id:** `str` — The ID of the Studio project snapshot. + +
+
+
-**project_id:** `str` — The ID of the Studio project. +**convert_to_mpeg:** `typing.Optional[bool]` — Whether to convert the audio to mpeg format.
@@ -14785,7 +15965,7 @@ client.studio.projects.snapshots.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -14797,7 +15977,7 @@ client.studio.projects.snapshots.list(
-
client.studio.projects.snapshots.get(...) +
client.studio.projects.snapshots.stream_archive(...)
@@ -14809,7 +15989,7 @@ client.studio.projects.snapshots.list(
-Returns the project snapshot. +Returns a compressed archive of the Studio project's audio.
@@ -14829,9 +16009,9 @@ from elevenlabs import ElevenLabs client = ElevenLabs( api_key="YOUR_API_KEY", ) -client.studio.projects.snapshots.get( - project_id="21m00Tcm4TlvDq8ikWAM", - project_snapshot_id="21m00Tcm4TlvDq8ikWAM", +client.studio.projects.snapshots.stream_archive( + project_id="project_id", + project_snapshot_id="project_snapshot_id", ) ``` @@ -14848,7 +16028,7 @@ client.studio.projects.snapshots.get(
-**project_id:** `str` — The ID of the Studio project. +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.
@@ -14864,7 +16044,7 @@ client.studio.projects.snapshots.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -15622,11 +16802,177 @@ client.studio.projects.chapters.snapshots.get(
+ + +
+ +
client.studio.projects.chapters.snapshots.stream(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream the audio from a chapter snapshot. Use `GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the snapshots of a chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.studio.projects.chapters.snapshots.stream( + project_id="project_id", + chapter_id="chapter_id", + chapter_snapshot_id="chapter_snapshot_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**chapter_snapshot_id:** `str` — The ID of the chapter snapshot to be used. You can use the [List project chapter snapshots](/docs/api-reference/studio/get-snapshots) endpoint to list all the available snapshots. + +
+
+ +
+
+ +**convert_to_mpeg:** `typing.Optional[bool]` — Whether to convert the audio to mpeg format. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ +
## TextToVoice Preview +
client.text_to_voice.preview.stream(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream a voice preview that was created via the /v1/text-to-voice/design endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_voice.preview.stream( + generated_voice_id="generated_voice_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**generated_voice_id:** `str` — The generated_voice_id to stream. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ ## User Subscription
client.user.subscription.get()
@@ -16386,7 +17732,7 @@ typing.List[core.File]` — See core.File for more documentation
-Update a PVC voice sample - apply noise removal, or select speaker. +Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name.
@@ -16473,6 +17819,14 @@ client.voices.pvc.samples.update(
+**file_name:** `typing.Optional[str]` — The name of the audio file to be used for PVC training. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -17222,6 +18576,85 @@ core.File` — See core.File for more documentation
## Voices Samples Audio +
client.voices.samples.audio.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the audio corresponding to a sample attached to a voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.voices.samples.audio.get( + voice_id="voice_id", + sample_id="sample_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ ## Workspace Groups
client.workspace.groups.search(...)
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 65e1e3bc..bb386ee0 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -59,6 +59,215 @@ AsrInputFormat, AsrProvider, AsrQuality, + AstAndOperatorNode, + AstAndOperatorNodeChildrenItem, + AstAndOperatorNodeChildrenItem_AndOperator, + AstAndOperatorNodeChildrenItem_BooleanLiteral, + AstAndOperatorNodeChildrenItem_DynamicVariable, + AstAndOperatorNodeChildrenItem_EqOperator, + AstAndOperatorNodeChildrenItem_GtOperator, + AstAndOperatorNodeChildrenItem_GteOperator, + AstAndOperatorNodeChildrenItem_Llm, + AstAndOperatorNodeChildrenItem_LtOperator, + AstAndOperatorNodeChildrenItem_LteOperator, + AstAndOperatorNodeChildrenItem_NeqOperator, + AstAndOperatorNodeChildrenItem_NumberLiteral, + AstAndOperatorNodeChildrenItem_OrOperator, + AstAndOperatorNodeChildrenItem_StringLiteral, + AstBooleanNode, + AstDynamicVariableNode, + AstEqualsOperatorNode, + AstEqualsOperatorNodeLeft, + AstEqualsOperatorNodeLeft_AndOperator, + AstEqualsOperatorNodeLeft_BooleanLiteral, + AstEqualsOperatorNodeLeft_DynamicVariable, + AstEqualsOperatorNodeLeft_EqOperator, + AstEqualsOperatorNodeLeft_GtOperator, + AstEqualsOperatorNodeLeft_GteOperator, + AstEqualsOperatorNodeLeft_Llm, + AstEqualsOperatorNodeLeft_LtOperator, + AstEqualsOperatorNodeLeft_LteOperator, + AstEqualsOperatorNodeLeft_NeqOperator, + AstEqualsOperatorNodeLeft_NumberLiteral, + AstEqualsOperatorNodeLeft_OrOperator, + AstEqualsOperatorNodeLeft_StringLiteral, + AstEqualsOperatorNodeRight, + AstEqualsOperatorNodeRight_AndOperator, + AstEqualsOperatorNodeRight_BooleanLiteral, + AstEqualsOperatorNodeRight_DynamicVariable, + AstEqualsOperatorNodeRight_EqOperator, + AstEqualsOperatorNodeRight_GtOperator, + AstEqualsOperatorNodeRight_GteOperator, + AstEqualsOperatorNodeRight_Llm, + AstEqualsOperatorNodeRight_LtOperator, + AstEqualsOperatorNodeRight_LteOperator, + AstEqualsOperatorNodeRight_NeqOperator, + AstEqualsOperatorNodeRight_NumberLiteral, + AstEqualsOperatorNodeRight_OrOperator, + AstEqualsOperatorNodeRight_StringLiteral, + AstGreaterThanOperatorNode, + AstGreaterThanOperatorNodeLeft, + AstGreaterThanOperatorNodeLeft_AndOperator, + AstGreaterThanOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOperatorNodeLeft_DynamicVariable, + AstGreaterThanOperatorNodeLeft_EqOperator, + AstGreaterThanOperatorNodeLeft_GtOperator, + AstGreaterThanOperatorNodeLeft_GteOperator, + AstGreaterThanOperatorNodeLeft_Llm, + AstGreaterThanOperatorNodeLeft_LtOperator, + AstGreaterThanOperatorNodeLeft_LteOperator, + AstGreaterThanOperatorNodeLeft_NeqOperator, + AstGreaterThanOperatorNodeLeft_NumberLiteral, + AstGreaterThanOperatorNodeLeft_OrOperator, + AstGreaterThanOperatorNodeLeft_StringLiteral, + AstGreaterThanOperatorNodeRight, + AstGreaterThanOperatorNodeRight_AndOperator, + AstGreaterThanOperatorNodeRight_BooleanLiteral, + AstGreaterThanOperatorNodeRight_DynamicVariable, + AstGreaterThanOperatorNodeRight_EqOperator, + AstGreaterThanOperatorNodeRight_GtOperator, + AstGreaterThanOperatorNodeRight_GteOperator, + AstGreaterThanOperatorNodeRight_Llm, + AstGreaterThanOperatorNodeRight_LtOperator, + AstGreaterThanOperatorNodeRight_LteOperator, + AstGreaterThanOperatorNodeRight_NeqOperator, + AstGreaterThanOperatorNodeRight_NumberLiteral, + AstGreaterThanOperatorNodeRight_OrOperator, + AstGreaterThanOperatorNodeRight_StringLiteral, + AstGreaterThanOrEqualsOperatorNode, + AstGreaterThanOrEqualsOperatorNodeLeft, + AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, + AstGreaterThanOrEqualsOperatorNodeRight, + AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_Llm, + AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, + AstLessThanOperatorNode, + AstLessThanOperatorNodeLeft, + AstLessThanOperatorNodeLeft_AndOperator, + AstLessThanOperatorNodeLeft_BooleanLiteral, + AstLessThanOperatorNodeLeft_DynamicVariable, + AstLessThanOperatorNodeLeft_EqOperator, + AstLessThanOperatorNodeLeft_GtOperator, + AstLessThanOperatorNodeLeft_GteOperator, + AstLessThanOperatorNodeLeft_Llm, + AstLessThanOperatorNodeLeft_LtOperator, + AstLessThanOperatorNodeLeft_LteOperator, + AstLessThanOperatorNodeLeft_NeqOperator, + AstLessThanOperatorNodeLeft_NumberLiteral, + AstLessThanOperatorNodeLeft_OrOperator, + AstLessThanOperatorNodeLeft_StringLiteral, + AstLessThanOperatorNodeRight, + AstLessThanOperatorNodeRight_AndOperator, + AstLessThanOperatorNodeRight_BooleanLiteral, + AstLessThanOperatorNodeRight_DynamicVariable, + AstLessThanOperatorNodeRight_EqOperator, + AstLessThanOperatorNodeRight_GtOperator, + AstLessThanOperatorNodeRight_GteOperator, + AstLessThanOperatorNodeRight_Llm, + AstLessThanOperatorNodeRight_LtOperator, + AstLessThanOperatorNodeRight_LteOperator, + AstLessThanOperatorNodeRight_NeqOperator, + AstLessThanOperatorNodeRight_NumberLiteral, + AstLessThanOperatorNodeRight_OrOperator, + AstLessThanOperatorNodeRight_StringLiteral, + AstLessThanOrEqualsOperatorNode, + AstLessThanOrEqualsOperatorNodeLeft, + AstLessThanOrEqualsOperatorNodeLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeLeft_Llm, + AstLessThanOrEqualsOperatorNodeLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, + AstLessThanOrEqualsOperatorNodeRight, + AstLessThanOrEqualsOperatorNodeRight_AndOperator, + AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeRight_EqOperator, + AstLessThanOrEqualsOperatorNodeRight_GtOperator, + AstLessThanOrEqualsOperatorNodeRight_GteOperator, + AstLessThanOrEqualsOperatorNodeRight_Llm, + AstLessThanOrEqualsOperatorNodeRight_LtOperator, + AstLessThanOrEqualsOperatorNodeRight_LteOperator, + AstLessThanOrEqualsOperatorNodeRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeRight_OrOperator, + AstLessThanOrEqualsOperatorNodeRight_StringLiteral, + AstNotEqualsOperatorNode, + AstNotEqualsOperatorNodeLeft, + AstNotEqualsOperatorNodeLeft_AndOperator, + AstNotEqualsOperatorNodeLeft_BooleanLiteral, + AstNotEqualsOperatorNodeLeft_DynamicVariable, + AstNotEqualsOperatorNodeLeft_EqOperator, + AstNotEqualsOperatorNodeLeft_GtOperator, + AstNotEqualsOperatorNodeLeft_GteOperator, + AstNotEqualsOperatorNodeLeft_Llm, + AstNotEqualsOperatorNodeLeft_LtOperator, + AstNotEqualsOperatorNodeLeft_LteOperator, + AstNotEqualsOperatorNodeLeft_NeqOperator, + AstNotEqualsOperatorNodeLeft_NumberLiteral, + AstNotEqualsOperatorNodeLeft_OrOperator, + AstNotEqualsOperatorNodeLeft_StringLiteral, + AstNotEqualsOperatorNodeRight, + AstNotEqualsOperatorNodeRight_AndOperator, + AstNotEqualsOperatorNodeRight_BooleanLiteral, + AstNotEqualsOperatorNodeRight_DynamicVariable, + AstNotEqualsOperatorNodeRight_EqOperator, + AstNotEqualsOperatorNodeRight_GtOperator, + AstNotEqualsOperatorNodeRight_GteOperator, + AstNotEqualsOperatorNodeRight_Llm, + AstNotEqualsOperatorNodeRight_LtOperator, + AstNotEqualsOperatorNodeRight_LteOperator, + AstNotEqualsOperatorNodeRight_NeqOperator, + AstNotEqualsOperatorNodeRight_NumberLiteral, + AstNotEqualsOperatorNodeRight_OrOperator, + AstNotEqualsOperatorNodeRight_StringLiteral, + AstNumberNode, + AstOrOperatorNode, + AstOrOperatorNodeChildrenItem, + AstOrOperatorNodeChildrenItem_AndOperator, + AstOrOperatorNodeChildrenItem_BooleanLiteral, + AstOrOperatorNodeChildrenItem_DynamicVariable, + AstOrOperatorNodeChildrenItem_EqOperator, + AstOrOperatorNodeChildrenItem_GtOperator, + AstOrOperatorNodeChildrenItem_GteOperator, + AstOrOperatorNodeChildrenItem_Llm, + AstOrOperatorNodeChildrenItem_LtOperator, + AstOrOperatorNodeChildrenItem_LteOperator, + AstOrOperatorNodeChildrenItem_NeqOperator, + AstOrOperatorNodeChildrenItem_NumberLiteral, + AstOrOperatorNodeChildrenItem_OrOperator, + AstOrOperatorNodeChildrenItem_StringLiteral, + AstStringNode, + AstllmNode, AttachedTestModel, AudioNativeCreateProjectResponseModel, AudioNativeEditContentResponseModel, @@ -377,6 +586,7 @@ GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, GetPronunciationDictionaryResponse, GetSpeechHistoryResponse, + GetTestInvocationsPageResponseModel, GetTestSuiteInvocationResponseModel, GetTestsPageResponseModel, GetTestsSummariesByIdsResponseModel, @@ -418,6 +628,7 @@ LibraryVoiceResponse, LibraryVoiceResponseModelCategory, ListMcpToolsResponseModel, + ListResponseMeta, LiteralJsonSchemaProperty, LiteralJsonSchemaPropertyConstantValue, LiteralJsonSchemaPropertyType, @@ -657,6 +868,9 @@ TelephonyProvider, TestConditionRationaleCommonModel, TestConditionResultCommonModel, + TestFromConversationMetadataInput, + TestFromConversationMetadataOutput, + TestInvocationSummaryResponseModel, TestRunMetadata, TestRunMetadataTestType, TestRunStatus, @@ -664,6 +878,7 @@ TestsFeatureUsageCommonModel, TextToSpeechApplyTextNormalizationEnum, TextToSpeechOutputFormatEnum, + TextToSpeechRequest, TextToSpeechStreamRequest, TextToSpeechStreamWithTimestampsRequest, TextToSpeechWithTimestampsRequest, @@ -792,14 +1007,31 @@ WidgetTextContents, WorkflowEdgeModel, WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Expression, WorkflowEdgeModelBackwardCondition_Llm, WorkflowEdgeModelBackwardCondition_Result, WorkflowEdgeModelBackwardCondition_Unconditional, WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Expression, WorkflowEdgeModelForwardCondition_Llm, WorkflowEdgeModelForwardCondition_Result, WorkflowEdgeModelForwardCondition_Unconditional, WorkflowEndNodeModel, + WorkflowExpressionConditionModel, + WorkflowExpressionConditionModelExpression, + WorkflowExpressionConditionModelExpression_AndOperator, + WorkflowExpressionConditionModelExpression_BooleanLiteral, + WorkflowExpressionConditionModelExpression_DynamicVariable, + WorkflowExpressionConditionModelExpression_EqOperator, + WorkflowExpressionConditionModelExpression_GtOperator, + WorkflowExpressionConditionModelExpression_GteOperator, + WorkflowExpressionConditionModelExpression_Llm, + WorkflowExpressionConditionModelExpression_LtOperator, + WorkflowExpressionConditionModelExpression_LteOperator, + WorkflowExpressionConditionModelExpression_NeqOperator, + WorkflowExpressionConditionModelExpression_NumberLiteral, + WorkflowExpressionConditionModelExpression_OrOperator, + WorkflowExpressionConditionModelExpression_StringLiteral, WorkflowFeaturesUsageCommonModel, WorkflowLlmConditionModel, WorkflowOverrideAgentNodeModel, @@ -881,6 +1113,7 @@ from .audio_native import AudioNativeCreateRequestApplyTextNormalization from .client import AsyncElevenLabs, ElevenLabs from .dubbing import ( + DubbingCreateRequestMode, DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator, DubbingListRequestOrderDirection, @@ -914,6 +1147,7 @@ SpeechToTextConvertResponse, ) from .studio import ( + BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization, BodyCreatePodcastV1StudioPodcastsPostDurationScale, BodyCreatePodcastV1StudioPodcastsPostMode, BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, @@ -932,10 +1166,10 @@ ) from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat from .text_to_speech import ( + BodyTextToSpeechFullApplyTextNormalization, BodyTextToSpeechFullWithTimestampsApplyTextNormalization, + BodyTextToSpeechStreamApplyTextNormalization, BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, TextToSpeechConvertRequestOutputFormat, TextToSpeechConvertWithTimestampsRequestOutputFormat, TextToSpeechStreamRequestOutputFormat, @@ -1004,6 +1238,215 @@ "AsrInputFormat": ".types", "AsrProvider": ".types", "AsrQuality": ".types", + "AstAndOperatorNode": ".types", + "AstAndOperatorNodeChildrenItem": ".types", + "AstAndOperatorNodeChildrenItem_AndOperator": ".types", + "AstAndOperatorNodeChildrenItem_BooleanLiteral": ".types", + "AstAndOperatorNodeChildrenItem_DynamicVariable": ".types", + "AstAndOperatorNodeChildrenItem_EqOperator": ".types", + "AstAndOperatorNodeChildrenItem_GtOperator": ".types", + "AstAndOperatorNodeChildrenItem_GteOperator": ".types", + "AstAndOperatorNodeChildrenItem_Llm": ".types", + "AstAndOperatorNodeChildrenItem_LtOperator": ".types", + "AstAndOperatorNodeChildrenItem_LteOperator": ".types", + "AstAndOperatorNodeChildrenItem_NeqOperator": ".types", + "AstAndOperatorNodeChildrenItem_NumberLiteral": ".types", + "AstAndOperatorNodeChildrenItem_OrOperator": ".types", + "AstAndOperatorNodeChildrenItem_StringLiteral": ".types", + "AstBooleanNode": ".types", + "AstDynamicVariableNode": ".types", + "AstEqualsOperatorNode": ".types", + "AstEqualsOperatorNodeLeft": ".types", + "AstEqualsOperatorNodeLeft_AndOperator": ".types", + "AstEqualsOperatorNodeLeft_BooleanLiteral": ".types", + "AstEqualsOperatorNodeLeft_DynamicVariable": ".types", + "AstEqualsOperatorNodeLeft_EqOperator": ".types", + "AstEqualsOperatorNodeLeft_GtOperator": ".types", + "AstEqualsOperatorNodeLeft_GteOperator": ".types", + "AstEqualsOperatorNodeLeft_Llm": ".types", + "AstEqualsOperatorNodeLeft_LtOperator": ".types", + "AstEqualsOperatorNodeLeft_LteOperator": ".types", + "AstEqualsOperatorNodeLeft_NeqOperator": ".types", + "AstEqualsOperatorNodeLeft_NumberLiteral": ".types", + "AstEqualsOperatorNodeLeft_OrOperator": ".types", + "AstEqualsOperatorNodeLeft_StringLiteral": ".types", + "AstEqualsOperatorNodeRight": ".types", + "AstEqualsOperatorNodeRight_AndOperator": ".types", + "AstEqualsOperatorNodeRight_BooleanLiteral": ".types", + "AstEqualsOperatorNodeRight_DynamicVariable": ".types", + "AstEqualsOperatorNodeRight_EqOperator": ".types", + "AstEqualsOperatorNodeRight_GtOperator": ".types", + "AstEqualsOperatorNodeRight_GteOperator": ".types", + "AstEqualsOperatorNodeRight_Llm": ".types", + "AstEqualsOperatorNodeRight_LtOperator": ".types", + "AstEqualsOperatorNodeRight_LteOperator": ".types", + "AstEqualsOperatorNodeRight_NeqOperator": ".types", + "AstEqualsOperatorNodeRight_NumberLiteral": ".types", + "AstEqualsOperatorNodeRight_OrOperator": ".types", + "AstEqualsOperatorNodeRight_StringLiteral": ".types", + "AstGreaterThanOperatorNode": ".types", + "AstGreaterThanOperatorNodeLeft": ".types", + "AstGreaterThanOperatorNodeLeft_AndOperator": ".types", + "AstGreaterThanOperatorNodeLeft_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeLeft_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeLeft_EqOperator": ".types", + "AstGreaterThanOperatorNodeLeft_GtOperator": ".types", + "AstGreaterThanOperatorNodeLeft_GteOperator": ".types", + "AstGreaterThanOperatorNodeLeft_Llm": ".types", + "AstGreaterThanOperatorNodeLeft_LtOperator": ".types", + "AstGreaterThanOperatorNodeLeft_LteOperator": ".types", + "AstGreaterThanOperatorNodeLeft_NeqOperator": ".types", + "AstGreaterThanOperatorNodeLeft_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeLeft_OrOperator": ".types", + "AstGreaterThanOperatorNodeLeft_StringLiteral": ".types", + "AstGreaterThanOperatorNodeRight": ".types", + "AstGreaterThanOperatorNodeRight_AndOperator": ".types", + "AstGreaterThanOperatorNodeRight_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeRight_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeRight_EqOperator": ".types", + "AstGreaterThanOperatorNodeRight_GtOperator": ".types", + "AstGreaterThanOperatorNodeRight_GteOperator": ".types", + "AstGreaterThanOperatorNodeRight_Llm": ".types", + "AstGreaterThanOperatorNodeRight_LtOperator": ".types", + "AstGreaterThanOperatorNodeRight_LteOperator": ".types", + "AstGreaterThanOperatorNodeRight_NeqOperator": ".types", + "AstGreaterThanOperatorNodeRight_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeRight_OrOperator": ".types", + "AstGreaterThanOperatorNodeRight_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNode": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral": ".types", + "AstLessThanOperatorNode": ".types", + "AstLessThanOperatorNodeLeft": ".types", + "AstLessThanOperatorNodeLeft_AndOperator": ".types", + "AstLessThanOperatorNodeLeft_BooleanLiteral": ".types", + "AstLessThanOperatorNodeLeft_DynamicVariable": ".types", + "AstLessThanOperatorNodeLeft_EqOperator": ".types", + "AstLessThanOperatorNodeLeft_GtOperator": ".types", + "AstLessThanOperatorNodeLeft_GteOperator": ".types", + "AstLessThanOperatorNodeLeft_Llm": ".types", + "AstLessThanOperatorNodeLeft_LtOperator": ".types", + "AstLessThanOperatorNodeLeft_LteOperator": ".types", + "AstLessThanOperatorNodeLeft_NeqOperator": ".types", + "AstLessThanOperatorNodeLeft_NumberLiteral": ".types", + "AstLessThanOperatorNodeLeft_OrOperator": ".types", + "AstLessThanOperatorNodeLeft_StringLiteral": ".types", + "AstLessThanOperatorNodeRight": ".types", + "AstLessThanOperatorNodeRight_AndOperator": ".types", + "AstLessThanOperatorNodeRight_BooleanLiteral": ".types", + "AstLessThanOperatorNodeRight_DynamicVariable": ".types", + "AstLessThanOperatorNodeRight_EqOperator": ".types", + "AstLessThanOperatorNodeRight_GtOperator": ".types", + "AstLessThanOperatorNodeRight_GteOperator": ".types", + "AstLessThanOperatorNodeRight_Llm": ".types", + "AstLessThanOperatorNodeRight_LtOperator": ".types", + "AstLessThanOperatorNodeRight_LteOperator": ".types", + "AstLessThanOperatorNodeRight_NeqOperator": ".types", + "AstLessThanOperatorNodeRight_NumberLiteral": ".types", + "AstLessThanOperatorNodeRight_OrOperator": ".types", + "AstLessThanOperatorNodeRight_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNode": ".types", + "AstLessThanOrEqualsOperatorNodeLeft": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeRight": ".types", + "AstLessThanOrEqualsOperatorNodeRight_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeRight_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeRight_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeRight_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeRight_StringLiteral": ".types", + "AstNotEqualsOperatorNode": ".types", + "AstNotEqualsOperatorNodeLeft": ".types", + "AstNotEqualsOperatorNodeLeft_AndOperator": ".types", + "AstNotEqualsOperatorNodeLeft_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeLeft_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeLeft_EqOperator": ".types", + "AstNotEqualsOperatorNodeLeft_GtOperator": ".types", + "AstNotEqualsOperatorNodeLeft_GteOperator": ".types", + "AstNotEqualsOperatorNodeLeft_Llm": ".types", + "AstNotEqualsOperatorNodeLeft_LtOperator": ".types", + "AstNotEqualsOperatorNodeLeft_LteOperator": ".types", + "AstNotEqualsOperatorNodeLeft_NeqOperator": ".types", + "AstNotEqualsOperatorNodeLeft_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeLeft_OrOperator": ".types", + "AstNotEqualsOperatorNodeLeft_StringLiteral": ".types", + "AstNotEqualsOperatorNodeRight": ".types", + "AstNotEqualsOperatorNodeRight_AndOperator": ".types", + "AstNotEqualsOperatorNodeRight_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeRight_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeRight_EqOperator": ".types", + "AstNotEqualsOperatorNodeRight_GtOperator": ".types", + "AstNotEqualsOperatorNodeRight_GteOperator": ".types", + "AstNotEqualsOperatorNodeRight_Llm": ".types", + "AstNotEqualsOperatorNodeRight_LtOperator": ".types", + "AstNotEqualsOperatorNodeRight_LteOperator": ".types", + "AstNotEqualsOperatorNodeRight_NeqOperator": ".types", + "AstNotEqualsOperatorNodeRight_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeRight_OrOperator": ".types", + "AstNotEqualsOperatorNodeRight_StringLiteral": ".types", + "AstNumberNode": ".types", + "AstOrOperatorNode": ".types", + "AstOrOperatorNodeChildrenItem": ".types", + "AstOrOperatorNodeChildrenItem_AndOperator": ".types", + "AstOrOperatorNodeChildrenItem_BooleanLiteral": ".types", + "AstOrOperatorNodeChildrenItem_DynamicVariable": ".types", + "AstOrOperatorNodeChildrenItem_EqOperator": ".types", + "AstOrOperatorNodeChildrenItem_GtOperator": ".types", + "AstOrOperatorNodeChildrenItem_GteOperator": ".types", + "AstOrOperatorNodeChildrenItem_Llm": ".types", + "AstOrOperatorNodeChildrenItem_LtOperator": ".types", + "AstOrOperatorNodeChildrenItem_LteOperator": ".types", + "AstOrOperatorNodeChildrenItem_NeqOperator": ".types", + "AstOrOperatorNodeChildrenItem_NumberLiteral": ".types", + "AstOrOperatorNodeChildrenItem_OrOperator": ".types", + "AstOrOperatorNodeChildrenItem_StringLiteral": ".types", + "AstStringNode": ".types", + "AstllmNode": ".types", "AsyncElevenLabs": ".client", "AttachedTestModel": ".types", "AudioIsolationConvertRequestFileFormat": ".audio_isolation", @@ -1030,6 +1473,7 @@ "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias": ".pronunciation_dictionaries", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme": ".pronunciation_dictionaries", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess": ".pronunciation_dictionaries", + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization": ".studio", "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".studio", "BodyCreatePodcastV1StudioPodcastsPostMode": ".studio", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".studio", @@ -1043,10 +1487,10 @@ "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender": ".types", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".text_to_dialogue", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".text_to_dialogue", + "BodyTextToSpeechFullApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".text_to_speech", + "BodyTextToSpeechStreamApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".text_to_speech", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".text_to_speech", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".text_to_speech", "BreakdownTypes": ".types", "BuiltInToolsInput": ".types", "BuiltInToolsOutput": ".types", @@ -1235,6 +1679,7 @@ "DocumentUsageModeEnum": ".types", "DocxExportOptions": ".types", "DubbedSegment": ".types", + "DubbingCreateRequestMode": ".dubbing", "DubbingListRequestDubbingStatus": ".dubbing", "DubbingListRequestFilterByCreator": ".dubbing", "DubbingListRequestOrderDirection": ".dubbing", @@ -1352,6 +1797,7 @@ "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource": ".types", "GetPronunciationDictionaryResponse": ".types", "GetSpeechHistoryResponse": ".types", + "GetTestInvocationsPageResponseModel": ".types", "GetTestSuiteInvocationResponseModel": ".types", "GetTestsPageResponseModel": ".types", "GetTestsSummariesByIdsResponseModel": ".types", @@ -1395,6 +1841,7 @@ "LibraryVoiceResponse": ".types", "LibraryVoiceResponseModelCategory": ".types", "ListMcpToolsResponseModel": ".types", + "ListResponseMeta": ".types", "LiteralJsonSchemaProperty": ".types", "LiteralJsonSchemaPropertyConstantValue": ".types", "LiteralJsonSchemaPropertyType": ".types", @@ -1652,6 +2099,9 @@ "TelephonyProvider": ".types", "TestConditionRationaleCommonModel": ".types", "TestConditionResultCommonModel": ".types", + "TestFromConversationMetadataInput": ".types", + "TestFromConversationMetadataOutput": ".types", + "TestInvocationSummaryResponseModel": ".types", "TestRunMetadata": ".types", "TestRunMetadataTestType": ".types", "TestRunStatus": ".types", @@ -1664,6 +2114,7 @@ "TextToSpeechConvertRequestOutputFormat": ".text_to_speech", "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".text_to_speech", "TextToSpeechOutputFormatEnum": ".types", + "TextToSpeechRequest": ".types", "TextToSpeechStreamRequest": ".types", "TextToSpeechStreamRequestOutputFormat": ".text_to_speech", "TextToSpeechStreamWithTimestampsRequest": ".types", @@ -1802,14 +2253,31 @@ "WidgetTextContents": ".types", "WorkflowEdgeModel": ".types", "WorkflowEdgeModelBackwardCondition": ".types", + "WorkflowEdgeModelBackwardCondition_Expression": ".types", "WorkflowEdgeModelBackwardCondition_Llm": ".types", "WorkflowEdgeModelBackwardCondition_Result": ".types", "WorkflowEdgeModelBackwardCondition_Unconditional": ".types", "WorkflowEdgeModelForwardCondition": ".types", + "WorkflowEdgeModelForwardCondition_Expression": ".types", "WorkflowEdgeModelForwardCondition_Llm": ".types", "WorkflowEdgeModelForwardCondition_Result": ".types", "WorkflowEdgeModelForwardCondition_Unconditional": ".types", "WorkflowEndNodeModel": ".types", + "WorkflowExpressionConditionModel": ".types", + "WorkflowExpressionConditionModelExpression": ".types", + "WorkflowExpressionConditionModelExpression_AndOperator": ".types", + "WorkflowExpressionConditionModelExpression_BooleanLiteral": ".types", + "WorkflowExpressionConditionModelExpression_DynamicVariable": ".types", + "WorkflowExpressionConditionModelExpression_EqOperator": ".types", + "WorkflowExpressionConditionModelExpression_GtOperator": ".types", + "WorkflowExpressionConditionModelExpression_GteOperator": ".types", + "WorkflowExpressionConditionModelExpression_Llm": ".types", + "WorkflowExpressionConditionModelExpression_LtOperator": ".types", + "WorkflowExpressionConditionModelExpression_LteOperator": ".types", + "WorkflowExpressionConditionModelExpression_NeqOperator": ".types", + "WorkflowExpressionConditionModelExpression_NumberLiteral": ".types", + "WorkflowExpressionConditionModelExpression_OrOperator": ".types", + "WorkflowExpressionConditionModelExpression_StringLiteral": ".types", "WorkflowFeaturesUsageCommonModel": ".types", "WorkflowLlmConditionModel": ".types", "WorkflowOverrideAgentNodeModel": ".types", @@ -1955,6 +2423,215 @@ def __dir__(): "AsrInputFormat", "AsrProvider", "AsrQuality", + "AstAndOperatorNode", + "AstAndOperatorNodeChildrenItem", + "AstAndOperatorNodeChildrenItem_AndOperator", + "AstAndOperatorNodeChildrenItem_BooleanLiteral", + "AstAndOperatorNodeChildrenItem_DynamicVariable", + "AstAndOperatorNodeChildrenItem_EqOperator", + "AstAndOperatorNodeChildrenItem_GtOperator", + "AstAndOperatorNodeChildrenItem_GteOperator", + "AstAndOperatorNodeChildrenItem_Llm", + "AstAndOperatorNodeChildrenItem_LtOperator", + "AstAndOperatorNodeChildrenItem_LteOperator", + "AstAndOperatorNodeChildrenItem_NeqOperator", + "AstAndOperatorNodeChildrenItem_NumberLiteral", + "AstAndOperatorNodeChildrenItem_OrOperator", + "AstAndOperatorNodeChildrenItem_StringLiteral", + "AstBooleanNode", + "AstDynamicVariableNode", + "AstEqualsOperatorNode", + "AstEqualsOperatorNodeLeft", + "AstEqualsOperatorNodeLeft_AndOperator", + "AstEqualsOperatorNodeLeft_BooleanLiteral", + "AstEqualsOperatorNodeLeft_DynamicVariable", + "AstEqualsOperatorNodeLeft_EqOperator", + "AstEqualsOperatorNodeLeft_GtOperator", + "AstEqualsOperatorNodeLeft_GteOperator", + "AstEqualsOperatorNodeLeft_Llm", + "AstEqualsOperatorNodeLeft_LtOperator", + "AstEqualsOperatorNodeLeft_LteOperator", + "AstEqualsOperatorNodeLeft_NeqOperator", + "AstEqualsOperatorNodeLeft_NumberLiteral", + "AstEqualsOperatorNodeLeft_OrOperator", + "AstEqualsOperatorNodeLeft_StringLiteral", + "AstEqualsOperatorNodeRight", + "AstEqualsOperatorNodeRight_AndOperator", + "AstEqualsOperatorNodeRight_BooleanLiteral", + "AstEqualsOperatorNodeRight_DynamicVariable", + "AstEqualsOperatorNodeRight_EqOperator", + "AstEqualsOperatorNodeRight_GtOperator", + "AstEqualsOperatorNodeRight_GteOperator", + "AstEqualsOperatorNodeRight_Llm", + "AstEqualsOperatorNodeRight_LtOperator", + "AstEqualsOperatorNodeRight_LteOperator", + "AstEqualsOperatorNodeRight_NeqOperator", + "AstEqualsOperatorNodeRight_NumberLiteral", + "AstEqualsOperatorNodeRight_OrOperator", + "AstEqualsOperatorNodeRight_StringLiteral", + "AstGreaterThanOperatorNode", + "AstGreaterThanOperatorNodeLeft", + "AstGreaterThanOperatorNodeLeft_AndOperator", + "AstGreaterThanOperatorNodeLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeLeft_DynamicVariable", + "AstGreaterThanOperatorNodeLeft_EqOperator", + "AstGreaterThanOperatorNodeLeft_GtOperator", + "AstGreaterThanOperatorNodeLeft_GteOperator", + "AstGreaterThanOperatorNodeLeft_Llm", + "AstGreaterThanOperatorNodeLeft_LtOperator", + "AstGreaterThanOperatorNodeLeft_LteOperator", + "AstGreaterThanOperatorNodeLeft_NeqOperator", + "AstGreaterThanOperatorNodeLeft_NumberLiteral", + "AstGreaterThanOperatorNodeLeft_OrOperator", + "AstGreaterThanOperatorNodeLeft_StringLiteral", + "AstGreaterThanOperatorNodeRight", + "AstGreaterThanOperatorNodeRight_AndOperator", + "AstGreaterThanOperatorNodeRight_BooleanLiteral", + "AstGreaterThanOperatorNodeRight_DynamicVariable", + "AstGreaterThanOperatorNodeRight_EqOperator", + "AstGreaterThanOperatorNodeRight_GtOperator", + "AstGreaterThanOperatorNodeRight_GteOperator", + "AstGreaterThanOperatorNodeRight_Llm", + "AstGreaterThanOperatorNodeRight_LtOperator", + "AstGreaterThanOperatorNodeRight_LteOperator", + "AstGreaterThanOperatorNodeRight_NeqOperator", + "AstGreaterThanOperatorNodeRight_NumberLiteral", + "AstGreaterThanOperatorNodeRight_OrOperator", + "AstGreaterThanOperatorNodeRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNode", + "AstGreaterThanOrEqualsOperatorNodeLeft", + "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight", + "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral", + "AstLessThanOperatorNode", + "AstLessThanOperatorNodeLeft", + "AstLessThanOperatorNodeLeft_AndOperator", + "AstLessThanOperatorNodeLeft_BooleanLiteral", + "AstLessThanOperatorNodeLeft_DynamicVariable", + "AstLessThanOperatorNodeLeft_EqOperator", + "AstLessThanOperatorNodeLeft_GtOperator", + "AstLessThanOperatorNodeLeft_GteOperator", + "AstLessThanOperatorNodeLeft_Llm", + "AstLessThanOperatorNodeLeft_LtOperator", + "AstLessThanOperatorNodeLeft_LteOperator", + "AstLessThanOperatorNodeLeft_NeqOperator", + "AstLessThanOperatorNodeLeft_NumberLiteral", + "AstLessThanOperatorNodeLeft_OrOperator", + "AstLessThanOperatorNodeLeft_StringLiteral", + "AstLessThanOperatorNodeRight", + "AstLessThanOperatorNodeRight_AndOperator", + "AstLessThanOperatorNodeRight_BooleanLiteral", + "AstLessThanOperatorNodeRight_DynamicVariable", + "AstLessThanOperatorNodeRight_EqOperator", + "AstLessThanOperatorNodeRight_GtOperator", + "AstLessThanOperatorNodeRight_GteOperator", + "AstLessThanOperatorNodeRight_Llm", + "AstLessThanOperatorNodeRight_LtOperator", + "AstLessThanOperatorNodeRight_LteOperator", + "AstLessThanOperatorNodeRight_NeqOperator", + "AstLessThanOperatorNodeRight_NumberLiteral", + "AstLessThanOperatorNodeRight_OrOperator", + "AstLessThanOperatorNodeRight_StringLiteral", + "AstLessThanOrEqualsOperatorNode", + "AstLessThanOrEqualsOperatorNodeLeft", + "AstLessThanOrEqualsOperatorNodeLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeLeft_Llm", + "AstLessThanOrEqualsOperatorNodeLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeRight", + "AstLessThanOrEqualsOperatorNodeRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeRight_Llm", + "AstLessThanOrEqualsOperatorNodeRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeRight_StringLiteral", + "AstNotEqualsOperatorNode", + "AstNotEqualsOperatorNodeLeft", + "AstNotEqualsOperatorNodeLeft_AndOperator", + "AstNotEqualsOperatorNodeLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeLeft_DynamicVariable", + "AstNotEqualsOperatorNodeLeft_EqOperator", + "AstNotEqualsOperatorNodeLeft_GtOperator", + "AstNotEqualsOperatorNodeLeft_GteOperator", + "AstNotEqualsOperatorNodeLeft_Llm", + "AstNotEqualsOperatorNodeLeft_LtOperator", + "AstNotEqualsOperatorNodeLeft_LteOperator", + "AstNotEqualsOperatorNodeLeft_NeqOperator", + "AstNotEqualsOperatorNodeLeft_NumberLiteral", + "AstNotEqualsOperatorNodeLeft_OrOperator", + "AstNotEqualsOperatorNodeLeft_StringLiteral", + "AstNotEqualsOperatorNodeRight", + "AstNotEqualsOperatorNodeRight_AndOperator", + "AstNotEqualsOperatorNodeRight_BooleanLiteral", + "AstNotEqualsOperatorNodeRight_DynamicVariable", + "AstNotEqualsOperatorNodeRight_EqOperator", + "AstNotEqualsOperatorNodeRight_GtOperator", + "AstNotEqualsOperatorNodeRight_GteOperator", + "AstNotEqualsOperatorNodeRight_Llm", + "AstNotEqualsOperatorNodeRight_LtOperator", + "AstNotEqualsOperatorNodeRight_LteOperator", + "AstNotEqualsOperatorNodeRight_NeqOperator", + "AstNotEqualsOperatorNodeRight_NumberLiteral", + "AstNotEqualsOperatorNodeRight_OrOperator", + "AstNotEqualsOperatorNodeRight_StringLiteral", + "AstNumberNode", + "AstOrOperatorNode", + "AstOrOperatorNodeChildrenItem", + "AstOrOperatorNodeChildrenItem_AndOperator", + "AstOrOperatorNodeChildrenItem_BooleanLiteral", + "AstOrOperatorNodeChildrenItem_DynamicVariable", + "AstOrOperatorNodeChildrenItem_EqOperator", + "AstOrOperatorNodeChildrenItem_GtOperator", + "AstOrOperatorNodeChildrenItem_GteOperator", + "AstOrOperatorNodeChildrenItem_Llm", + "AstOrOperatorNodeChildrenItem_LtOperator", + "AstOrOperatorNodeChildrenItem_LteOperator", + "AstOrOperatorNodeChildrenItem_NeqOperator", + "AstOrOperatorNodeChildrenItem_NumberLiteral", + "AstOrOperatorNodeChildrenItem_OrOperator", + "AstOrOperatorNodeChildrenItem_StringLiteral", + "AstStringNode", + "AstllmNode", "AsyncElevenLabs", "AttachedTestModel", "AudioIsolationConvertRequestFileFormat", @@ -1981,6 +2658,7 @@ def __dir__(): "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Phoneme", "BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess", + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", @@ -1994,10 +2672,10 @@ def __dir__(): "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "BodyTextToSpeechFullApplyTextNormalization", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamApplyTextNormalization", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", @@ -2186,6 +2864,7 @@ def __dir__(): "DocumentUsageModeEnum", "DocxExportOptions", "DubbedSegment", + "DubbingCreateRequestMode", "DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", "DubbingListRequestOrderDirection", @@ -2303,6 +2982,7 @@ def __dir__(): "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", "GetSpeechHistoryResponse", + "GetTestInvocationsPageResponseModel", "GetTestSuiteInvocationResponseModel", "GetTestsPageResponseModel", "GetTestsSummariesByIdsResponseModel", @@ -2346,6 +3026,7 @@ def __dir__(): "LibraryVoiceResponse", "LibraryVoiceResponseModelCategory", "ListMcpToolsResponseModel", + "ListResponseMeta", "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", @@ -2603,6 +3284,9 @@ def __dir__(): "TelephonyProvider", "TestConditionRationaleCommonModel", "TestConditionResultCommonModel", + "TestFromConversationMetadataInput", + "TestFromConversationMetadataOutput", + "TestInvocationSummaryResponseModel", "TestRunMetadata", "TestRunMetadataTestType", "TestRunStatus", @@ -2615,6 +3299,7 @@ def __dir__(): "TextToSpeechConvertRequestOutputFormat", "TextToSpeechConvertWithTimestampsRequestOutputFormat", "TextToSpeechOutputFormatEnum", + "TextToSpeechRequest", "TextToSpeechStreamRequest", "TextToSpeechStreamRequestOutputFormat", "TextToSpeechStreamWithTimestampsRequest", @@ -2753,14 +3438,31 @@ def __dir__(): "WidgetTextContents", "WorkflowEdgeModel", "WorkflowEdgeModelBackwardCondition", + "WorkflowEdgeModelBackwardCondition_Expression", "WorkflowEdgeModelBackwardCondition_Llm", "WorkflowEdgeModelBackwardCondition_Result", "WorkflowEdgeModelBackwardCondition_Unconditional", "WorkflowEdgeModelForwardCondition", + "WorkflowEdgeModelForwardCondition_Expression", "WorkflowEdgeModelForwardCondition_Llm", "WorkflowEdgeModelForwardCondition_Result", "WorkflowEdgeModelForwardCondition_Unconditional", "WorkflowEndNodeModel", + "WorkflowExpressionConditionModel", + "WorkflowExpressionConditionModelExpression", + "WorkflowExpressionConditionModelExpression_AndOperator", + "WorkflowExpressionConditionModelExpression_BooleanLiteral", + "WorkflowExpressionConditionModelExpression_DynamicVariable", + "WorkflowExpressionConditionModelExpression_EqOperator", + "WorkflowExpressionConditionModelExpression_GtOperator", + "WorkflowExpressionConditionModelExpression_GteOperator", + "WorkflowExpressionConditionModelExpression_Llm", + "WorkflowExpressionConditionModelExpression_LtOperator", + "WorkflowExpressionConditionModelExpression_LteOperator", + "WorkflowExpressionConditionModelExpression_NeqOperator", + "WorkflowExpressionConditionModelExpression_NumberLiteral", + "WorkflowExpressionConditionModelExpression_OrOperator", + "WorkflowExpressionConditionModelExpression_StringLiteral", "WorkflowFeaturesUsageCommonModel", "WorkflowLlmConditionModel", "WorkflowOverrideAgentNodeModel", diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 923c365a..afa69350 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -277,7 +277,13 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.agents.list() + client.conversational_ai.agents.list( + page_size=1, + search="search", + sort_direction="asc", + sort_by="name", + cursor="cursor", + ) """ _response = self._raw_client.list( page_size=page_size, @@ -828,7 +834,13 @@ async def list( async def main() -> None: - await client.conversational_ai.agents.list() + await client.conversational_ai.agents.list( + page_size=1, + search="search", + sort_direction="asc", + sort_by="name", + cursor="cursor", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/agents/widget/client.py b/src/elevenlabs/conversational_ai/agents/widget/client.py index 478f877c..3ef8190d 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/client.py +++ b/src/elevenlabs/conversational_ai/agents/widget/client.py @@ -65,6 +65,7 @@ def get( ) client.conversational_ai.agents.widget.get( agent_id="21m00Tcm4TlvDq8ikWAM", + conversation_signature="conversation_signature", ) """ _response = self._raw_client.get( @@ -138,6 +139,7 @@ async def get( async def main() -> None: await client.conversational_ai.agents.widget.get( agent_id="21m00Tcm4TlvDq8ikWAM", + conversation_signature="conversation_signature", ) diff --git a/src/elevenlabs/conversational_ai/batch_calls/client.py b/src/elevenlabs/conversational_ai/batch_calls/client.py index 13891617..beee75f9 100644 --- a/src/elevenlabs/conversational_ai/batch_calls/client.py +++ b/src/elevenlabs/conversational_ai/batch_calls/client.py @@ -121,7 +121,10 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.batch_calls.list() + client.conversational_ai.batch_calls.list( + limit=1, + last_doc="last_doc", + ) """ _response = self._raw_client.list(limit=limit, last_doc=last_doc, request_options=request_options) return _response.data @@ -339,7 +342,10 @@ async def list( async def main() -> None: - await client.conversational_ai.batch_calls.list() + await client.conversational_ai.batch_calls.list( + limit=1, + last_doc="last_doc", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py index 61857e7b..07172c6e 100644 --- a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py +++ b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py @@ -65,10 +65,10 @@ def create( "call_name": call_name, "agent_id": agent_id, "agent_phone_number_id": agent_phone_number_id, - "scheduled_time_unix": scheduled_time_unix, "recipients": convert_and_respect_annotation_metadata( object_=recipients, annotation=typing.Sequence[OutboundCallRecipient], direction="write" ), + "scheduled_time_unix": scheduled_time_unix, }, headers={ "content-type": "application/json", @@ -353,10 +353,10 @@ async def create( "call_name": call_name, "agent_id": agent_id, "agent_phone_number_id": agent_phone_number_id, - "scheduled_time_unix": scheduled_time_unix, "recipients": convert_and_respect_annotation_metadata( object_=recipients, annotation=typing.Sequence[OutboundCallRecipient], direction="write" ), + "scheduled_time_unix": scheduled_time_unix, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py index 365aae15..042f2a7a 100644 --- a/src/elevenlabs/conversational_ai/client.py +++ b/src/elevenlabs/conversational_ai/client.py @@ -103,7 +103,9 @@ def add_to_knowledge_base( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.add_to_knowledge_base() + client.conversational_ai.add_to_knowledge_base( + agent_id="agent_id", + ) """ _response = self._raw_client.add_to_knowledge_base( agent_id=agent_id, name=name, url=url, file=file, request_options=request_options @@ -436,7 +438,9 @@ async def add_to_knowledge_base( async def main() -> None: - await client.conversational_ai.add_to_knowledge_base() + await client.conversational_ai.add_to_knowledge_base( + agent_id="agent_id", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/conversations/audio/client.py b/src/elevenlabs/conversational_ai/conversations/audio/client.py index 5a1ae56f..3c329fc0 100644 --- a/src/elevenlabs/conversational_ai/conversations/audio/client.py +++ b/src/elevenlabs/conversational_ai/conversations/audio/client.py @@ -40,6 +40,17 @@ def get( ------- typing.Iterator[bytes] Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.conversations.audio.get( + conversation_id="conversation_id", + ) """ with self._raw_client.get(conversation_id, request_options=request_options) as r: yield from r.data @@ -78,6 +89,25 @@ async def get( ------- typing.AsyncIterator[bytes] Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.conversations.audio.get( + conversation_id="conversation_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.get(conversation_id, request_options=request_options) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index fa353585..e112861b 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -72,6 +72,7 @@ def get_signed_url( ) client.conversational_ai.conversations.get_signed_url( agent_id="21m00Tcm4TlvDq8ikWAM", + include_conversation_id=True, ) """ _response = self._raw_client.get_signed_url( @@ -114,6 +115,7 @@ def get_webrtc_token( ) client.conversational_ai.conversations.get_webrtc_token( agent_id="21m00Tcm4TlvDq8ikWAM", + participant_name="participant_name", ) """ _response = self._raw_client.get_webrtc_token( @@ -178,7 +180,16 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.conversations.list() + client.conversational_ai.conversations.list( + cursor="cursor", + agent_id="agent_id", + call_successful="success", + call_start_before_unix=1, + call_start_after_unix=1, + user_id="user_id", + page_size=1, + summary_mode="exclude", + ) """ _response = self._raw_client.list( cursor=cursor, @@ -334,6 +345,7 @@ async def get_signed_url( async def main() -> None: await client.conversational_ai.conversations.get_signed_url( agent_id="21m00Tcm4TlvDq8ikWAM", + include_conversation_id=True, ) @@ -384,6 +396,7 @@ async def get_webrtc_token( async def main() -> None: await client.conversational_ai.conversations.get_webrtc_token( agent_id="21m00Tcm4TlvDq8ikWAM", + participant_name="participant_name", ) @@ -456,7 +469,16 @@ async def list( async def main() -> None: - await client.conversational_ai.conversations.list() + await client.conversational_ai.conversations.list( + cursor="cursor", + agent_id="agent_id", + call_successful="success", + call_start_before_unix=1, + call_start_after_unix=1, + user_id="user_id", + page_size=1, + summary_mode="exclude", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/knowledge_base/client.py b/src/elevenlabs/conversational_ai/knowledge_base/client.py index 3edec4e1..557195d2 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/client.py @@ -94,7 +94,15 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.knowledge_base.list() + client.conversational_ai.knowledge_base.list( + page_size=1, + search="search", + show_only_owned_documents=True, + sort_direction="asc", + sort_by="name", + use_typesense=True, + cursor="cursor", + ) """ _response = self._raw_client.list( page_size=page_size, @@ -208,7 +216,15 @@ async def list( async def main() -> None: - await client.conversational_ai.knowledge_base.list() + await client.conversational_ai.knowledge_base.list( + page_size=1, + search="search", + show_only_owned_documents=True, + sort_direction="asc", + sort_by="name", + use_typesense=True, + cursor="cursor", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py index 5483f9ac..f9838af2 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py @@ -180,6 +180,7 @@ def get( ) client.conversational_ai.knowledge_base.documents.get( documentation_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_id", ) """ _response = self._raw_client.get(documentation_id, agent_id=agent_id, request_options=request_options) @@ -220,6 +221,7 @@ def delete( ) client.conversational_ai.knowledge_base.documents.delete( documentation_id="21m00Tcm4TlvDq8ikWAM", + force=True, ) """ _response = self._raw_client.delete(documentation_id, force=force, request_options=request_options) @@ -301,6 +303,8 @@ def get_agents( ) client.conversational_ai.knowledge_base.documents.get_agents( documentation_id="21m00Tcm4TlvDq8ikWAM", + cursor="cursor", + page_size=1, ) """ _response = self._raw_client.get_agents( @@ -537,6 +541,7 @@ async def get( async def main() -> None: await client.conversational_ai.knowledge_base.documents.get( documentation_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_id", ) @@ -585,6 +590,7 @@ async def delete( async def main() -> None: await client.conversational_ai.knowledge_base.documents.delete( documentation_id="21m00Tcm4TlvDq8ikWAM", + force=True, ) @@ -682,6 +688,8 @@ async def get_agents( async def main() -> None: await client.conversational_ai.knowledge_base.documents.get_agents( documentation_id="21m00Tcm4TlvDq8ikWAM", + cursor="cursor", + page_size=1, ) diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py index b2607475..e6c8beba 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py @@ -140,6 +140,7 @@ def update( *, approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ @@ -156,6 +157,9 @@ def update( force_pre_tool_speech : typing.Optional[bool] Whether to force pre-tool speech for all tools from this MCP server + disable_interruptions : typing.Optional[bool] + Whether to disable interruptions for all tools from this MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -179,6 +183,7 @@ def update( mcp_server_id, approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, request_options=request_options, ) return _response.data @@ -352,6 +357,7 @@ async def update( *, approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ @@ -368,6 +374,9 @@ async def update( force_pre_tool_speech : typing.Optional[bool] Whether to force pre-tool speech for all tools from this MCP server + disable_interruptions : typing.Optional[bool] + Whether to disable interruptions for all tools from this MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -399,6 +408,7 @@ async def main() -> None: mcp_server_id, approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py index b3581e5b..8299a860 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py @@ -185,6 +185,7 @@ def update( *, approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[McpServerResponseModel]: """ @@ -201,6 +202,9 @@ def update( force_pre_tool_speech : typing.Optional[bool] Whether to force pre-tool speech for all tools from this MCP server + disable_interruptions : typing.Optional[bool] + Whether to disable interruptions for all tools from this MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -215,6 +219,7 @@ def update( json={ "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, }, headers={ "content-type": "application/json", @@ -415,6 +420,7 @@ async def update( *, approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[McpServerResponseModel]: """ @@ -431,6 +437,9 @@ async def update( force_pre_tool_speech : typing.Optional[bool] Whether to force pre-tool speech for all tools from this MCP server + disable_interruptions : typing.Optional[bool] + Whether to disable interruptions for all tools from this MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -445,6 +454,7 @@ async def update( json={ "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/tests/client.py b/src/elevenlabs/conversational_ai/tests/client.py index f05fec77..0fe0cacb 100644 --- a/src/elevenlabs/conversational_ai/tests/client.py +++ b/src/elevenlabs/conversational_ai/tests/client.py @@ -13,6 +13,7 @@ from ...types.get_tests_page_response_model import GetTestsPageResponseModel from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from ...types.get_unit_test_response_model import GetUnitTestResponseModel +from ...types.test_from_conversation_metadata_input import TestFromConversationMetadataInput from ...types.unit_test_common_model_type import UnitTestCommonModelType from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput from .raw_client import AsyncRawTestsClient, RawTestsClient @@ -55,6 +56,7 @@ def create( typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateUnitTestResponseModel: """ @@ -83,6 +85,9 @@ def create( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -133,6 +138,7 @@ def create( tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, type=type, + from_conversation_metadata=from_conversation_metadata, request_options=request_options, ) return _response.data @@ -182,6 +188,7 @@ def update( typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetUnitTestResponseModel: """ @@ -213,6 +220,9 @@ def update( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -265,6 +275,7 @@ def update( tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, type=type, + from_conversation_metadata=from_conversation_metadata, request_options=request_options, ) return _response.data @@ -372,7 +383,11 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.conversational_ai.tests.list() + client.conversational_ai.tests.list( + cursor="cursor", + page_size=1, + search="search", + ) """ _response = self._raw_client.list( cursor=cursor, page_size=page_size, search=search, request_options=request_options @@ -418,6 +433,7 @@ async def create( typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateUnitTestResponseModel: """ @@ -446,6 +462,9 @@ async def create( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -504,6 +523,7 @@ async def main() -> None: tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, type=type, + from_conversation_metadata=from_conversation_metadata, request_options=request_options, ) return _response.data @@ -563,6 +583,7 @@ async def update( typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetUnitTestResponseModel: """ @@ -594,6 +615,9 @@ async def update( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -654,6 +678,7 @@ async def main() -> None: tool_call_parameters=tool_call_parameters, dynamic_variables=dynamic_variables, type=type, + from_conversation_metadata=from_conversation_metadata, request_options=request_options, ) return _response.data @@ -782,7 +807,11 @@ async def list( async def main() -> None: - await client.conversational_ai.tests.list() + await client.conversational_ai.tests.list( + cursor="cursor", + page_size=1, + search="search", + ) asyncio.run(main()) diff --git a/src/elevenlabs/conversational_ai/tests/invocations/client.py b/src/elevenlabs/conversational_ai/tests/invocations/client.py index 2062c321..e19bcaea 100644 --- a/src/elevenlabs/conversational_ai/tests/invocations/client.py +++ b/src/elevenlabs/conversational_ai/tests/invocations/client.py @@ -5,6 +5,7 @@ from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ....core.request_options import RequestOptions from ....types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from ....types.get_test_invocations_page_response_model import GetTestInvocationsPageResponseModel from ....types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from .raw_client import AsyncRawInvocationsClient, RawInvocationsClient @@ -27,6 +28,54 @@ def with_raw_response(self) -> RawInvocationsClient: """ return self._raw_client + def list( + self, + *, + agent_id: str, + page_size: typing.Optional[int] = None, + cursor: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestInvocationsPageResponseModel: + """ + Lists all test invocations with pagination support and optional search filtering. + + Parameters + ---------- + agent_id : str + Filter by agent ID + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestInvocationsPageResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.tests.invocations.list( + agent_id="agent_id", + page_size=1, + cursor="cursor", + ) + """ + _response = self._raw_client.list( + agent_id=agent_id, page_size=page_size, cursor=cursor, request_options=request_options + ) + return _response.data + def get( self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetTestSuiteInvocationResponseModel: @@ -132,6 +181,62 @@ def with_raw_response(self) -> AsyncRawInvocationsClient: """ return self._raw_client + async def list( + self, + *, + agent_id: str, + page_size: typing.Optional[int] = None, + cursor: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetTestInvocationsPageResponseModel: + """ + Lists all test invocations with pagination support and optional search filtering. + + Parameters + ---------- + agent_id : str + Filter by agent ID + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetTestInvocationsPageResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.tests.invocations.list( + agent_id="agent_id", + page_size=1, + cursor="cursor", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + agent_id=agent_id, page_size=page_size, cursor=cursor, request_options=request_options + ) + return _response.data + async def get( self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetTestSuiteInvocationResponseModel: diff --git a/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py b/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py index f7eeb21f..8c0175d4 100644 --- a/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py +++ b/src/elevenlabs/conversational_ai/tests/invocations/raw_client.py @@ -12,6 +12,7 @@ from ....core.unchecked_base_model import construct_type from ....errors.unprocessable_entity_error import UnprocessableEntityError from ....types.adhoc_agent_config_override_for_test_request_model import AdhocAgentConfigOverrideForTestRequestModel +from ....types.get_test_invocations_page_response_model import GetTestInvocationsPageResponseModel from ....types.get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from ....types.http_validation_error import HttpValidationError @@ -23,6 +24,72 @@ class RawInvocationsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + def list( + self, + *, + agent_id: str, + page_size: typing.Optional[int] = None, + cursor: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetTestInvocationsPageResponseModel]: + """ + Lists all test invocations with pagination support and optional search filtering. + + Parameters + ---------- + agent_id : str + Filter by agent ID + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetTestInvocationsPageResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/convai/test-invocations", + method="GET", + params={ + "agent_id": agent_id, + "page_size": page_size, + "cursor": cursor, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestInvocationsPageResponseModel, + construct_type( + type_=GetTestInvocationsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get( self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetTestSuiteInvocationResponseModel]: @@ -158,6 +225,72 @@ class AsyncRawInvocationsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + async def list( + self, + *, + agent_id: str, + page_size: typing.Optional[int] = None, + cursor: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetTestInvocationsPageResponseModel]: + """ + Lists all test invocations with pagination support and optional search filtering. + + Parameters + ---------- + agent_id : str + Filter by agent ID + + page_size : typing.Optional[int] + How many Tests to return at maximum. Can not exceed 100, defaults to 30. + + cursor : typing.Optional[str] + Used for fetching next page. Cursor is returned in the response. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetTestInvocationsPageResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/convai/test-invocations", + method="GET", + params={ + "agent_id": agent_id, + "page_size": page_size, + "cursor": cursor, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetTestInvocationsPageResponseModel, + construct_type( + type_=GetTestInvocationsPageResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get( self, test_invocation_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetTestSuiteInvocationResponseModel]: diff --git a/src/elevenlabs/conversational_ai/tests/raw_client.py b/src/elevenlabs/conversational_ai/tests/raw_client.py index 40d9f9d1..474f9b85 100644 --- a/src/elevenlabs/conversational_ai/tests/raw_client.py +++ b/src/elevenlabs/conversational_ai/tests/raw_client.py @@ -19,6 +19,7 @@ from ...types.get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel from ...types.get_unit_test_response_model import GetUnitTestResponseModel from ...types.http_validation_error import HttpValidationError +from ...types.test_from_conversation_metadata_input import TestFromConversationMetadataInput from ...types.unit_test_common_model_type import UnitTestCommonModelType from ...types.unit_test_tool_call_evaluation_model_input import UnitTestToolCallEvaluationModelInput from .types.create_unit_test_request_dynamic_variables_value import CreateUnitTestRequestDynamicVariablesValue @@ -45,6 +46,7 @@ def create( typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateUnitTestResponseModel]: """ @@ -73,6 +75,9 @@ def create( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -108,6 +113,9 @@ def create( direction="write", ), "type": type, + "from_conversation_metadata": convert_and_respect_annotation_metadata( + object_=from_conversation_metadata, annotation=TestFromConversationMetadataInput, direction="write" + ), "name": name, }, headers={ @@ -206,6 +214,7 @@ def update( typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetUnitTestResponseModel]: """ @@ -237,6 +246,9 @@ def update( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -272,6 +284,9 @@ def update( direction="write", ), "type": type, + "from_conversation_metadata": convert_and_respect_annotation_metadata( + object_=from_conversation_metadata, annotation=TestFromConversationMetadataInput, direction="write" + ), "name": name, }, headers={ @@ -499,6 +514,7 @@ async def create( typing.Dict[str, typing.Optional[CreateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateUnitTestResponseModel]: """ @@ -527,6 +543,9 @@ async def create( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -562,6 +581,9 @@ async def create( direction="write", ), "type": type, + "from_conversation_metadata": convert_and_respect_annotation_metadata( + object_=from_conversation_metadata, annotation=TestFromConversationMetadataInput, direction="write" + ), "name": name, }, headers={ @@ -660,6 +682,7 @@ async def update( typing.Dict[str, typing.Optional[UpdateUnitTestRequestDynamicVariablesValue]] ] = OMIT, type: typing.Optional[UnitTestCommonModelType] = OMIT, + from_conversation_metadata: typing.Optional[TestFromConversationMetadataInput] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetUnitTestResponseModel]: """ @@ -691,6 +714,9 @@ async def update( type : typing.Optional[UnitTestCommonModelType] + from_conversation_metadata : typing.Optional[TestFromConversationMetadataInput] + Metadata of a conversation this test was created from (if applicable). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -726,6 +752,9 @@ async def update( direction="write", ), "type": type, + "from_conversation_metadata": convert_and_respect_annotation_metadata( + object_=from_conversation_metadata, annotation=TestFromConversationMetadataInput, direction="write" + ), "name": name, }, headers={ diff --git a/src/elevenlabs/conversational_ai/tools/client.py b/src/elevenlabs/conversational_ai/tools/client.py index 6e3dc905..e8d230ca 100644 --- a/src/elevenlabs/conversational_ai/tools/client.py +++ b/src/elevenlabs/conversational_ai/tools/client.py @@ -246,6 +246,8 @@ def get_dependent_agents( ) client.conversational_ai.tools.get_dependent_agents( tool_id="tool_id", + cursor="cursor", + page_size=1, ) """ _response = self._raw_client.get_dependent_agents( @@ -531,6 +533,8 @@ async def get_dependent_agents( async def main() -> None: await client.conversational_ai.tools.get_dependent_agents( tool_id="tool_id", + cursor="cursor", + page_size=1, ) diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index eaa1c36e..379e9039 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.16.0", + "User-Agent": "elevenlabs/v2.17.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.16.0", + "X-Fern-SDK-Version": "v2.17.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/dubbing/__init__.py b/src/elevenlabs/dubbing/__init__.py index e9223970..de1c492e 100644 --- a/src/elevenlabs/dubbing/__init__.py +++ b/src/elevenlabs/dubbing/__init__.py @@ -7,6 +7,7 @@ if typing.TYPE_CHECKING: from .types import ( + DubbingCreateRequestMode, DubbingListRequestDubbingStatus, DubbingListRequestFilterByCreator, DubbingListRequestOrderDirection, @@ -14,6 +15,7 @@ from . import audio, resource, transcript from .transcript import TranscriptGetTranscriptForDubRequestFormatType _dynamic_imports: typing.Dict[str, str] = { + "DubbingCreateRequestMode": ".types", "DubbingListRequestDubbingStatus": ".types", "DubbingListRequestFilterByCreator": ".types", "DubbingListRequestOrderDirection": ".types", @@ -44,6 +46,7 @@ def __dir__(): __all__ = [ + "DubbingCreateRequestMode", "DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", "DubbingListRequestOrderDirection", diff --git a/src/elevenlabs/dubbing/audio/client.py b/src/elevenlabs/dubbing/audio/client.py index 7b7f803f..6ddb897b 100644 --- a/src/elevenlabs/dubbing/audio/client.py +++ b/src/elevenlabs/dubbing/audio/client.py @@ -43,6 +43,18 @@ def get( ------- typing.Iterator[bytes] The dubbed audio or video file + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.dubbing.audio.get( + dubbing_id="dubbing_id", + language_code="language_code", + ) """ with self._raw_client.get(dubbing_id, language_code, request_options=request_options) as r: yield from r.data @@ -84,6 +96,26 @@ async def get( ------- typing.AsyncIterator[bytes] The dubbed audio or video file + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.dubbing.audio.get( + dubbing_id="dubbing_id", + language_code="language_code", + ) + + + asyncio.run(main()) """ async with self._raw_client.get(dubbing_id, language_code, request_options=request_options) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 79a3baad..6ddc182b 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -12,6 +12,7 @@ from ..types.dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel from ..types.dubbing_metadata_response import DubbingMetadataResponse from .raw_client import AsyncRawDubbingClient, RawDubbingClient +from .types.dubbing_create_request_mode import DubbingCreateRequestMode from .types.dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .types.dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator from .types.dubbing_list_request_order_direction import DubbingListRequestOrderDirection @@ -92,7 +93,13 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.dubbing.list() + client.dubbing.list( + cursor="cursor", + page_size=1, + dubbing_status="dubbing", + filter_by_creator="personal", + order_direction="DESCENDING", + ) """ _response = self._raw_client.list( cursor=cursor, @@ -126,7 +133,7 @@ def create( use_profanity_filter: typing.Optional[bool] = OMIT, dubbing_studio: typing.Optional[bool] = OMIT, disable_voice_cloning: typing.Optional[bool] = OMIT, - mode: typing.Optional[str] = OMIT, + mode: typing.Optional[DubbingCreateRequestMode] = OMIT, csv_fps: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DoDubbingResponse: @@ -189,8 +196,8 @@ def create( disable_voice_cloning : typing.Optional[bool] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. - mode : typing.Optional[str] - automatic or manual. Manual mode is only supported when creating a dubbing studio project + mode : typing.Optional[DubbingCreateRequestMode] + The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. csv_fps : typing.Optional[float] Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. @@ -401,7 +408,13 @@ async def list( async def main() -> None: - await client.dubbing.list() + await client.dubbing.list( + cursor="cursor", + page_size=1, + dubbing_status="dubbing", + filter_by_creator="personal", + order_direction="DESCENDING", + ) asyncio.run(main()) @@ -438,7 +451,7 @@ async def create( use_profanity_filter: typing.Optional[bool] = OMIT, dubbing_studio: typing.Optional[bool] = OMIT, disable_voice_cloning: typing.Optional[bool] = OMIT, - mode: typing.Optional[str] = OMIT, + mode: typing.Optional[DubbingCreateRequestMode] = OMIT, csv_fps: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DoDubbingResponse: @@ -501,8 +514,8 @@ async def create( disable_voice_cloning : typing.Optional[bool] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. - mode : typing.Optional[str] - automatic or manual. Manual mode is only supported when creating a dubbing studio project + mode : typing.Optional[DubbingCreateRequestMode] + The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. csv_fps : typing.Optional[float] Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index 7c84b3ad..8ec00b48 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -16,6 +16,7 @@ from ..types.dubbing_metadata_page_response_model import DubbingMetadataPageResponseModel from ..types.dubbing_metadata_response import DubbingMetadataResponse from ..types.http_validation_error import HttpValidationError +from .types.dubbing_create_request_mode import DubbingCreateRequestMode from .types.dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .types.dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator from .types.dubbing_list_request_order_direction import DubbingListRequestOrderDirection @@ -130,7 +131,7 @@ def create( use_profanity_filter: typing.Optional[bool] = OMIT, dubbing_studio: typing.Optional[bool] = OMIT, disable_voice_cloning: typing.Optional[bool] = OMIT, - mode: typing.Optional[str] = OMIT, + mode: typing.Optional[DubbingCreateRequestMode] = OMIT, csv_fps: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DoDubbingResponse]: @@ -193,8 +194,8 @@ def create( disable_voice_cloning : typing.Optional[bool] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. - mode : typing.Optional[str] - automatic or manual. Manual mode is only supported when creating a dubbing studio project + mode : typing.Optional[DubbingCreateRequestMode] + The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. csv_fps : typing.Optional[float] Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. @@ -471,7 +472,7 @@ async def create( use_profanity_filter: typing.Optional[bool] = OMIT, dubbing_studio: typing.Optional[bool] = OMIT, disable_voice_cloning: typing.Optional[bool] = OMIT, - mode: typing.Optional[str] = OMIT, + mode: typing.Optional[DubbingCreateRequestMode] = OMIT, csv_fps: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DoDubbingResponse]: @@ -534,8 +535,8 @@ async def create( disable_voice_cloning : typing.Optional[bool] Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. - mode : typing.Optional[str] - automatic or manual. Manual mode is only supported when creating a dubbing studio project + mode : typing.Optional[DubbingCreateRequestMode] + The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. csv_fps : typing.Optional[float] Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. diff --git a/src/elevenlabs/dubbing/types/__init__.py b/src/elevenlabs/dubbing/types/__init__.py index 2428669b..b39c891a 100644 --- a/src/elevenlabs/dubbing/types/__init__.py +++ b/src/elevenlabs/dubbing/types/__init__.py @@ -6,10 +6,12 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .dubbing_create_request_mode import DubbingCreateRequestMode from .dubbing_list_request_dubbing_status import DubbingListRequestDubbingStatus from .dubbing_list_request_filter_by_creator import DubbingListRequestFilterByCreator from .dubbing_list_request_order_direction import DubbingListRequestOrderDirection _dynamic_imports: typing.Dict[str, str] = { + "DubbingCreateRequestMode": ".dubbing_create_request_mode", "DubbingListRequestDubbingStatus": ".dubbing_list_request_dubbing_status", "DubbingListRequestFilterByCreator": ".dubbing_list_request_filter_by_creator", "DubbingListRequestOrderDirection": ".dubbing_list_request_order_direction", @@ -35,4 +37,9 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["DubbingListRequestDubbingStatus", "DubbingListRequestFilterByCreator", "DubbingListRequestOrderDirection"] +__all__ = [ + "DubbingCreateRequestMode", + "DubbingListRequestDubbingStatus", + "DubbingListRequestFilterByCreator", + "DubbingListRequestOrderDirection", +] diff --git a/src/elevenlabs/dubbing/types/dubbing_create_request_mode.py b/src/elevenlabs/dubbing/types/dubbing_create_request_mode.py new file mode 100644 index 00000000..07b40923 --- /dev/null +++ b/src/elevenlabs/dubbing/types/dubbing_create_request_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DubbingCreateRequestMode = typing.Union[typing.Literal["automatic", "manual"], typing.Any] diff --git a/src/elevenlabs/history/client.py b/src/elevenlabs/history/client.py index 090248cc..e8298006 100644 --- a/src/elevenlabs/history/client.py +++ b/src/elevenlabs/history/client.py @@ -91,7 +91,17 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.history.list() + client.history.list( + page_size=1, + start_after_history_item_id="start_after_history_item_id", + voice_id="voice_id", + model_id="model_id", + date_before_unix=1, + date_after_unix=1, + sort_direction="asc", + search="search", + source="TTS", + ) """ _response = self._raw_client.list( page_size=page_size, @@ -191,6 +201,17 @@ def get_audio( ------- typing.Iterator[bytes] The audio file of the history item. + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.history.get_audio( + history_item_id="history_item_id", + ) """ with self._raw_client.get_audio(history_item_id, request_options=request_options) as r: yield from r.data @@ -220,6 +241,17 @@ def download( ------- typing.Iterator[bytes] The requested audio file, or a zip file containing multiple audio files when multiple history items are requested. + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.history.download( + history_item_ids=["history_item_ids", "history_item_ids"], + ) """ with self._raw_client.download( history_item_ids=history_item_ids, output_format=output_format, request_options=request_options @@ -308,7 +340,17 @@ async def list( async def main() -> None: - await client.history.list() + await client.history.list( + page_size=1, + start_after_history_item_id="start_after_history_item_id", + voice_id="voice_id", + model_id="model_id", + date_before_unix=1, + date_after_unix=1, + sort_direction="asc", + search="search", + source="TTS", + ) asyncio.run(main()) @@ -427,6 +469,25 @@ async def get_audio( ------- typing.AsyncIterator[bytes] The audio file of the history item. + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.history.get_audio( + history_item_id="history_item_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.get_audio(history_item_id, request_options=request_options) as r: async for _chunk in r.data: @@ -457,6 +518,25 @@ async def download( ------- typing.AsyncIterator[bytes] The requested audio file, or a zip file containing multiple audio files when multiple history items are requested. + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.history.download( + history_item_ids=["history_item_ids", "history_item_ids"], + ) + + + asyncio.run(main()) """ async with self._raw_client.download( history_item_ids=history_item_ids, output_format=output_format, request_options=request_options diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 5bacf733..be0c490e 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -39,13 +39,14 @@ def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, - respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, + respect_sections_durations: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -56,9 +57,6 @@ def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - respect_sections_durations : typing.Optional[bool] - Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. - prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -77,6 +75,12 @@ def compose( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -84,16 +88,26 @@ def compose( ------- typing.Iterator[bytes] The generated audio file in the format specified + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.music.compose() """ with self._raw_client.compose( output_format=output_format, - respect_sections_durations=respect_sections_durations, prompt=prompt, music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, + respect_sections_durations=respect_sections_durations, request_options=request_options, ) as r: yield from r.data @@ -108,6 +122,7 @@ def compose_detailed( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -136,6 +151,9 @@ def compose_detailed( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -143,6 +161,15 @@ def compose_detailed( ------- typing.Iterator[bytes] Multipart/mixed response with JSON metadata and binary audio file + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.music.compose_detailed() """ with self._raw_client.compose_detailed( output_format=output_format, @@ -152,6 +179,7 @@ def compose_detailed( music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, request_options=request_options, ) as r: yield from r.data @@ -166,6 +194,7 @@ def stream( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -194,6 +223,9 @@ def stream( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -201,6 +233,15 @@ def stream( ------- typing.Iterator[bytes] Streaming audio data in the format specified + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.music.stream() """ with self._raw_client.stream( output_format=output_format, @@ -210,6 +251,7 @@ def stream( music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, request_options=request_options, ) as r: yield from r.data @@ -244,13 +286,14 @@ async def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, - respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, + respect_sections_durations: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -261,9 +304,6 @@ async def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - respect_sections_durations : typing.Optional[bool] - Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. - prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -282,6 +322,12 @@ async def compose( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -289,16 +335,34 @@ async def compose( ------- typing.AsyncIterator[bytes] The generated audio file in the format specified + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.music.compose() + + + asyncio.run(main()) """ async with self._raw_client.compose( output_format=output_format, - respect_sections_durations=respect_sections_durations, prompt=prompt, music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, + respect_sections_durations=respect_sections_durations, request_options=request_options, ) as r: async for _chunk in r.data: @@ -314,6 +378,7 @@ async def compose_detailed( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -342,6 +407,9 @@ async def compose_detailed( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -349,6 +417,23 @@ async def compose_detailed( ------- typing.AsyncIterator[bytes] Multipart/mixed response with JSON metadata and binary audio file + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.music.compose_detailed() + + + asyncio.run(main()) """ async with self._raw_client.compose_detailed( output_format=output_format, @@ -358,6 +443,7 @@ async def compose_detailed( music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, request_options=request_options, ) as r: async for _chunk in r.data: @@ -373,6 +459,7 @@ async def stream( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -401,6 +488,9 @@ async def stream( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -408,6 +498,23 @@ async def stream( ------- typing.AsyncIterator[bytes] Streaming audio data in the format specified + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.music.stream() + + + asyncio.run(main()) """ async with self._raw_client.stream( output_format=output_format, @@ -417,6 +524,7 @@ async def stream( music_length_ms=music_length_ms, model_id=model_id, seed=seed, + force_instrumental=force_instrumental, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index 178cb404..f7281161 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -30,13 +30,14 @@ def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, - respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, + respect_sections_durations: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -47,9 +48,6 @@ def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - respect_sections_durations : typing.Optional[bool] - Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. - prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -68,6 +66,12 @@ def compose( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -83,7 +87,6 @@ def compose( "output_format": output_format, }, json={ - "respect_sections_durations": respect_sections_durations, "prompt": prompt, "music_prompt": convert_and_respect_annotation_metadata( object_=music_prompt, annotation=MusicPrompt, direction="write" @@ -94,6 +97,8 @@ def compose( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, + "respect_sections_durations": respect_sections_durations, }, headers={ "content-type": "application/json", @@ -141,6 +146,7 @@ def compose_detailed( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -169,6 +175,9 @@ def compose_detailed( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -194,6 +203,7 @@ def compose_detailed( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, }, headers={ "content-type": "application/json", @@ -241,6 +251,7 @@ def stream( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -269,6 +280,9 @@ def stream( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -294,6 +308,7 @@ def stream( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, }, headers={ "content-type": "application/json", @@ -340,13 +355,14 @@ async def compose( self, *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, - respect_sections_durations: typing.Optional[bool] = OMIT, prompt: typing.Optional[str] = OMIT, music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, + respect_sections_durations: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -357,9 +373,6 @@ async def compose( output_format : typing.Optional[MusicComposeRequestOutputFormat] Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. - respect_sections_durations : typing.Optional[bool] - Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. - prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. @@ -378,6 +391,12 @@ async def compose( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + + respect_sections_durations : typing.Optional[bool] + Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -393,7 +412,6 @@ async def compose( "output_format": output_format, }, json={ - "respect_sections_durations": respect_sections_durations, "prompt": prompt, "music_prompt": convert_and_respect_annotation_metadata( object_=music_prompt, annotation=MusicPrompt, direction="write" @@ -404,6 +422,8 @@ async def compose( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, + "respect_sections_durations": respect_sections_durations, }, headers={ "content-type": "application/json", @@ -452,6 +472,7 @@ async def compose_detailed( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -480,6 +501,9 @@ async def compose_detailed( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -505,6 +529,7 @@ async def compose_detailed( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, }, headers={ "content-type": "application/json", @@ -553,6 +578,7 @@ async def stream( music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, + force_instrumental: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -581,6 +607,9 @@ async def stream( seed : typing.Optional[int] The seed to use for the generation. + force_instrumental : typing.Optional[bool] + If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -606,6 +635,7 @@ async def stream( "music_length_ms": music_length_ms, "model_id": model_id, "seed": seed, + "force_instrumental": force_instrumental, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index eb964552..950b5bce 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -268,6 +268,18 @@ def download( ------- typing.Iterator[bytes] The PLS file containing pronunciation dictionary rules + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.pronunciation_dictionaries.download( + dictionary_id="dictionary_id", + version_id="version_id", + ) """ with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: yield from r.data @@ -313,7 +325,12 @@ def list( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.pronunciation_dictionaries.list() + client.pronunciation_dictionaries.list( + cursor="cursor", + page_size=1, + sort="creation_time_unix", + sort_direction="sort_direction", + ) """ _response = self._raw_client.list( cursor=cursor, @@ -603,6 +620,26 @@ async def download( ------- typing.AsyncIterator[bytes] The PLS file containing pronunciation dictionary rules + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.pronunciation_dictionaries.download( + dictionary_id="dictionary_id", + version_id="version_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.download(dictionary_id, version_id, request_options=request_options) as r: async for _chunk in r.data: @@ -654,7 +691,12 @@ async def list( async def main() -> None: - await client.pronunciation_dictionaries.list() + await client.pronunciation_dictionaries.list( + cursor="cursor", + page_size=1, + sort="creation_time_unix", + sort_direction="sort_direction", + ) asyncio.run(main()) diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index afe40675..7f06d38e 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -135,6 +135,7 @@ def convert( api_key="YOUR_API_KEY", ) client.speech_to_text.convert( + enable_logging=True, model_id="model_id", ) """ @@ -290,6 +291,7 @@ async def convert( async def main() -> None: await client.speech_to_text.convert( + enable_logging=True, model_id="model_id", ) diff --git a/src/elevenlabs/studio/__init__.py b/src/elevenlabs/studio/__init__.py index f4432bda..dd857538 100644 --- a/src/elevenlabs/studio/__init__.py +++ b/src/elevenlabs/studio/__init__.py @@ -7,6 +7,7 @@ if typing.TYPE_CHECKING: from .types import ( + BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization, BodyCreatePodcastV1StudioPodcastsPostDurationScale, BodyCreatePodcastV1StudioPodcastsPostMode, BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin, @@ -25,6 +26,7 @@ ProjectsCreateRequestTargetAudience, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization": ".types", "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".types", "BodyCreatePodcastV1StudioPodcastsPostMode": ".types", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".types", @@ -62,6 +64,7 @@ def __dir__(): __all__ = [ + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", diff --git a/src/elevenlabs/studio/client.py b/src/elevenlabs/studio/client.py index 784ae7e5..4be05414 100644 --- a/src/elevenlabs/studio/client.py +++ b/src/elevenlabs/studio/client.py @@ -8,6 +8,9 @@ from ..core.request_options import RequestOptions from ..types.podcast_project_response_model import PodcastProjectResponseModel from .raw_client import AsyncRawStudioClient, RawStudioClient +from .types.body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization import ( + BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization, +) from .types.body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( BodyCreatePodcastV1StudioPodcastsPostDurationScale, ) @@ -54,6 +57,7 @@ def create_podcast( instructions_prompt: typing.Optional[str] = OMIT, highlights: typing.Optional[typing.Sequence[str]] = OMIT, callback_url: typing.Optional[str] = OMIT, + apply_text_normalization: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> PodcastProjectResponseModel: """ @@ -155,6 +159,14 @@ def create_podcast( } + apply_text_normalization : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -202,6 +214,7 @@ def create_podcast( instructions_prompt=instructions_prompt, highlights=highlights, callback_url=callback_url, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) return _response.data @@ -246,6 +259,7 @@ async def create_podcast( instructions_prompt: typing.Optional[str] = OMIT, highlights: typing.Optional[typing.Sequence[str]] = OMIT, callback_url: typing.Optional[str] = OMIT, + apply_text_normalization: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> PodcastProjectResponseModel: """ @@ -347,6 +361,14 @@ async def create_podcast( } + apply_text_normalization : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -402,6 +424,7 @@ async def main() -> None: instructions_prompt=instructions_prompt, highlights=highlights, callback_url=callback_url, + apply_text_normalization=apply_text_normalization, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/studio/projects/chapters/snapshots/client.py b/src/elevenlabs/studio/projects/chapters/snapshots/client.py index 4a657740..a76d04f2 100644 --- a/src/elevenlabs/studio/projects/chapters/snapshots/client.py +++ b/src/elevenlabs/studio/projects/chapters/snapshots/client.py @@ -143,6 +143,19 @@ def stream( ------- typing.Iterator[bytes] Streaming audio data + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.studio.projects.chapters.snapshots.stream( + project_id="project_id", + chapter_id="chapter_id", + chapter_snapshot_id="chapter_snapshot_id", + ) """ with self._raw_client.stream( project_id, @@ -303,6 +316,27 @@ async def stream( ------- typing.AsyncIterator[bytes] Streaming audio data + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.studio.projects.chapters.snapshots.stream( + project_id="project_id", + chapter_id="chapter_id", + chapter_snapshot_id="chapter_snapshot_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.stream( project_id, diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index c476540b..c295ec3f 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -346,6 +346,7 @@ def get( ) client.studio.projects.get( project_id="21m00Tcm4TlvDq8ikWAM", + share_id="share_id", ) """ _response = self._raw_client.get(project_id, share_id=share_id, request_options=request_options) @@ -866,6 +867,7 @@ async def get( async def main() -> None: await client.studio.projects.get( project_id="21m00Tcm4TlvDq8ikWAM", + share_id="share_id", ) diff --git a/src/elevenlabs/studio/projects/snapshots/client.py b/src/elevenlabs/studio/projects/snapshots/client.py index 4481915e..e70c2380 100644 --- a/src/elevenlabs/studio/projects/snapshots/client.py +++ b/src/elevenlabs/studio/projects/snapshots/client.py @@ -126,6 +126,18 @@ def stream( ------- typing.Iterator[bytes] Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.studio.projects.snapshots.stream( + project_id="project_id", + project_snapshot_id="project_snapshot_id", + ) """ with self._raw_client.stream( project_id, project_snapshot_id, convert_to_mpeg=convert_to_mpeg, request_options=request_options @@ -153,6 +165,18 @@ def stream_archive( ------- typing.Iterator[bytes] Streaming archive data + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.studio.projects.snapshots.stream_archive( + project_id="project_id", + project_snapshot_id="project_snapshot_id", + ) """ with self._raw_client.stream_archive(project_id, project_snapshot_id, request_options=request_options) as r: yield from r.data @@ -288,6 +312,26 @@ async def stream( ------- typing.AsyncIterator[bytes] Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.studio.projects.snapshots.stream( + project_id="project_id", + project_snapshot_id="project_snapshot_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.stream( project_id, project_snapshot_id, convert_to_mpeg=convert_to_mpeg, request_options=request_options @@ -316,6 +360,26 @@ async def stream_archive( ------- typing.AsyncIterator[bytes] Streaming archive data + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.studio.projects.snapshots.stream_archive( + project_id="project_id", + project_snapshot_id="project_snapshot_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.stream_archive( project_id, project_snapshot_id, request_options=request_options diff --git a/src/elevenlabs/studio/raw_client.py b/src/elevenlabs/studio/raw_client.py index 924b6381..88f9018a 100644 --- a/src/elevenlabs/studio/raw_client.py +++ b/src/elevenlabs/studio/raw_client.py @@ -12,6 +12,9 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.http_validation_error import HttpValidationError from ..types.podcast_project_response_model import PodcastProjectResponseModel +from .types.body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization import ( + BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization, +) from .types.body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( BodyCreatePodcastV1StudioPodcastsPostDurationScale, ) @@ -43,6 +46,7 @@ def create_podcast( instructions_prompt: typing.Optional[str] = OMIT, highlights: typing.Optional[typing.Sequence[str]] = OMIT, callback_url: typing.Optional[str] = OMIT, + apply_text_normalization: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PodcastProjectResponseModel]: """ @@ -144,6 +148,14 @@ def create_podcast( } + apply_text_normalization : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -171,6 +183,7 @@ def create_podcast( "instructions_prompt": instructions_prompt, "highlights": highlights, "callback_url": callback_url, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", @@ -223,6 +236,7 @@ async def create_podcast( instructions_prompt: typing.Optional[str] = OMIT, highlights: typing.Optional[typing.Sequence[str]] = OMIT, callback_url: typing.Optional[str] = OMIT, + apply_text_normalization: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PodcastProjectResponseModel]: """ @@ -324,6 +338,14 @@ async def create_podcast( } + apply_text_normalization : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization] + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -351,6 +373,7 @@ async def create_podcast( "instructions_prompt": instructions_prompt, "highlights": highlights, "callback_url": callback_url, + "apply_text_normalization": apply_text_normalization, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/studio/types/__init__.py b/src/elevenlabs/studio/types/__init__.py index eea5d06d..569bff26 100644 --- a/src/elevenlabs/studio/types/__init__.py +++ b/src/elevenlabs/studio/types/__init__.py @@ -6,6 +6,9 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization import ( + BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization, + ) from .body_create_podcast_v_1_studio_podcasts_post_duration_scale import ( BodyCreatePodcastV1StudioPodcastsPostDurationScale, ) @@ -24,6 +27,7 @@ BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization": ".body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization", "BodyCreatePodcastV1StudioPodcastsPostDurationScale": ".body_create_podcast_v_1_studio_podcasts_post_duration_scale", "BodyCreatePodcastV1StudioPodcastsPostMode": ".body_create_podcast_v_1_studio_podcasts_post_mode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin": ".body_create_podcast_v_1_studio_podcasts_post_mode", @@ -56,6 +60,7 @@ def __dir__(): __all__ = [ + "BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization", "BodyCreatePodcastV1StudioPodcastsPostDurationScale", "BodyCreatePodcastV1StudioPodcastsPostMode", "BodyCreatePodcastV1StudioPodcastsPostMode_Bulletin", diff --git a/src/elevenlabs/studio/types/body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization.py b/src/elevenlabs/studio/types/body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization.py new file mode 100644 index 00000000..4622eed2 --- /dev/null +++ b/src/elevenlabs/studio/types/body_create_podcast_v_1_studio_podcasts_post_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off", "apply_english"], typing.Any +] diff --git a/src/elevenlabs/text_to_speech/__init__.py b/src/elevenlabs/text_to_speech/__init__.py index f1d79ae4..247e10e1 100644 --- a/src/elevenlabs/text_to_speech/__init__.py +++ b/src/elevenlabs/text_to_speech/__init__.py @@ -7,20 +7,20 @@ if typing.TYPE_CHECKING: from .types import ( + BodyTextToSpeechFullApplyTextNormalization, BodyTextToSpeechFullWithTimestampsApplyTextNormalization, + BodyTextToSpeechStreamApplyTextNormalization, BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, TextToSpeechConvertRequestOutputFormat, TextToSpeechConvertWithTimestampsRequestOutputFormat, TextToSpeechStreamRequestOutputFormat, TextToSpeechStreamWithTimestampsRequestOutputFormat, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechFullApplyTextNormalization": ".types", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".types", + "BodyTextToSpeechStreamApplyTextNormalization": ".types", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".types", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".types", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".types", "TextToSpeechConvertRequestOutputFormat": ".types", "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".types", "TextToSpeechStreamRequestOutputFormat": ".types", @@ -48,10 +48,10 @@ def __dir__(): __all__ = [ + "BodyTextToSpeechFullApplyTextNormalization", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamApplyTextNormalization", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", "TextToSpeechConvertRequestOutputFormat", "TextToSpeechConvertWithTimestampsRequestOutputFormat", "TextToSpeechStreamRequestOutputFormat", diff --git a/src/elevenlabs/text_to_speech/client.py b/src/elevenlabs/text_to_speech/client.py index 7d0970d3..f6162ce9 100644 --- a/src/elevenlabs/text_to_speech/client.py +++ b/src/elevenlabs/text_to_speech/client.py @@ -9,18 +9,14 @@ from ..types.streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from ..types.voice_settings import VoiceSettings from .raw_client import AsyncRawTextToSpeechClient, RawTextToSpeechClient +from .types.body_text_to_speech_full_apply_text_normalization import BodyTextToSpeechFullApplyTextNormalization from .types.body_text_to_speech_full_with_timestamps_apply_text_normalization import ( BodyTextToSpeechFullWithTimestampsApplyTextNormalization, ) +from .types.body_text_to_speech_stream_apply_text_normalization import BodyTextToSpeechStreamApplyTextNormalization from .types.body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, ) -from .types.body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, -) -from .types.body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, -) from .types.text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .types.text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -69,10 +65,9 @@ def convert( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -132,12 +127,15 @@ def convert( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -178,6 +176,7 @@ def convert( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -204,6 +203,7 @@ def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: """ @@ -269,6 +269,9 @@ def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -286,6 +289,9 @@ def convert_with_timestamps( ) client.text_to_speech.convert_with_timestamps( voice_id="21m00Tcm4TlvDq8ikWAM", + enable_logging=True, + optimize_streaming_latency=1, + output_format="mp3_22050_32", text="This is a test for the API of ElevenLabs.", ) """ @@ -307,6 +313,7 @@ def convert_with_timestamps( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) return _response.data @@ -331,10 +338,9 @@ def stream( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -394,12 +400,15 @@ def stream( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -440,6 +449,7 @@ def stream( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -466,6 +476,7 @@ def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[StreamingAudioChunkWithTimestampsResponse]: """ @@ -531,6 +542,9 @@ def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -573,6 +587,7 @@ def stream_with_timestamps( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -613,10 +628,9 @@ async def convert( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -676,12 +690,15 @@ async def convert( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -730,6 +747,7 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: @@ -757,6 +775,7 @@ async def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: """ @@ -822,6 +841,9 @@ async def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -844,6 +866,9 @@ async def convert_with_timestamps( async def main() -> None: await client.text_to_speech.convert_with_timestamps( voice_id="21m00Tcm4TlvDq8ikWAM", + enable_logging=True, + optimize_streaming_latency=1, + output_format="mp3_22050_32", text="This is a test for the API of ElevenLabs.", ) @@ -868,6 +893,7 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) return _response.data @@ -892,10 +918,9 @@ async def stream( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -955,12 +980,15 @@ async def stream( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -1009,6 +1037,7 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: @@ -1036,6 +1065,7 @@ async def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]: """ @@ -1101,6 +1131,9 @@ async def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1151,6 +1184,7 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, + hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/text_to_speech/raw_client.py b/src/elevenlabs/text_to_speech/raw_client.py index cb45dcdc..a1fd6acb 100644 --- a/src/elevenlabs/text_to_speech/raw_client.py +++ b/src/elevenlabs/text_to_speech/raw_client.py @@ -18,18 +18,14 @@ from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator from ..types.streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from ..types.voice_settings import VoiceSettings +from .types.body_text_to_speech_full_apply_text_normalization import BodyTextToSpeechFullApplyTextNormalization from .types.body_text_to_speech_full_with_timestamps_apply_text_normalization import ( BodyTextToSpeechFullWithTimestampsApplyTextNormalization, ) +from .types.body_text_to_speech_stream_apply_text_normalization import BodyTextToSpeechStreamApplyTextNormalization from .types.body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, ) -from .types.body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, -) -from .types.body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, -) from .types.text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .types.text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -68,10 +64,9 @@ def convert( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -131,12 +126,15 @@ def convert( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -173,6 +171,7 @@ def convert( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -231,6 +230,7 @@ def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AudioWithTimestampsResponse]: """ @@ -296,6 +296,9 @@ def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -332,6 +335,7 @@ def convert_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -386,10 +390,9 @@ def stream( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -449,12 +452,15 @@ def stream( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -491,6 +497,7 @@ def stream( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -550,6 +557,7 @@ def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[StreamingAudioChunkWithTimestampsResponse]]]: """ @@ -615,6 +623,9 @@ def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -651,6 +662,7 @@ def stream_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -727,10 +739,9 @@ async def convert( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -790,12 +801,15 @@ async def convert( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechFullApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -832,6 +846,7 @@ async def convert( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -891,6 +906,7 @@ async def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AudioWithTimestampsResponse]: """ @@ -956,6 +972,9 @@ async def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -992,6 +1011,7 @@ async def convert_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -1046,10 +1066,9 @@ async def stream( previous_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, next_request_ids: typing.Optional[typing.Sequence[str]] = OMIT, use_pvc_as_ivc: typing.Optional[bool] = OMIT, - apply_text_normalization: typing.Optional[ - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization - ] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -1109,12 +1128,15 @@ async def stream( use_pvc_as_ivc : typing.Optional[bool] If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions. - apply_text_normalization : typing.Optional[BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization] + apply_text_normalization : typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -1151,6 +1173,7 @@ async def stream( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -1211,6 +1234,7 @@ async def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, + hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]]]: """ @@ -1276,6 +1300,9 @@ async def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + hcaptcha_token : typing.Optional[str] + HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1312,6 +1339,7 @@ async def stream_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, + "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/text_to_speech/types/__init__.py b/src/elevenlabs/text_to_speech/types/__init__.py index ab009034..943a1513 100644 --- a/src/elevenlabs/text_to_speech/types/__init__.py +++ b/src/elevenlabs/text_to_speech/types/__init__.py @@ -6,18 +6,14 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .body_text_to_speech_full_apply_text_normalization import BodyTextToSpeechFullApplyTextNormalization from .body_text_to_speech_full_with_timestamps_apply_text_normalization import ( BodyTextToSpeechFullWithTimestampsApplyTextNormalization, ) + from .body_text_to_speech_stream_apply_text_normalization import BodyTextToSpeechStreamApplyTextNormalization from .body_text_to_speech_stream_with_timestamps_apply_text_normalization import ( BodyTextToSpeechStreamWithTimestampsApplyTextNormalization, ) - from .body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization import ( - BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization, - ) - from .body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization import ( - BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, - ) from .text_to_speech_convert_request_output_format import TextToSpeechConvertRequestOutputFormat from .text_to_speech_convert_with_timestamps_request_output_format import ( TextToSpeechConvertWithTimestampsRequestOutputFormat, @@ -27,10 +23,10 @@ TextToSpeechStreamWithTimestampsRequestOutputFormat, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToSpeechFullApplyTextNormalization": ".body_text_to_speech_full_apply_text_normalization", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".body_text_to_speech_full_with_timestamps_apply_text_normalization", + "BodyTextToSpeechStreamApplyTextNormalization": ".body_text_to_speech_stream_apply_text_normalization", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization": ".body_text_to_speech_stream_with_timestamps_apply_text_normalization", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization": ".body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization": ".body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization", "TextToSpeechConvertRequestOutputFormat": ".text_to_speech_convert_request_output_format", "TextToSpeechConvertWithTimestampsRequestOutputFormat": ".text_to_speech_convert_with_timestamps_request_output_format", "TextToSpeechStreamRequestOutputFormat": ".text_to_speech_stream_request_output_format", @@ -58,10 +54,10 @@ def __dir__(): __all__ = [ + "BodyTextToSpeechFullApplyTextNormalization", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", + "BodyTextToSpeechStreamApplyTextNormalization", "BodyTextToSpeechStreamWithTimestampsApplyTextNormalization", - "BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization", - "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", "TextToSpeechConvertRequestOutputFormat", "TextToSpeechConvertWithTimestampsRequestOutputFormat", "TextToSpeechStreamRequestOutputFormat", diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_apply_text_normalization.py new file mode 100644 index 00000000..46b36e1a --- /dev/null +++ b/src/elevenlabs/text_to_speech/types/body_text_to_speech_full_apply_text_normalization.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToSpeechFullApplyTextNormalization = typing.Union[typing.Literal["auto", "on", "off"], typing.Any] diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_apply_text_normalization.py new file mode 100644 index 00000000..8ec0eaf7 --- /dev/null +++ b/src/elevenlabs/text_to_speech/types/body_text_to_speech_stream_apply_text_normalization.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToSpeechStreamApplyTextNormalization = typing.Union[typing.Literal["auto", "on", "off"], typing.Any] diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization.py deleted file mode 100644 index 42f98101..00000000 --- a/src/elevenlabs/text_to_speech/types/body_text_to_speech_streaming_v_1_text_to_speech_voice_id_stream_post_apply_text_normalization.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization = typing.Union[ - typing.Literal["auto", "on", "off"], typing.Any -] diff --git a/src/elevenlabs/text_to_speech/types/body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization.py b/src/elevenlabs/text_to_speech/types/body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization.py deleted file mode 100644 index 42f873cf..00000000 --- a/src/elevenlabs/text_to_speech/types/body_text_to_speech_v_1_text_to_speech_voice_id_post_apply_text_normalization.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization = typing.Union[ - typing.Literal["auto", "on", "off"], typing.Any -] diff --git a/src/elevenlabs/text_to_voice/client.py b/src/elevenlabs/text_to_voice/client.py index 015610e0..db7a8a51 100644 --- a/src/elevenlabs/text_to_voice/client.py +++ b/src/elevenlabs/text_to_voice/client.py @@ -95,6 +95,7 @@ def create_previews( api_key="YOUR_API_KEY", ) client.text_to_voice.create_previews( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) """ @@ -254,6 +255,7 @@ def design( api_key="YOUR_API_KEY", ) client.text_to_voice.design( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) """ @@ -351,6 +353,7 @@ def remix( ) client.text_to_voice.remix( voice_id="21m00Tcm4TlvDq8ikWAM", + output_format="mp3_22050_32", voice_description="Make the voice have a higher pitch.", ) """ @@ -460,6 +463,7 @@ async def create_previews( async def main() -> None: await client.text_to_voice.create_previews( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) @@ -635,6 +639,7 @@ async def design( async def main() -> None: await client.text_to_voice.design( + output_format="mp3_22050_32", voice_description="A sassy squeaky mouse", ) @@ -740,6 +745,7 @@ async def remix( async def main() -> None: await client.text_to_voice.remix( voice_id="21m00Tcm4TlvDq8ikWAM", + output_format="mp3_22050_32", voice_description="Make the voice have a higher pitch.", ) diff --git a/src/elevenlabs/text_to_voice/preview/client.py b/src/elevenlabs/text_to_voice/preview/client.py index 1a9f1d5a..59c8159b 100644 --- a/src/elevenlabs/text_to_voice/preview/client.py +++ b/src/elevenlabs/text_to_voice/preview/client.py @@ -40,6 +40,17 @@ def stream( ------- typing.Iterator[bytes] Streaming audio data + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.text_to_voice.preview.stream( + generated_voice_id="generated_voice_id", + ) """ with self._raw_client.stream(generated_voice_id, request_options=request_options) as r: yield from r.data @@ -78,6 +89,25 @@ async def stream( ------- typing.AsyncIterator[bytes] Streaming audio data + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.text_to_voice.preview.stream( + generated_voice_id="generated_voice_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.stream(generated_voice_id, request_options=request_options) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 9da1301e..c3803871 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -62,6 +62,243 @@ from .asr_input_format import AsrInputFormat from .asr_provider import AsrProvider from .asr_quality import AsrQuality + from .ast_and_operator_node import AstAndOperatorNode + from .ast_and_operator_node_children_item import ( + AstAndOperatorNodeChildrenItem, + AstAndOperatorNodeChildrenItem_AndOperator, + AstAndOperatorNodeChildrenItem_BooleanLiteral, + AstAndOperatorNodeChildrenItem_DynamicVariable, + AstAndOperatorNodeChildrenItem_EqOperator, + AstAndOperatorNodeChildrenItem_GtOperator, + AstAndOperatorNodeChildrenItem_GteOperator, + AstAndOperatorNodeChildrenItem_Llm, + AstAndOperatorNodeChildrenItem_LtOperator, + AstAndOperatorNodeChildrenItem_LteOperator, + AstAndOperatorNodeChildrenItem_NeqOperator, + AstAndOperatorNodeChildrenItem_NumberLiteral, + AstAndOperatorNodeChildrenItem_OrOperator, + AstAndOperatorNodeChildrenItem_StringLiteral, + ) + from .ast_boolean_node import AstBooleanNode + from .ast_dynamic_variable_node import AstDynamicVariableNode + from .ast_equals_operator_node import AstEqualsOperatorNode + from .ast_equals_operator_node_left import ( + AstEqualsOperatorNodeLeft, + AstEqualsOperatorNodeLeft_AndOperator, + AstEqualsOperatorNodeLeft_BooleanLiteral, + AstEqualsOperatorNodeLeft_DynamicVariable, + AstEqualsOperatorNodeLeft_EqOperator, + AstEqualsOperatorNodeLeft_GtOperator, + AstEqualsOperatorNodeLeft_GteOperator, + AstEqualsOperatorNodeLeft_Llm, + AstEqualsOperatorNodeLeft_LtOperator, + AstEqualsOperatorNodeLeft_LteOperator, + AstEqualsOperatorNodeLeft_NeqOperator, + AstEqualsOperatorNodeLeft_NumberLiteral, + AstEqualsOperatorNodeLeft_OrOperator, + AstEqualsOperatorNodeLeft_StringLiteral, + ) + from .ast_equals_operator_node_right import ( + AstEqualsOperatorNodeRight, + AstEqualsOperatorNodeRight_AndOperator, + AstEqualsOperatorNodeRight_BooleanLiteral, + AstEqualsOperatorNodeRight_DynamicVariable, + AstEqualsOperatorNodeRight_EqOperator, + AstEqualsOperatorNodeRight_GtOperator, + AstEqualsOperatorNodeRight_GteOperator, + AstEqualsOperatorNodeRight_Llm, + AstEqualsOperatorNodeRight_LtOperator, + AstEqualsOperatorNodeRight_LteOperator, + AstEqualsOperatorNodeRight_NeqOperator, + AstEqualsOperatorNodeRight_NumberLiteral, + AstEqualsOperatorNodeRight_OrOperator, + AstEqualsOperatorNodeRight_StringLiteral, + ) + from .ast_greater_than_operator_node import AstGreaterThanOperatorNode + from .ast_greater_than_operator_node_left import ( + AstGreaterThanOperatorNodeLeft, + AstGreaterThanOperatorNodeLeft_AndOperator, + AstGreaterThanOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOperatorNodeLeft_DynamicVariable, + AstGreaterThanOperatorNodeLeft_EqOperator, + AstGreaterThanOperatorNodeLeft_GtOperator, + AstGreaterThanOperatorNodeLeft_GteOperator, + AstGreaterThanOperatorNodeLeft_Llm, + AstGreaterThanOperatorNodeLeft_LtOperator, + AstGreaterThanOperatorNodeLeft_LteOperator, + AstGreaterThanOperatorNodeLeft_NeqOperator, + AstGreaterThanOperatorNodeLeft_NumberLiteral, + AstGreaterThanOperatorNodeLeft_OrOperator, + AstGreaterThanOperatorNodeLeft_StringLiteral, + ) + from .ast_greater_than_operator_node_right import ( + AstGreaterThanOperatorNodeRight, + AstGreaterThanOperatorNodeRight_AndOperator, + AstGreaterThanOperatorNodeRight_BooleanLiteral, + AstGreaterThanOperatorNodeRight_DynamicVariable, + AstGreaterThanOperatorNodeRight_EqOperator, + AstGreaterThanOperatorNodeRight_GtOperator, + AstGreaterThanOperatorNodeRight_GteOperator, + AstGreaterThanOperatorNodeRight_Llm, + AstGreaterThanOperatorNodeRight_LtOperator, + AstGreaterThanOperatorNodeRight_LteOperator, + AstGreaterThanOperatorNodeRight_NeqOperator, + AstGreaterThanOperatorNodeRight_NumberLiteral, + AstGreaterThanOperatorNodeRight_OrOperator, + AstGreaterThanOperatorNodeRight_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode + from .ast_greater_than_or_equals_operator_node_left import ( + AstGreaterThanOrEqualsOperatorNodeLeft, + AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node_right import ( + AstGreaterThanOrEqualsOperatorNodeRight, + AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_Llm, + AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, + ) + from .ast_less_than_operator_node import AstLessThanOperatorNode + from .ast_less_than_operator_node_left import ( + AstLessThanOperatorNodeLeft, + AstLessThanOperatorNodeLeft_AndOperator, + AstLessThanOperatorNodeLeft_BooleanLiteral, + AstLessThanOperatorNodeLeft_DynamicVariable, + AstLessThanOperatorNodeLeft_EqOperator, + AstLessThanOperatorNodeLeft_GtOperator, + AstLessThanOperatorNodeLeft_GteOperator, + AstLessThanOperatorNodeLeft_Llm, + AstLessThanOperatorNodeLeft_LtOperator, + AstLessThanOperatorNodeLeft_LteOperator, + AstLessThanOperatorNodeLeft_NeqOperator, + AstLessThanOperatorNodeLeft_NumberLiteral, + AstLessThanOperatorNodeLeft_OrOperator, + AstLessThanOperatorNodeLeft_StringLiteral, + ) + from .ast_less_than_operator_node_right import ( + AstLessThanOperatorNodeRight, + AstLessThanOperatorNodeRight_AndOperator, + AstLessThanOperatorNodeRight_BooleanLiteral, + AstLessThanOperatorNodeRight_DynamicVariable, + AstLessThanOperatorNodeRight_EqOperator, + AstLessThanOperatorNodeRight_GtOperator, + AstLessThanOperatorNodeRight_GteOperator, + AstLessThanOperatorNodeRight_Llm, + AstLessThanOperatorNodeRight_LtOperator, + AstLessThanOperatorNodeRight_LteOperator, + AstLessThanOperatorNodeRight_NeqOperator, + AstLessThanOperatorNodeRight_NumberLiteral, + AstLessThanOperatorNodeRight_OrOperator, + AstLessThanOperatorNodeRight_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode + from .ast_less_than_or_equals_operator_node_left import ( + AstLessThanOrEqualsOperatorNodeLeft, + AstLessThanOrEqualsOperatorNodeLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeLeft_Llm, + AstLessThanOrEqualsOperatorNodeLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node_right import ( + AstLessThanOrEqualsOperatorNodeRight, + AstLessThanOrEqualsOperatorNodeRight_AndOperator, + AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeRight_EqOperator, + AstLessThanOrEqualsOperatorNodeRight_GtOperator, + AstLessThanOrEqualsOperatorNodeRight_GteOperator, + AstLessThanOrEqualsOperatorNodeRight_Llm, + AstLessThanOrEqualsOperatorNodeRight_LtOperator, + AstLessThanOrEqualsOperatorNodeRight_LteOperator, + AstLessThanOrEqualsOperatorNodeRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeRight_OrOperator, + AstLessThanOrEqualsOperatorNodeRight_StringLiteral, + ) + from .ast_not_equals_operator_node import AstNotEqualsOperatorNode + from .ast_not_equals_operator_node_left import ( + AstNotEqualsOperatorNodeLeft, + AstNotEqualsOperatorNodeLeft_AndOperator, + AstNotEqualsOperatorNodeLeft_BooleanLiteral, + AstNotEqualsOperatorNodeLeft_DynamicVariable, + AstNotEqualsOperatorNodeLeft_EqOperator, + AstNotEqualsOperatorNodeLeft_GtOperator, + AstNotEqualsOperatorNodeLeft_GteOperator, + AstNotEqualsOperatorNodeLeft_Llm, + AstNotEqualsOperatorNodeLeft_LtOperator, + AstNotEqualsOperatorNodeLeft_LteOperator, + AstNotEqualsOperatorNodeLeft_NeqOperator, + AstNotEqualsOperatorNodeLeft_NumberLiteral, + AstNotEqualsOperatorNodeLeft_OrOperator, + AstNotEqualsOperatorNodeLeft_StringLiteral, + ) + from .ast_not_equals_operator_node_right import ( + AstNotEqualsOperatorNodeRight, + AstNotEqualsOperatorNodeRight_AndOperator, + AstNotEqualsOperatorNodeRight_BooleanLiteral, + AstNotEqualsOperatorNodeRight_DynamicVariable, + AstNotEqualsOperatorNodeRight_EqOperator, + AstNotEqualsOperatorNodeRight_GtOperator, + AstNotEqualsOperatorNodeRight_GteOperator, + AstNotEqualsOperatorNodeRight_Llm, + AstNotEqualsOperatorNodeRight_LtOperator, + AstNotEqualsOperatorNodeRight_LteOperator, + AstNotEqualsOperatorNodeRight_NeqOperator, + AstNotEqualsOperatorNodeRight_NumberLiteral, + AstNotEqualsOperatorNodeRight_OrOperator, + AstNotEqualsOperatorNodeRight_StringLiteral, + ) + from .ast_number_node import AstNumberNode + from .ast_or_operator_node import AstOrOperatorNode + from .ast_or_operator_node_children_item import ( + AstOrOperatorNodeChildrenItem, + AstOrOperatorNodeChildrenItem_AndOperator, + AstOrOperatorNodeChildrenItem_BooleanLiteral, + AstOrOperatorNodeChildrenItem_DynamicVariable, + AstOrOperatorNodeChildrenItem_EqOperator, + AstOrOperatorNodeChildrenItem_GtOperator, + AstOrOperatorNodeChildrenItem_GteOperator, + AstOrOperatorNodeChildrenItem_Llm, + AstOrOperatorNodeChildrenItem_LtOperator, + AstOrOperatorNodeChildrenItem_LteOperator, + AstOrOperatorNodeChildrenItem_NeqOperator, + AstOrOperatorNodeChildrenItem_NumberLiteral, + AstOrOperatorNodeChildrenItem_OrOperator, + AstOrOperatorNodeChildrenItem_StringLiteral, + ) + from .ast_string_node import AstStringNode + from .astllm_node import AstllmNode from .attached_test_model import AttachedTestModel from .audio_native_create_project_response_model import AudioNativeCreateProjectResponseModel from .audio_native_edit_content_response_model import AudioNativeEditContentResponseModel @@ -466,6 +703,7 @@ ) from .get_pronunciation_dictionary_response import GetPronunciationDictionaryResponse from .get_speech_history_response import GetSpeechHistoryResponse + from .get_test_invocations_page_response_model import GetTestInvocationsPageResponseModel from .get_test_suite_invocation_response_model import GetTestSuiteInvocationResponseModel from .get_tests_page_response_model import GetTestsPageResponseModel from .get_tests_summaries_by_ids_response_model import GetTestsSummariesByIdsResponseModel @@ -509,6 +747,7 @@ from .library_voice_response import LibraryVoiceResponse from .library_voice_response_model_category import LibraryVoiceResponseModelCategory from .list_mcp_tools_response_model import ListMcpToolsResponseModel + from .list_response_meta import ListResponseMeta from .literal_json_schema_property import LiteralJsonSchemaProperty from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType @@ -768,6 +1007,9 @@ from .telephony_provider import TelephonyProvider from .test_condition_rationale_common_model import TestConditionRationaleCommonModel from .test_condition_result_common_model import TestConditionResultCommonModel + from .test_from_conversation_metadata_input import TestFromConversationMetadataInput + from .test_from_conversation_metadata_output import TestFromConversationMetadataOutput + from .test_invocation_summary_response_model import TestInvocationSummaryResponseModel from .test_run_metadata import TestRunMetadata from .test_run_metadata_test_type import TestRunMetadataTestType from .test_run_status import TestRunStatus @@ -775,6 +1017,7 @@ from .tests_feature_usage_common_model import TestsFeatureUsageCommonModel from .text_to_speech_apply_text_normalization_enum import TextToSpeechApplyTextNormalizationEnum from .text_to_speech_output_format_enum import TextToSpeechOutputFormatEnum + from .text_to_speech_request import TextToSpeechRequest from .text_to_speech_stream_request import TextToSpeechStreamRequest from .text_to_speech_stream_with_timestamps_request import TextToSpeechStreamWithTimestampsRequest from .text_to_speech_with_timestamps_request import TextToSpeechWithTimestampsRequest @@ -920,17 +1163,36 @@ from .workflow_edge_model import WorkflowEdgeModel from .workflow_edge_model_backward_condition import ( WorkflowEdgeModelBackwardCondition, + WorkflowEdgeModelBackwardCondition_Expression, WorkflowEdgeModelBackwardCondition_Llm, WorkflowEdgeModelBackwardCondition_Result, WorkflowEdgeModelBackwardCondition_Unconditional, ) from .workflow_edge_model_forward_condition import ( WorkflowEdgeModelForwardCondition, + WorkflowEdgeModelForwardCondition_Expression, WorkflowEdgeModelForwardCondition_Llm, WorkflowEdgeModelForwardCondition_Result, WorkflowEdgeModelForwardCondition_Unconditional, ) from .workflow_end_node_model import WorkflowEndNodeModel + from .workflow_expression_condition_model import WorkflowExpressionConditionModel + from .workflow_expression_condition_model_expression import ( + WorkflowExpressionConditionModelExpression, + WorkflowExpressionConditionModelExpression_AndOperator, + WorkflowExpressionConditionModelExpression_BooleanLiteral, + WorkflowExpressionConditionModelExpression_DynamicVariable, + WorkflowExpressionConditionModelExpression_EqOperator, + WorkflowExpressionConditionModelExpression_GtOperator, + WorkflowExpressionConditionModelExpression_GteOperator, + WorkflowExpressionConditionModelExpression_Llm, + WorkflowExpressionConditionModelExpression_LtOperator, + WorkflowExpressionConditionModelExpression_LteOperator, + WorkflowExpressionConditionModelExpression_NeqOperator, + WorkflowExpressionConditionModelExpression_NumberLiteral, + WorkflowExpressionConditionModelExpression_OrOperator, + WorkflowExpressionConditionModelExpression_StringLiteral, + ) from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel from .workflow_llm_condition_model import WorkflowLlmConditionModel from .workflow_override_agent_node_model import WorkflowOverrideAgentNodeModel @@ -1035,6 +1297,215 @@ "AsrInputFormat": ".asr_input_format", "AsrProvider": ".asr_provider", "AsrQuality": ".asr_quality", + "AstAndOperatorNode": ".ast_and_operator_node", + "AstAndOperatorNodeChildrenItem": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_AndOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_BooleanLiteral": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_DynamicVariable": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_EqOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_GtOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_GteOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_Llm": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_LtOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_LteOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_NeqOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_NumberLiteral": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_OrOperator": ".ast_and_operator_node_children_item", + "AstAndOperatorNodeChildrenItem_StringLiteral": ".ast_and_operator_node_children_item", + "AstBooleanNode": ".ast_boolean_node", + "AstDynamicVariableNode": ".ast_dynamic_variable_node", + "AstEqualsOperatorNode": ".ast_equals_operator_node", + "AstEqualsOperatorNodeLeft": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_AndOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_BooleanLiteral": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_DynamicVariable": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_EqOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_GtOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_GteOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_Llm": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_LtOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_LteOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_NeqOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_NumberLiteral": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_OrOperator": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeLeft_StringLiteral": ".ast_equals_operator_node_left", + "AstEqualsOperatorNodeRight": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_AndOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_BooleanLiteral": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_DynamicVariable": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_EqOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_GtOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_GteOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_Llm": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_LtOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_LteOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_NeqOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_NumberLiteral": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_OrOperator": ".ast_equals_operator_node_right", + "AstEqualsOperatorNodeRight_StringLiteral": ".ast_equals_operator_node_right", + "AstGreaterThanOperatorNode": ".ast_greater_than_operator_node", + "AstGreaterThanOperatorNodeLeft": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_AndOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_BooleanLiteral": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_DynamicVariable": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_EqOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_GtOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_GteOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_Llm": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_LtOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_LteOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_NeqOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_NumberLiteral": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_OrOperator": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeLeft_StringLiteral": ".ast_greater_than_operator_node_left", + "AstGreaterThanOperatorNodeRight": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_AndOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_BooleanLiteral": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_DynamicVariable": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_EqOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_GtOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_GteOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_Llm": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_LtOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_LteOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_NeqOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_NumberLiteral": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_OrOperator": ".ast_greater_than_operator_node_right", + "AstGreaterThanOperatorNodeRight_StringLiteral": ".ast_greater_than_operator_node_right", + "AstGreaterThanOrEqualsOperatorNode": ".ast_greater_than_or_equals_operator_node", + "AstGreaterThanOrEqualsOperatorNodeLeft": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_Llm": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral": ".ast_greater_than_or_equals_operator_node_left", + "AstGreaterThanOrEqualsOperatorNodeRight": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_Llm": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator": ".ast_greater_than_or_equals_operator_node_right", + "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral": ".ast_greater_than_or_equals_operator_node_right", + "AstLessThanOperatorNode": ".ast_less_than_operator_node", + "AstLessThanOperatorNodeLeft": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_AndOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_BooleanLiteral": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_DynamicVariable": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_EqOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_GtOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_GteOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_Llm": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_LtOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_LteOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_NeqOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_NumberLiteral": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_OrOperator": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeLeft_StringLiteral": ".ast_less_than_operator_node_left", + "AstLessThanOperatorNodeRight": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_AndOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_BooleanLiteral": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_DynamicVariable": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_EqOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_GtOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_GteOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_Llm": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_LtOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_LteOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_NeqOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_NumberLiteral": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_OrOperator": ".ast_less_than_operator_node_right", + "AstLessThanOperatorNodeRight_StringLiteral": ".ast_less_than_operator_node_right", + "AstLessThanOrEqualsOperatorNode": ".ast_less_than_or_equals_operator_node", + "AstLessThanOrEqualsOperatorNodeLeft": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_AndOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_EqOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_GtOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_GteOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_Llm": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_LtOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_LteOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_OrOperator": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral": ".ast_less_than_or_equals_operator_node_left", + "AstLessThanOrEqualsOperatorNodeRight": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_AndOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_EqOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_GtOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_GteOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_Llm": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_LtOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_LteOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_NeqOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_OrOperator": ".ast_less_than_or_equals_operator_node_right", + "AstLessThanOrEqualsOperatorNodeRight_StringLiteral": ".ast_less_than_or_equals_operator_node_right", + "AstNotEqualsOperatorNode": ".ast_not_equals_operator_node", + "AstNotEqualsOperatorNodeLeft": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_AndOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_BooleanLiteral": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_DynamicVariable": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_EqOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_GtOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_GteOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_Llm": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_LtOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_LteOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_NeqOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_NumberLiteral": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_OrOperator": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeLeft_StringLiteral": ".ast_not_equals_operator_node_left", + "AstNotEqualsOperatorNodeRight": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_AndOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_BooleanLiteral": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_DynamicVariable": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_EqOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_GtOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_GteOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_Llm": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_LtOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_LteOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_NeqOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_NumberLiteral": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_OrOperator": ".ast_not_equals_operator_node_right", + "AstNotEqualsOperatorNodeRight_StringLiteral": ".ast_not_equals_operator_node_right", + "AstNumberNode": ".ast_number_node", + "AstOrOperatorNode": ".ast_or_operator_node", + "AstOrOperatorNodeChildrenItem": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_AndOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_BooleanLiteral": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_DynamicVariable": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_EqOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_GtOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_GteOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_Llm": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_LtOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_LteOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_NeqOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_NumberLiteral": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_OrOperator": ".ast_or_operator_node_children_item", + "AstOrOperatorNodeChildrenItem_StringLiteral": ".ast_or_operator_node_children_item", + "AstStringNode": ".ast_string_node", + "AstllmNode": ".astllm_node", "AttachedTestModel": ".attached_test_model", "AudioNativeCreateProjectResponseModel": ".audio_native_create_project_response_model", "AudioNativeEditContentResponseModel": ".audio_native_edit_content_response_model", @@ -1353,6 +1824,7 @@ "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource": ".get_pronunciation_dictionary_metadata_response_model_permission_on_resource", "GetPronunciationDictionaryResponse": ".get_pronunciation_dictionary_response", "GetSpeechHistoryResponse": ".get_speech_history_response", + "GetTestInvocationsPageResponseModel": ".get_test_invocations_page_response_model", "GetTestSuiteInvocationResponseModel": ".get_test_suite_invocation_response_model", "GetTestsPageResponseModel": ".get_tests_page_response_model", "GetTestsSummariesByIdsResponseModel": ".get_tests_summaries_by_ids_response_model", @@ -1394,6 +1866,7 @@ "LibraryVoiceResponse": ".library_voice_response", "LibraryVoiceResponseModelCategory": ".library_voice_response_model_category", "ListMcpToolsResponseModel": ".list_mcp_tools_response_model", + "ListResponseMeta": ".list_response_meta", "LiteralJsonSchemaProperty": ".literal_json_schema_property", "LiteralJsonSchemaPropertyConstantValue": ".literal_json_schema_property_constant_value", "LiteralJsonSchemaPropertyType": ".literal_json_schema_property_type", @@ -1633,6 +2106,9 @@ "TelephonyProvider": ".telephony_provider", "TestConditionRationaleCommonModel": ".test_condition_rationale_common_model", "TestConditionResultCommonModel": ".test_condition_result_common_model", + "TestFromConversationMetadataInput": ".test_from_conversation_metadata_input", + "TestFromConversationMetadataOutput": ".test_from_conversation_metadata_output", + "TestInvocationSummaryResponseModel": ".test_invocation_summary_response_model", "TestRunMetadata": ".test_run_metadata", "TestRunMetadataTestType": ".test_run_metadata_test_type", "TestRunStatus": ".test_run_status", @@ -1640,6 +2116,7 @@ "TestsFeatureUsageCommonModel": ".tests_feature_usage_common_model", "TextToSpeechApplyTextNormalizationEnum": ".text_to_speech_apply_text_normalization_enum", "TextToSpeechOutputFormatEnum": ".text_to_speech_output_format_enum", + "TextToSpeechRequest": ".text_to_speech_request", "TextToSpeechStreamRequest": ".text_to_speech_stream_request", "TextToSpeechStreamWithTimestampsRequest": ".text_to_speech_stream_with_timestamps_request", "TextToSpeechWithTimestampsRequest": ".text_to_speech_with_timestamps_request", @@ -1768,14 +2245,31 @@ "WidgetTextContents": ".widget_text_contents", "WorkflowEdgeModel": ".workflow_edge_model", "WorkflowEdgeModelBackwardCondition": ".workflow_edge_model_backward_condition", + "WorkflowEdgeModelBackwardCondition_Expression": ".workflow_edge_model_backward_condition", "WorkflowEdgeModelBackwardCondition_Llm": ".workflow_edge_model_backward_condition", "WorkflowEdgeModelBackwardCondition_Result": ".workflow_edge_model_backward_condition", "WorkflowEdgeModelBackwardCondition_Unconditional": ".workflow_edge_model_backward_condition", "WorkflowEdgeModelForwardCondition": ".workflow_edge_model_forward_condition", + "WorkflowEdgeModelForwardCondition_Expression": ".workflow_edge_model_forward_condition", "WorkflowEdgeModelForwardCondition_Llm": ".workflow_edge_model_forward_condition", "WorkflowEdgeModelForwardCondition_Result": ".workflow_edge_model_forward_condition", "WorkflowEdgeModelForwardCondition_Unconditional": ".workflow_edge_model_forward_condition", "WorkflowEndNodeModel": ".workflow_end_node_model", + "WorkflowExpressionConditionModel": ".workflow_expression_condition_model", + "WorkflowExpressionConditionModelExpression": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_AndOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_BooleanLiteral": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_DynamicVariable": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_EqOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_GtOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_GteOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_Llm": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_LtOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_LteOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_NeqOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_NumberLiteral": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_OrOperator": ".workflow_expression_condition_model_expression", + "WorkflowExpressionConditionModelExpression_StringLiteral": ".workflow_expression_condition_model_expression", "WorkflowFeaturesUsageCommonModel": ".workflow_features_usage_common_model", "WorkflowLlmConditionModel": ".workflow_llm_condition_model", "WorkflowOverrideAgentNodeModel": ".workflow_override_agent_node_model", @@ -1892,6 +2386,215 @@ def __dir__(): "AsrInputFormat", "AsrProvider", "AsrQuality", + "AstAndOperatorNode", + "AstAndOperatorNodeChildrenItem", + "AstAndOperatorNodeChildrenItem_AndOperator", + "AstAndOperatorNodeChildrenItem_BooleanLiteral", + "AstAndOperatorNodeChildrenItem_DynamicVariable", + "AstAndOperatorNodeChildrenItem_EqOperator", + "AstAndOperatorNodeChildrenItem_GtOperator", + "AstAndOperatorNodeChildrenItem_GteOperator", + "AstAndOperatorNodeChildrenItem_Llm", + "AstAndOperatorNodeChildrenItem_LtOperator", + "AstAndOperatorNodeChildrenItem_LteOperator", + "AstAndOperatorNodeChildrenItem_NeqOperator", + "AstAndOperatorNodeChildrenItem_NumberLiteral", + "AstAndOperatorNodeChildrenItem_OrOperator", + "AstAndOperatorNodeChildrenItem_StringLiteral", + "AstBooleanNode", + "AstDynamicVariableNode", + "AstEqualsOperatorNode", + "AstEqualsOperatorNodeLeft", + "AstEqualsOperatorNodeLeft_AndOperator", + "AstEqualsOperatorNodeLeft_BooleanLiteral", + "AstEqualsOperatorNodeLeft_DynamicVariable", + "AstEqualsOperatorNodeLeft_EqOperator", + "AstEqualsOperatorNodeLeft_GtOperator", + "AstEqualsOperatorNodeLeft_GteOperator", + "AstEqualsOperatorNodeLeft_Llm", + "AstEqualsOperatorNodeLeft_LtOperator", + "AstEqualsOperatorNodeLeft_LteOperator", + "AstEqualsOperatorNodeLeft_NeqOperator", + "AstEqualsOperatorNodeLeft_NumberLiteral", + "AstEqualsOperatorNodeLeft_OrOperator", + "AstEqualsOperatorNodeLeft_StringLiteral", + "AstEqualsOperatorNodeRight", + "AstEqualsOperatorNodeRight_AndOperator", + "AstEqualsOperatorNodeRight_BooleanLiteral", + "AstEqualsOperatorNodeRight_DynamicVariable", + "AstEqualsOperatorNodeRight_EqOperator", + "AstEqualsOperatorNodeRight_GtOperator", + "AstEqualsOperatorNodeRight_GteOperator", + "AstEqualsOperatorNodeRight_Llm", + "AstEqualsOperatorNodeRight_LtOperator", + "AstEqualsOperatorNodeRight_LteOperator", + "AstEqualsOperatorNodeRight_NeqOperator", + "AstEqualsOperatorNodeRight_NumberLiteral", + "AstEqualsOperatorNodeRight_OrOperator", + "AstEqualsOperatorNodeRight_StringLiteral", + "AstGreaterThanOperatorNode", + "AstGreaterThanOperatorNodeLeft", + "AstGreaterThanOperatorNodeLeft_AndOperator", + "AstGreaterThanOperatorNodeLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeLeft_DynamicVariable", + "AstGreaterThanOperatorNodeLeft_EqOperator", + "AstGreaterThanOperatorNodeLeft_GtOperator", + "AstGreaterThanOperatorNodeLeft_GteOperator", + "AstGreaterThanOperatorNodeLeft_Llm", + "AstGreaterThanOperatorNodeLeft_LtOperator", + "AstGreaterThanOperatorNodeLeft_LteOperator", + "AstGreaterThanOperatorNodeLeft_NeqOperator", + "AstGreaterThanOperatorNodeLeft_NumberLiteral", + "AstGreaterThanOperatorNodeLeft_OrOperator", + "AstGreaterThanOperatorNodeLeft_StringLiteral", + "AstGreaterThanOperatorNodeRight", + "AstGreaterThanOperatorNodeRight_AndOperator", + "AstGreaterThanOperatorNodeRight_BooleanLiteral", + "AstGreaterThanOperatorNodeRight_DynamicVariable", + "AstGreaterThanOperatorNodeRight_EqOperator", + "AstGreaterThanOperatorNodeRight_GtOperator", + "AstGreaterThanOperatorNodeRight_GteOperator", + "AstGreaterThanOperatorNodeRight_Llm", + "AstGreaterThanOperatorNodeRight_LtOperator", + "AstGreaterThanOperatorNodeRight_LteOperator", + "AstGreaterThanOperatorNodeRight_NeqOperator", + "AstGreaterThanOperatorNodeRight_NumberLiteral", + "AstGreaterThanOperatorNodeRight_OrOperator", + "AstGreaterThanOperatorNodeRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNode", + "AstGreaterThanOrEqualsOperatorNodeLeft", + "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight", + "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral", + "AstLessThanOperatorNode", + "AstLessThanOperatorNodeLeft", + "AstLessThanOperatorNodeLeft_AndOperator", + "AstLessThanOperatorNodeLeft_BooleanLiteral", + "AstLessThanOperatorNodeLeft_DynamicVariable", + "AstLessThanOperatorNodeLeft_EqOperator", + "AstLessThanOperatorNodeLeft_GtOperator", + "AstLessThanOperatorNodeLeft_GteOperator", + "AstLessThanOperatorNodeLeft_Llm", + "AstLessThanOperatorNodeLeft_LtOperator", + "AstLessThanOperatorNodeLeft_LteOperator", + "AstLessThanOperatorNodeLeft_NeqOperator", + "AstLessThanOperatorNodeLeft_NumberLiteral", + "AstLessThanOperatorNodeLeft_OrOperator", + "AstLessThanOperatorNodeLeft_StringLiteral", + "AstLessThanOperatorNodeRight", + "AstLessThanOperatorNodeRight_AndOperator", + "AstLessThanOperatorNodeRight_BooleanLiteral", + "AstLessThanOperatorNodeRight_DynamicVariable", + "AstLessThanOperatorNodeRight_EqOperator", + "AstLessThanOperatorNodeRight_GtOperator", + "AstLessThanOperatorNodeRight_GteOperator", + "AstLessThanOperatorNodeRight_Llm", + "AstLessThanOperatorNodeRight_LtOperator", + "AstLessThanOperatorNodeRight_LteOperator", + "AstLessThanOperatorNodeRight_NeqOperator", + "AstLessThanOperatorNodeRight_NumberLiteral", + "AstLessThanOperatorNodeRight_OrOperator", + "AstLessThanOperatorNodeRight_StringLiteral", + "AstLessThanOrEqualsOperatorNode", + "AstLessThanOrEqualsOperatorNodeLeft", + "AstLessThanOrEqualsOperatorNodeLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeLeft_Llm", + "AstLessThanOrEqualsOperatorNodeLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeRight", + "AstLessThanOrEqualsOperatorNodeRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeRight_Llm", + "AstLessThanOrEqualsOperatorNodeRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeRight_StringLiteral", + "AstNotEqualsOperatorNode", + "AstNotEqualsOperatorNodeLeft", + "AstNotEqualsOperatorNodeLeft_AndOperator", + "AstNotEqualsOperatorNodeLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeLeft_DynamicVariable", + "AstNotEqualsOperatorNodeLeft_EqOperator", + "AstNotEqualsOperatorNodeLeft_GtOperator", + "AstNotEqualsOperatorNodeLeft_GteOperator", + "AstNotEqualsOperatorNodeLeft_Llm", + "AstNotEqualsOperatorNodeLeft_LtOperator", + "AstNotEqualsOperatorNodeLeft_LteOperator", + "AstNotEqualsOperatorNodeLeft_NeqOperator", + "AstNotEqualsOperatorNodeLeft_NumberLiteral", + "AstNotEqualsOperatorNodeLeft_OrOperator", + "AstNotEqualsOperatorNodeLeft_StringLiteral", + "AstNotEqualsOperatorNodeRight", + "AstNotEqualsOperatorNodeRight_AndOperator", + "AstNotEqualsOperatorNodeRight_BooleanLiteral", + "AstNotEqualsOperatorNodeRight_DynamicVariable", + "AstNotEqualsOperatorNodeRight_EqOperator", + "AstNotEqualsOperatorNodeRight_GtOperator", + "AstNotEqualsOperatorNodeRight_GteOperator", + "AstNotEqualsOperatorNodeRight_Llm", + "AstNotEqualsOperatorNodeRight_LtOperator", + "AstNotEqualsOperatorNodeRight_LteOperator", + "AstNotEqualsOperatorNodeRight_NeqOperator", + "AstNotEqualsOperatorNodeRight_NumberLiteral", + "AstNotEqualsOperatorNodeRight_OrOperator", + "AstNotEqualsOperatorNodeRight_StringLiteral", + "AstNumberNode", + "AstOrOperatorNode", + "AstOrOperatorNodeChildrenItem", + "AstOrOperatorNodeChildrenItem_AndOperator", + "AstOrOperatorNodeChildrenItem_BooleanLiteral", + "AstOrOperatorNodeChildrenItem_DynamicVariable", + "AstOrOperatorNodeChildrenItem_EqOperator", + "AstOrOperatorNodeChildrenItem_GtOperator", + "AstOrOperatorNodeChildrenItem_GteOperator", + "AstOrOperatorNodeChildrenItem_Llm", + "AstOrOperatorNodeChildrenItem_LtOperator", + "AstOrOperatorNodeChildrenItem_LteOperator", + "AstOrOperatorNodeChildrenItem_NeqOperator", + "AstOrOperatorNodeChildrenItem_NumberLiteral", + "AstOrOperatorNodeChildrenItem_OrOperator", + "AstOrOperatorNodeChildrenItem_StringLiteral", + "AstStringNode", + "AstllmNode", "AttachedTestModel", "AudioNativeCreateProjectResponseModel", "AudioNativeEditContentResponseModel", @@ -2210,6 +2913,7 @@ def __dir__(): "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", "GetSpeechHistoryResponse", + "GetTestInvocationsPageResponseModel", "GetTestSuiteInvocationResponseModel", "GetTestsPageResponseModel", "GetTestsSummariesByIdsResponseModel", @@ -2251,6 +2955,7 @@ def __dir__(): "LibraryVoiceResponse", "LibraryVoiceResponseModelCategory", "ListMcpToolsResponseModel", + "ListResponseMeta", "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", @@ -2490,6 +3195,9 @@ def __dir__(): "TelephonyProvider", "TestConditionRationaleCommonModel", "TestConditionResultCommonModel", + "TestFromConversationMetadataInput", + "TestFromConversationMetadataOutput", + "TestInvocationSummaryResponseModel", "TestRunMetadata", "TestRunMetadataTestType", "TestRunStatus", @@ -2497,6 +3205,7 @@ def __dir__(): "TestsFeatureUsageCommonModel", "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechOutputFormatEnum", + "TextToSpeechRequest", "TextToSpeechStreamRequest", "TextToSpeechStreamWithTimestampsRequest", "TextToSpeechWithTimestampsRequest", @@ -2625,14 +3334,31 @@ def __dir__(): "WidgetTextContents", "WorkflowEdgeModel", "WorkflowEdgeModelBackwardCondition", + "WorkflowEdgeModelBackwardCondition_Expression", "WorkflowEdgeModelBackwardCondition_Llm", "WorkflowEdgeModelBackwardCondition_Result", "WorkflowEdgeModelBackwardCondition_Unconditional", "WorkflowEdgeModelForwardCondition", + "WorkflowEdgeModelForwardCondition_Expression", "WorkflowEdgeModelForwardCondition_Llm", "WorkflowEdgeModelForwardCondition_Result", "WorkflowEdgeModelForwardCondition_Unconditional", "WorkflowEndNodeModel", + "WorkflowExpressionConditionModel", + "WorkflowExpressionConditionModelExpression", + "WorkflowExpressionConditionModelExpression_AndOperator", + "WorkflowExpressionConditionModelExpression_BooleanLiteral", + "WorkflowExpressionConditionModelExpression_DynamicVariable", + "WorkflowExpressionConditionModelExpression_EqOperator", + "WorkflowExpressionConditionModelExpression_GtOperator", + "WorkflowExpressionConditionModelExpression_GteOperator", + "WorkflowExpressionConditionModelExpression_Llm", + "WorkflowExpressionConditionModelExpression_LtOperator", + "WorkflowExpressionConditionModelExpression_LteOperator", + "WorkflowExpressionConditionModelExpression_NeqOperator", + "WorkflowExpressionConditionModelExpression_NumberLiteral", + "WorkflowExpressionConditionModelExpression_OrOperator", + "WorkflowExpressionConditionModelExpression_StringLiteral", "WorkflowFeaturesUsageCommonModel", "WorkflowLlmConditionModel", "WorkflowOverrideAgentNodeModel", diff --git a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py index ec8bde42..b13c18d8 100644 --- a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py +++ b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py @@ -30,6 +30,14 @@ class Config: from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 update_forward_refs(AdhocAgentConfigOverrideForTestRequestModel) diff --git a/src/elevenlabs/types/agent_platform_settings_request_model.py b/src/elevenlabs/types/agent_platform_settings_request_model.py index af9cfa40..a99e36f0 100644 --- a/src/elevenlabs/types/agent_platform_settings_request_model.py +++ b/src/elevenlabs/types/agent_platform_settings_request_model.py @@ -62,6 +62,11 @@ class AgentPlatformSettingsRequestModel(UncheckedBaseModel): Testing configuration for the agent """ + archived: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the agent is archived + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/agent_platform_settings_response_model.py b/src/elevenlabs/types/agent_platform_settings_response_model.py index a4711e13..55306932 100644 --- a/src/elevenlabs/types/agent_platform_settings_response_model.py +++ b/src/elevenlabs/types/agent_platform_settings_response_model.py @@ -63,6 +63,11 @@ class AgentPlatformSettingsResponseModel(UncheckedBaseModel): Testing configuration for the agent """ + archived: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the agent is archived + """ + safety: typing.Optional[SafetyResponseModel] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/agent_workflow_request_model.py b/src/elevenlabs/types/agent_workflow_request_model.py index 12041f67..4769bee5 100644 --- a/src/elevenlabs/types/agent_workflow_request_model.py +++ b/src/elevenlabs/types/agent_workflow_request_model.py @@ -25,6 +25,14 @@ class Config: extra = pydantic.Extra.allow +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 diff --git a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py index bf449b87..de302d71 100644 --- a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py +++ b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py @@ -19,6 +19,7 @@ class AgentWorkflowRequestModelNodesValue_End(UncheckedBaseModel): type: typing.Literal["end"] = "end" position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -37,6 +38,7 @@ class AgentWorkflowRequestModelNodesValue_OverrideAgent(UncheckedBaseModel): additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = None additional_tool_ids: typing.Optional[typing.List[str]] = None position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None label: str if IS_PYDANTIC_V2: @@ -56,6 +58,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_PhoneNumber(UncheckedBaseModel): type: typing.Literal["phone_number"] = "phone_number" position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination transfer_type: typing.Optional[TransferTypeEnum] = None @@ -72,6 +75,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_StandaloneAgent(UncheckedBaseModel): type: typing.Literal["standalone_agent"] = "standalone_agent" position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None agent_id: str delay_ms: typing.Optional[int] = None transfer_message: typing.Optional[str] = None @@ -90,6 +94,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_Start(UncheckedBaseModel): type: typing.Literal["start"] = "start" position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -104,6 +109,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_Tool(UncheckedBaseModel): type: typing.Literal["tool"] = "tool" position: typing.Optional[Position] = None + edge_order: typing.Optional[typing.List[str]] = None tools: typing.Optional[typing.List[WorkflowToolLocator]] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/ast_and_operator_node.py b/src/elevenlabs/types/ast_and_operator_node.py new file mode 100644 index 00000000..1dae1dc4 --- /dev/null +++ b/src/elevenlabs/types/ast_and_operator_node.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstAndOperatorNode(UncheckedBaseModel): + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNode) diff --git a/src/elevenlabs/types/ast_and_operator_node_children_item.py b/src/elevenlabs/types/ast_and_operator_node_children_item.py new file mode 100644 index 00000000..e9f16b48 --- /dev/null +++ b/src/elevenlabs/types/ast_and_operator_node_children_item.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstAndOperatorNodeChildrenItem_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeChildrenItem_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstAndOperatorNodeChildrenItem_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstAndOperatorNodeChildrenItem = typing_extensions.Annotated[ + typing.Union[ + AstAndOperatorNodeChildrenItem_AndOperator, + AstAndOperatorNodeChildrenItem_BooleanLiteral, + AstAndOperatorNodeChildrenItem_DynamicVariable, + AstAndOperatorNodeChildrenItem_EqOperator, + AstAndOperatorNodeChildrenItem_GtOperator, + AstAndOperatorNodeChildrenItem_GteOperator, + AstAndOperatorNodeChildrenItem_Llm, + AstAndOperatorNodeChildrenItem_LtOperator, + AstAndOperatorNodeChildrenItem_LteOperator, + AstAndOperatorNodeChildrenItem_NeqOperator, + AstAndOperatorNodeChildrenItem_NumberLiteral, + AstAndOperatorNodeChildrenItem_OrOperator, + AstAndOperatorNodeChildrenItem_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNodeChildrenItem_AndOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_EqOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_GtOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_GteOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_LtOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_LteOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_NeqOperator) +update_forward_refs(AstAndOperatorNodeChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_boolean_node.py b/src/elevenlabs/types/ast_boolean_node.py new file mode 100644 index 00000000..dcfe7401 --- /dev/null +++ b/src/elevenlabs/types/ast_boolean_node.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstBooleanNode(UncheckedBaseModel): + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_dynamic_variable_node.py b/src/elevenlabs/types/ast_dynamic_variable_node.py new file mode 100644 index 00000000..83e2783b --- /dev/null +++ b/src/elevenlabs/types/ast_dynamic_variable_node.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstDynamicVariableNode(UncheckedBaseModel): + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_equals_operator_node.py b/src/elevenlabs/types/ast_equals_operator_node.py new file mode 100644 index 00000000..4d8538db --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstEqualsOperatorNode(UncheckedBaseModel): + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_equals_operator_node_left.py b/src/elevenlabs/types/ast_equals_operator_node_left.py new file mode 100644 index 00000000..54f541c7 --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeLeft_AndOperator, + AstEqualsOperatorNodeLeft_BooleanLiteral, + AstEqualsOperatorNodeLeft_DynamicVariable, + AstEqualsOperatorNodeLeft_EqOperator, + AstEqualsOperatorNodeLeft_GtOperator, + AstEqualsOperatorNodeLeft_GteOperator, + AstEqualsOperatorNodeLeft_Llm, + AstEqualsOperatorNodeLeft_LtOperator, + AstEqualsOperatorNodeLeft_LteOperator, + AstEqualsOperatorNodeLeft_NeqOperator, + AstEqualsOperatorNodeLeft_NumberLiteral, + AstEqualsOperatorNodeLeft_OrOperator, + AstEqualsOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeLeft_AndOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_EqOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_GtOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_GteOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_LtOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_LteOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_right.py b/src/elevenlabs/types/ast_equals_operator_node_right.py new file mode 100644 index 00000000..46fa1a04 --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeRight_AndOperator, + AstEqualsOperatorNodeRight_BooleanLiteral, + AstEqualsOperatorNodeRight_DynamicVariable, + AstEqualsOperatorNodeRight_EqOperator, + AstEqualsOperatorNodeRight_GtOperator, + AstEqualsOperatorNodeRight_GteOperator, + AstEqualsOperatorNodeRight_Llm, + AstEqualsOperatorNodeRight_LtOperator, + AstEqualsOperatorNodeRight_LteOperator, + AstEqualsOperatorNodeRight_NeqOperator, + AstEqualsOperatorNodeRight_NumberLiteral, + AstEqualsOperatorNodeRight_OrOperator, + AstEqualsOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeRight_AndOperator) +update_forward_refs(AstEqualsOperatorNodeRight_EqOperator) +update_forward_refs(AstEqualsOperatorNodeRight_GtOperator) +update_forward_refs(AstEqualsOperatorNodeRight_GteOperator) +update_forward_refs(AstEqualsOperatorNodeRight_LtOperator) +update_forward_refs(AstEqualsOperatorNodeRight_LteOperator) +update_forward_refs(AstEqualsOperatorNodeRight_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node.py b/src/elevenlabs/types/ast_greater_than_operator_node.py new file mode 100644 index 00000000..643f23c4 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOperatorNode(UncheckedBaseModel): + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNode) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_left.py new file mode 100644 index 00000000..28334255 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeLeft_AndOperator, + AstGreaterThanOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOperatorNodeLeft_DynamicVariable, + AstGreaterThanOperatorNodeLeft_EqOperator, + AstGreaterThanOperatorNodeLeft_GtOperator, + AstGreaterThanOperatorNodeLeft_GteOperator, + AstGreaterThanOperatorNodeLeft_Llm, + AstGreaterThanOperatorNodeLeft_LtOperator, + AstGreaterThanOperatorNodeLeft_LteOperator, + AstGreaterThanOperatorNodeLeft_NeqOperator, + AstGreaterThanOperatorNodeLeft_NumberLiteral, + AstGreaterThanOperatorNodeLeft_OrOperator, + AstGreaterThanOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeLeft_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_right.py new file mode 100644 index 00000000..ddfbd00c --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeRight_AndOperator, + AstGreaterThanOperatorNodeRight_BooleanLiteral, + AstGreaterThanOperatorNodeRight_DynamicVariable, + AstGreaterThanOperatorNodeRight_EqOperator, + AstGreaterThanOperatorNodeRight_GtOperator, + AstGreaterThanOperatorNodeRight_GteOperator, + AstGreaterThanOperatorNodeRight_Llm, + AstGreaterThanOperatorNodeRight_LtOperator, + AstGreaterThanOperatorNodeRight_LteOperator, + AstGreaterThanOperatorNodeRight_NeqOperator, + AstGreaterThanOperatorNodeRight_NumberLiteral, + AstGreaterThanOperatorNodeRight_OrOperator, + AstGreaterThanOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeRight_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py new file mode 100644 index 00000000..88fcd936 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOrEqualsOperatorNode(UncheckedBaseModel): + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py new file mode 100644 index 00000000..8c9a8628 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py new file mode 100644 index 00000000..966f7df2 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_Llm, + AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node.py b/src/elevenlabs/types/ast_less_than_operator_node.py new file mode 100644 index 00000000..43ed309b --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOperatorNode(UncheckedBaseModel): + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNode) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_left.py b/src/elevenlabs/types/ast_less_than_operator_node_left.py new file mode 100644 index 00000000..b38f762e --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeLeft_AndOperator, + AstLessThanOperatorNodeLeft_BooleanLiteral, + AstLessThanOperatorNodeLeft_DynamicVariable, + AstLessThanOperatorNodeLeft_EqOperator, + AstLessThanOperatorNodeLeft_GtOperator, + AstLessThanOperatorNodeLeft_GteOperator, + AstLessThanOperatorNodeLeft_Llm, + AstLessThanOperatorNodeLeft_LtOperator, + AstLessThanOperatorNodeLeft_LteOperator, + AstLessThanOperatorNodeLeft_NeqOperator, + AstLessThanOperatorNodeLeft_NumberLiteral, + AstLessThanOperatorNodeLeft_OrOperator, + AstLessThanOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeLeft_AndOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_EqOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_GtOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_GteOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_LtOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_LteOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_right.py b/src/elevenlabs/types/ast_less_than_operator_node_right.py new file mode 100644 index 00000000..6a535dab --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeRight_AndOperator, + AstLessThanOperatorNodeRight_BooleanLiteral, + AstLessThanOperatorNodeRight_DynamicVariable, + AstLessThanOperatorNodeRight_EqOperator, + AstLessThanOperatorNodeRight_GtOperator, + AstLessThanOperatorNodeRight_GteOperator, + AstLessThanOperatorNodeRight_Llm, + AstLessThanOperatorNodeRight_LtOperator, + AstLessThanOperatorNodeRight_LteOperator, + AstLessThanOperatorNodeRight_NeqOperator, + AstLessThanOperatorNodeRight_NumberLiteral, + AstLessThanOperatorNodeRight_OrOperator, + AstLessThanOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeRight_AndOperator) +update_forward_refs(AstLessThanOperatorNodeRight_EqOperator) +update_forward_refs(AstLessThanOperatorNodeRight_GtOperator) +update_forward_refs(AstLessThanOperatorNodeRight_GteOperator) +update_forward_refs(AstLessThanOperatorNodeRight_LtOperator) +update_forward_refs(AstLessThanOperatorNodeRight_LteOperator) +update_forward_refs(AstLessThanOperatorNodeRight_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py new file mode 100644 index 00000000..5f812246 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOrEqualsOperatorNode(UncheckedBaseModel): + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py new file mode 100644 index 00000000..f28df8cb --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeLeft_Llm, + AstLessThanOrEqualsOperatorNodeLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py new file mode 100644 index 00000000..6b6d6be7 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeRight_AndOperator, + AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeRight_EqOperator, + AstLessThanOrEqualsOperatorNodeRight_GtOperator, + AstLessThanOrEqualsOperatorNodeRight_GteOperator, + AstLessThanOrEqualsOperatorNodeRight_Llm, + AstLessThanOrEqualsOperatorNodeRight_LtOperator, + AstLessThanOrEqualsOperatorNodeRight_LteOperator, + AstLessThanOrEqualsOperatorNodeRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeRight_OrOperator, + AstLessThanOrEqualsOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node.py b/src/elevenlabs/types/ast_not_equals_operator_node.py new file mode 100644 index 00000000..5f986a48 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNotEqualsOperatorNode(UncheckedBaseModel): + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_left.py new file mode 100644 index 00000000..fce535f4 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_left.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeLeft = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeLeft_AndOperator, + AstNotEqualsOperatorNodeLeft_BooleanLiteral, + AstNotEqualsOperatorNodeLeft_DynamicVariable, + AstNotEqualsOperatorNodeLeft_EqOperator, + AstNotEqualsOperatorNodeLeft_GtOperator, + AstNotEqualsOperatorNodeLeft_GteOperator, + AstNotEqualsOperatorNodeLeft_Llm, + AstNotEqualsOperatorNodeLeft_LtOperator, + AstNotEqualsOperatorNodeLeft_LteOperator, + AstNotEqualsOperatorNodeLeft_NeqOperator, + AstNotEqualsOperatorNodeLeft_NumberLiteral, + AstNotEqualsOperatorNodeLeft_OrOperator, + AstNotEqualsOperatorNodeLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeLeft_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_right.py new file mode 100644 index 00000000..6b448a15 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_right.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeRight = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeRight_AndOperator, + AstNotEqualsOperatorNodeRight_BooleanLiteral, + AstNotEqualsOperatorNodeRight_DynamicVariable, + AstNotEqualsOperatorNodeRight_EqOperator, + AstNotEqualsOperatorNodeRight_GtOperator, + AstNotEqualsOperatorNodeRight_GteOperator, + AstNotEqualsOperatorNodeRight_Llm, + AstNotEqualsOperatorNodeRight_LtOperator, + AstNotEqualsOperatorNodeRight_LteOperator, + AstNotEqualsOperatorNodeRight_NeqOperator, + AstNotEqualsOperatorNodeRight_NumberLiteral, + AstNotEqualsOperatorNodeRight_OrOperator, + AstNotEqualsOperatorNodeRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeRight_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_number_node.py b/src/elevenlabs/types/ast_number_node.py new file mode 100644 index 00000000..7da03f97 --- /dev/null +++ b/src/elevenlabs/types/ast_number_node.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNumberNode(UncheckedBaseModel): + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_or_operator_node.py b/src/elevenlabs/types/ast_or_operator_node.py new file mode 100644 index 00000000..80423e28 --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstOrOperatorNode(UncheckedBaseModel): + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNode) diff --git a/src/elevenlabs/types/ast_or_operator_node_children_item.py b/src/elevenlabs/types/ast_or_operator_node_children_item.py new file mode 100644 index 00000000..b4fe2386 --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node_children_item.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstOrOperatorNodeChildrenItem_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeChildrenItem_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + + +class AstOrOperatorNodeChildrenItem_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstOrOperatorNodeChildrenItem = typing_extensions.Annotated[ + typing.Union[ + AstOrOperatorNodeChildrenItem_AndOperator, + AstOrOperatorNodeChildrenItem_BooleanLiteral, + AstOrOperatorNodeChildrenItem_DynamicVariable, + AstOrOperatorNodeChildrenItem_EqOperator, + AstOrOperatorNodeChildrenItem_GtOperator, + AstOrOperatorNodeChildrenItem_GteOperator, + AstOrOperatorNodeChildrenItem_Llm, + AstOrOperatorNodeChildrenItem_LtOperator, + AstOrOperatorNodeChildrenItem_LteOperator, + AstOrOperatorNodeChildrenItem_NeqOperator, + AstOrOperatorNodeChildrenItem_NumberLiteral, + AstOrOperatorNodeChildrenItem_OrOperator, + AstOrOperatorNodeChildrenItem_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNodeChildrenItem_AndOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_EqOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_GtOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_GteOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_LtOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_LteOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_NeqOperator) +update_forward_refs(AstOrOperatorNodeChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_string_node.py b/src/elevenlabs/types/ast_string_node.py new file mode 100644 index 00000000..06692840 --- /dev/null +++ b/src/elevenlabs/types/ast_string_node.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstStringNode(UncheckedBaseModel): + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/astllm_node.py b/src/elevenlabs/types/astllm_node.py new file mode 100644 index 00000000..2294df6b --- /dev/null +++ b/src/elevenlabs/types/astllm_node.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstllmNode(UncheckedBaseModel): + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conversation_charging_common_model.py b/src/elevenlabs/types/conversation_charging_common_model.py index 368e484c..39304e18 100644 --- a/src/elevenlabs/types/conversation_charging_common_model.py +++ b/src/elevenlabs/types/conversation_charging_common_model.py @@ -16,6 +16,8 @@ class ConversationChargingCommonModel(UncheckedBaseModel): llm_price: typing.Optional[float] = None llm_charge: typing.Optional[int] = None call_charge: typing.Optional[int] = None + free_minutes_consumed: typing.Optional[float] = None + free_llm_dollars_consumed: typing.Optional[float] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/get_phone_number_inbound_sip_trunk_config_response_model.py b/src/elevenlabs/types/get_phone_number_inbound_sip_trunk_config_response_model.py index 5c6ba9b0..8d9f1dec 100644 --- a/src/elevenlabs/types/get_phone_number_inbound_sip_trunk_config_response_model.py +++ b/src/elevenlabs/types/get_phone_number_inbound_sip_trunk_config_response_model.py @@ -30,6 +30,11 @@ class GetPhoneNumberInboundSipTrunkConfigResponseModel(UncheckedBaseModel): SIP trunk username (if available) """ + remote_domains: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Domains of remote SIP servers used to validate TLS certificates. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/get_test_invocations_page_response_model.py b/src/elevenlabs/types/get_test_invocations_page_response_model.py new file mode 100644 index 00000000..f33f5d16 --- /dev/null +++ b/src/elevenlabs/types/get_test_invocations_page_response_model.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .list_response_meta import ListResponseMeta +from .test_invocation_summary_response_model import TestInvocationSummaryResponseModel + + +class GetTestInvocationsPageResponseModel(UncheckedBaseModel): + meta: typing.Optional[ListResponseMeta] = None + results: typing.List[TestInvocationSummaryResponseModel] + next_cursor: typing.Optional[str] = pydantic.Field(default=None) + """ + Cursor for the next page of results + """ + + has_more: bool = pydantic.Field() + """ + Whether there are more results available + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/get_test_suite_invocation_response_model.py b/src/elevenlabs/types/get_test_suite_invocation_response_model.py index 5f79cef3..fd929136 100644 --- a/src/elevenlabs/types/get_test_suite_invocation_response_model.py +++ b/src/elevenlabs/types/get_test_suite_invocation_response_model.py @@ -12,6 +12,7 @@ class GetTestSuiteInvocationResponseModel(UncheckedBaseModel): id: str + agent_id: typing.Optional[str] = None created_at: typing.Optional[int] = None test_runs: typing.List[UnitTestRunResponseModel] diff --git a/src/elevenlabs/types/get_unit_test_response_model.py b/src/elevenlabs/types/get_unit_test_response_model.py index 6aac041b..6ff10752 100644 --- a/src/elevenlabs/types/get_unit_test_response_model.py +++ b/src/elevenlabs/types/get_unit_test_response_model.py @@ -11,6 +11,7 @@ from .agent_successful_response_example import AgentSuccessfulResponseExample from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue +from .test_from_conversation_metadata_output import TestFromConversationMetadataOutput from .unit_test_common_model_type import UnitTestCommonModelType from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput @@ -45,6 +46,11 @@ class GetUnitTestResponseModel(UncheckedBaseModel): """ type: typing.Optional[UnitTestCommonModelType] = None + from_conversation_metadata: typing.Optional[TestFromConversationMetadataOutput] = pydantic.Field(default=None) + """ + Metadata of a conversation this test was created from (if applicable). + """ + id: str name: str diff --git a/src/elevenlabs/types/inbound_sip_trunk_config_request_model.py b/src/elevenlabs/types/inbound_sip_trunk_config_request_model.py index f37896fd..acec260e 100644 --- a/src/elevenlabs/types/inbound_sip_trunk_config_request_model.py +++ b/src/elevenlabs/types/inbound_sip_trunk_config_request_model.py @@ -30,6 +30,11 @@ class InboundSipTrunkConfigRequestModel(UncheckedBaseModel): Optional digest authentication credentials (username/password). """ + remote_domains: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Domains of remote SIP servers used to validate TLS certificates. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/list_response_meta.py b/src/elevenlabs/types/list_response_meta.py new file mode 100644 index 00000000..76530dbe --- /dev/null +++ b/src/elevenlabs/types/list_response_meta.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ListResponseMeta(UncheckedBaseModel): + total: typing.Optional[int] = None + page: typing.Optional[int] = None + page_size: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/mcp_server_config_input.py b/src/elevenlabs/types/mcp_server_config_input.py index 25adef82..fe5d38cd 100644 --- a/src/elevenlabs/types/mcp_server_config_input.py +++ b/src/elevenlabs/types/mcp_server_config_input.py @@ -49,6 +49,11 @@ class McpServerConfigInput(UncheckedBaseModel): If true, all tools from this MCP server will require pre-tool execution speech """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while tools from this MCP server are running + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/mcp_server_config_output.py b/src/elevenlabs/types/mcp_server_config_output.py index 407b9888..86f383d5 100644 --- a/src/elevenlabs/types/mcp_server_config_output.py +++ b/src/elevenlabs/types/mcp_server_config_output.py @@ -49,6 +49,11 @@ class McpServerConfigOutput(UncheckedBaseModel): If true, all tools from this MCP server will require pre-tool execution speech """ + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while tools from this MCP server are running + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/music_prompt.py b/src/elevenlabs/types/music_prompt.py index 3d40fa9d..67568555 100644 --- a/src/elevenlabs/types/music_prompt.py +++ b/src/elevenlabs/types/music_prompt.py @@ -11,12 +11,12 @@ class MusicPrompt(UncheckedBaseModel): positive_global_styles: typing.List[str] = pydantic.Field() """ - The styles that should be present in the entire song. + The styles that should be present in the entire song. Use English language for best result. """ negative_global_styles: typing.List[str] = pydantic.Field() """ - The styles that should not be present in the entire song. + The styles that should not be present in the entire song. Use English language for best result. """ sections: typing.List[SongSection] = pydantic.Field() diff --git a/src/elevenlabs/types/prompt_agent_api_model_input.py b/src/elevenlabs/types/prompt_agent_api_model_input.py index ecbba1b9..11a482d5 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input.py @@ -74,7 +74,7 @@ class PromptAgentApiModelInput(UncheckedBaseModel): ignore_default_personality: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to ignore the default personality + Whether to remove the default personality lines from the system prompt """ rag: typing.Optional[RagConfig] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/prompt_agent_api_model_output.py b/src/elevenlabs/types/prompt_agent_api_model_output.py index 917041cb..f5ce2836 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output.py @@ -74,7 +74,7 @@ class PromptAgentApiModelOutput(UncheckedBaseModel): ignore_default_personality: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to ignore the default personality + Whether to remove the default personality lines from the system prompt """ rag: typing.Optional[RagConfig] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py index f71e897d..02cf8107 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py @@ -74,7 +74,7 @@ class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): ignore_default_personality: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to ignore the default personality + Whether to remove the default personality lines from the system prompt """ rag: typing.Optional[RagConfigWorkflowOverride] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/song_section.py b/src/elevenlabs/types/song_section.py index 2d905178..22d41f82 100644 --- a/src/elevenlabs/types/song_section.py +++ b/src/elevenlabs/types/song_section.py @@ -15,12 +15,12 @@ class SongSection(UncheckedBaseModel): positive_local_styles: typing.List[str] = pydantic.Field() """ - The styles that should be present in this section. + The styles that should be present in this section. Use English language for best result. """ negative_local_styles: typing.List[str] = pydantic.Field() """ - The styles that should not be present in this section. + The styles that should not be present in this section. Use English language for best result. """ duration_ms: int = pydantic.Field() diff --git a/src/elevenlabs/types/subscription_extras_response_model.py b/src/elevenlabs/types/subscription_extras_response_model.py index bf4cb594..73d42b70 100644 --- a/src/elevenlabs/types/subscription_extras_response_model.py +++ b/src/elevenlabs/types/subscription_extras_response_model.py @@ -20,6 +20,11 @@ class SubscriptionExtrasResponseModel(UncheckedBaseModel): The Convai concurrency of the user. """ + enterprise_music_concurrency: typing.Optional[int] = pydantic.Field(default=None) + """ + The Music concurrency of the user on enterprise plan. + """ + convai_chars_per_minute: typing.Optional[int] = pydantic.Field(default=None) """ The Convai characters per minute of the user. This field is deprecated and will always return None. diff --git a/src/elevenlabs/types/test_from_conversation_metadata_input.py b/src/elevenlabs/types/test_from_conversation_metadata_input.py new file mode 100644 index 00000000..1fb43f82 --- /dev/null +++ b/src/elevenlabs/types/test_from_conversation_metadata_input.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_common_model_input import ConversationHistoryTranscriptCommonModelInput + + +class TestFromConversationMetadataInput(UncheckedBaseModel): + conversation_id: str + agent_id: str + workflow_node_id: typing.Optional[str] = None + original_agent_reply: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelInput]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_input import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 + +update_forward_refs(TestFromConversationMetadataInput) diff --git a/src/elevenlabs/types/test_from_conversation_metadata_output.py b/src/elevenlabs/types/test_from_conversation_metadata_output.py new file mode 100644 index 00000000..9c7571df --- /dev/null +++ b/src/elevenlabs/types/test_from_conversation_metadata_output.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput + + +class TestFromConversationMetadataOutput(UncheckedBaseModel): + conversation_id: str + agent_id: str + workflow_node_id: typing.Optional[str] = None + original_agent_reply: typing.Optional[typing.List[ConversationHistoryTranscriptCommonModelOutput]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(TestFromConversationMetadataOutput) diff --git a/src/elevenlabs/types/test_invocation_summary_response_model.py b/src/elevenlabs/types/test_invocation_summary_response_model.py new file mode 100644 index 00000000..2afc25ed --- /dev/null +++ b/src/elevenlabs/types/test_invocation_summary_response_model.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .resource_access_info import ResourceAccessInfo + + +class TestInvocationSummaryResponseModel(UncheckedBaseModel): + id: str = pydantic.Field() + """ + The ID of the test invocation + """ + + created_at_unix_secs: int = pydantic.Field() + """ + Creation time of the test invocation in unix seconds + """ + + test_run_count: int = pydantic.Field() + """ + Number of test runs in this invocation + """ + + passed_count: int = pydantic.Field() + """ + Number of test runs that passed + """ + + failed_count: int = pydantic.Field() + """ + Number of test runs that failed + """ + + pending_count: int = pydantic.Field() + """ + Number of test runs that are pending + """ + + title: str = pydantic.Field() + """ + Title of the test invocation - either the single test name or count of tests + """ + + access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None) + """ + The access information of the test invocation + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/text_to_speech_request.py b/src/elevenlabs/types/text_to_speech_request.py new file mode 100644 index 00000000..c357bce4 --- /dev/null +++ b/src/elevenlabs/types/text_to_speech_request.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToSpeechRequest = typing.Optional[typing.Any] diff --git a/src/elevenlabs/types/workflow_edge_model.py b/src/elevenlabs/types/workflow_edge_model.py index 483f2e6b..ceb3387c 100644 --- a/src/elevenlabs/types/workflow_edge_model.py +++ b/src/elevenlabs/types/workflow_edge_model.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .workflow_edge_model_backward_condition import WorkflowEdgeModelBackwardCondition from .workflow_edge_model_forward_condition import WorkflowEdgeModelForwardCondition @@ -30,3 +32,15 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + +update_forward_refs(WorkflowEdgeModel) diff --git a/src/elevenlabs/types/workflow_edge_model_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_backward_condition.py index f404989e..a98f9712 100644 --- a/src/elevenlabs/types/workflow_edge_model_backward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_backward_condition.py @@ -6,8 +6,34 @@ import pydantic import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression + + +class WorkflowEdgeModelBackwardCondition_Expression(UncheckedBaseModel): + type: typing.Literal["expression"] = "expression" + label: typing.Optional[str] = None + expression: WorkflowExpressionConditionModelExpression + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 class WorkflowEdgeModelBackwardCondition_Llm(UncheckedBaseModel): @@ -56,9 +82,11 @@ class Config: WorkflowEdgeModelBackwardCondition = typing_extensions.Annotated[ typing.Union[ + WorkflowEdgeModelBackwardCondition_Expression, WorkflowEdgeModelBackwardCondition_Llm, WorkflowEdgeModelBackwardCondition_Result, WorkflowEdgeModelBackwardCondition_Unconditional, ], UnionMetadata(discriminant="type"), ] +update_forward_refs(WorkflowEdgeModelBackwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_edge_model_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_forward_condition.py index 14313e47..c24cd836 100644 --- a/src/elevenlabs/types/workflow_edge_model_forward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_forward_condition.py @@ -6,8 +6,34 @@ import pydantic import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression + + +class WorkflowEdgeModelForwardCondition_Expression(UncheckedBaseModel): + type: typing.Literal["expression"] = "expression" + label: typing.Optional[str] = None + expression: WorkflowExpressionConditionModelExpression + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 class WorkflowEdgeModelForwardCondition_Llm(UncheckedBaseModel): @@ -56,9 +82,11 @@ class Config: WorkflowEdgeModelForwardCondition = typing_extensions.Annotated[ typing.Union[ + WorkflowEdgeModelForwardCondition_Expression, WorkflowEdgeModelForwardCondition_Llm, WorkflowEdgeModelForwardCondition_Result, WorkflowEdgeModelForwardCondition_Unconditional, ], UnionMetadata(discriminant="type"), ] +update_forward_refs(WorkflowEdgeModelForwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_end_node_model.py b/src/elevenlabs/types/workflow_end_node_model.py index 61eb208f..1414027b 100644 --- a/src/elevenlabs/types/workflow_end_node_model.py +++ b/src/elevenlabs/types/workflow_end_node_model.py @@ -14,6 +14,11 @@ class WorkflowEndNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/workflow_expression_condition_model.py b/src/elevenlabs/types/workflow_expression_condition_model.py new file mode 100644 index 00000000..28fdc53c --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression + + +class WorkflowExpressionConditionModel(UncheckedBaseModel): + label: typing.Optional[str] = None + expression: WorkflowExpressionConditionModelExpression + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 + +update_forward_refs(WorkflowExpressionConditionModel) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_expression.py new file mode 100644 index 00000000..0b6f8872 --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model_expression.py @@ -0,0 +1,264 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowExpressionConditionModelExpression_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelExpression_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelExpression_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeLeft" + right: "AstEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeLeft" + right: "AstGreaterThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeLeft" + right: "AstGreaterThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelExpression_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeLeft" + right: "AstLessThanOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeLeft" + right: "AstLessThanOrEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeLeft" + right: "AstNotEqualsOperatorNodeRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelExpression_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 +from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelExpression_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowExpressionConditionModelExpression = typing_extensions.Annotated[ + typing.Union[ + WorkflowExpressionConditionModelExpression_AndOperator, + WorkflowExpressionConditionModelExpression_BooleanLiteral, + WorkflowExpressionConditionModelExpression_DynamicVariable, + WorkflowExpressionConditionModelExpression_EqOperator, + WorkflowExpressionConditionModelExpression_GtOperator, + WorkflowExpressionConditionModelExpression_GteOperator, + WorkflowExpressionConditionModelExpression_Llm, + WorkflowExpressionConditionModelExpression_LtOperator, + WorkflowExpressionConditionModelExpression_LteOperator, + WorkflowExpressionConditionModelExpression_NeqOperator, + WorkflowExpressionConditionModelExpression_NumberLiteral, + WorkflowExpressionConditionModelExpression_OrOperator, + WorkflowExpressionConditionModelExpression_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowExpressionConditionModelExpression_AndOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_EqOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_GtOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_GteOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_LtOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_LteOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_NeqOperator) +update_forward_refs(WorkflowExpressionConditionModelExpression_OrOperator) diff --git a/src/elevenlabs/types/workflow_override_agent_node_model.py b/src/elevenlabs/types/workflow_override_agent_node_model.py index e30a5acc..10084de7 100644 --- a/src/elevenlabs/types/workflow_override_agent_node_model.py +++ b/src/elevenlabs/types/workflow_override_agent_node_model.py @@ -22,6 +22,11 @@ class WorkflowOverrideAgentNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + label: str if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/workflow_phone_number_node_model.py b/src/elevenlabs/types/workflow_phone_number_node_model.py index a4d2ae4a..1529e4fc 100644 --- a/src/elevenlabs/types/workflow_phone_number_node_model.py +++ b/src/elevenlabs/types/workflow_phone_number_node_model.py @@ -16,6 +16,11 @@ class WorkflowPhoneNumberNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination transfer_type: typing.Optional[TransferTypeEnum] = None diff --git a/src/elevenlabs/types/workflow_standalone_agent_node_model.py b/src/elevenlabs/types/workflow_standalone_agent_node_model.py index 8f3f75d5..90ad2d1a 100644 --- a/src/elevenlabs/types/workflow_standalone_agent_node_model.py +++ b/src/elevenlabs/types/workflow_standalone_agent_node_model.py @@ -14,6 +14,11 @@ class WorkflowStandaloneAgentNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + agent_id: str delay_ms: typing.Optional[int] = None transfer_message: typing.Optional[str] = None diff --git a/src/elevenlabs/types/workflow_start_node_model.py b/src/elevenlabs/types/workflow_start_node_model.py index dd71e8a5..e20d8a73 100644 --- a/src/elevenlabs/types/workflow_start_node_model.py +++ b/src/elevenlabs/types/workflow_start_node_model.py @@ -14,6 +14,11 @@ class WorkflowStartNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/workflow_tool_node_model.py b/src/elevenlabs/types/workflow_tool_node_model.py index fb1f41f0..662ae49e 100644 --- a/src/elevenlabs/types/workflow_tool_node_model.py +++ b/src/elevenlabs/types/workflow_tool_node_model.py @@ -15,6 +15,11 @@ class WorkflowToolNodeModel(UncheckedBaseModel): Position of the node in the workflow. """ + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + tools: typing.Optional[typing.List[WorkflowToolLocator]] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/usage/client.py b/src/elevenlabs/usage/client.py index dde562d0..115cbcf7 100644 --- a/src/elevenlabs/usage/client.py +++ b/src/elevenlabs/usage/client.py @@ -82,6 +82,11 @@ def get( client.usage.get( start_unix=1, end_unix=1, + include_workspace_metrics=True, + breakdown_type="none", + aggregation_interval="hour", + aggregation_bucket_size=1, + metric="credits", ) """ _response = self._raw_client.get( @@ -173,6 +178,11 @@ async def main() -> None: await client.usage.get( start_unix=1, end_unix=1, + include_workspace_metrics=True, + breakdown_type="none", + aggregation_interval="hour", + aggregation_bucket_size=1, + metric="credits", ) diff --git a/src/elevenlabs/voices/client.py b/src/elevenlabs/voices/client.py index 1b7e56ad..45ade344 100644 --- a/src/elevenlabs/voices/client.py +++ b/src/elevenlabs/voices/client.py @@ -72,7 +72,9 @@ def get_all( client = ElevenLabs( api_key="YOUR_API_KEY", ) - client.voices.get_all() + client.voices.get_all( + show_legacy=True, + ) """ _response = self._raw_client.get_all(show_legacy=show_legacy, request_options=request_options) return _response.data @@ -147,6 +149,15 @@ def search( api_key="YOUR_API_KEY", ) client.voices.search( + next_page_token="next_page_token", + page_size=1, + search="search", + sort="sort", + sort_direction="sort_direction", + voice_type="voice_type", + category="category", + fine_tuning_state="fine_tuning_state", + collection_id="collection_id", include_total_count=True, ) """ @@ -201,6 +212,7 @@ def get( ) client.voices.get( voice_id="21m00Tcm4TlvDq8ikWAM", + with_settings=True, ) """ _response = self._raw_client.get(voice_id, with_settings=with_settings, request_options=request_options) @@ -447,8 +459,22 @@ def get_shared( api_key="YOUR_API_KEY", ) client.voices.get_shared( + page_size=1, + category="professional", + gender="gender", + age="age", + accent="accent", + language="language", + locale="locale", + search="search", featured=True, + min_notice_period_days=1, + include_custom_rates=True, + include_live_moderated=True, reader_app_enabled=True, + owner_id="owner_id", + sort="sort", + page=1, ) """ _response = self._raw_client.get_shared( @@ -605,7 +631,9 @@ async def get_all( async def main() -> None: - await client.voices.get_all() + await client.voices.get_all( + show_legacy=True, + ) asyncio.run(main()) @@ -688,6 +716,15 @@ async def search( async def main() -> None: await client.voices.search( + next_page_token="next_page_token", + page_size=1, + search="search", + sort="sort", + sort_direction="sort_direction", + voice_type="voice_type", + category="category", + fine_tuning_state="fine_tuning_state", + collection_id="collection_id", include_total_count=True, ) @@ -750,6 +787,7 @@ async def get( async def main() -> None: await client.voices.get( voice_id="21m00Tcm4TlvDq8ikWAM", + with_settings=True, ) @@ -1030,8 +1068,22 @@ async def get_shared( async def main() -> None: await client.voices.get_shared( + page_size=1, + category="professional", + gender="gender", + age="age", + accent="accent", + language="language", + locale="locale", + search="search", featured=True, + min_notice_period_days=1, + include_custom_rates=True, + include_live_moderated=True, reader_app_enabled=True, + owner_id="owner_id", + sort="sort", + page=1, ) diff --git a/src/elevenlabs/voices/pvc/samples/client.py b/src/elevenlabs/voices/pvc/samples/client.py index 3fb921c8..79d6b725 100644 --- a/src/elevenlabs/voices/pvc/samples/client.py +++ b/src/elevenlabs/voices/pvc/samples/client.py @@ -94,10 +94,11 @@ def update( selected_speaker_ids: typing.Optional[typing.Sequence[str]] = OMIT, trim_start_time: typing.Optional[int] = OMIT, trim_end_time: typing.Optional[int] = OMIT, + file_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AddVoiceResponseModel: """ - Update a PVC voice sample - apply noise removal, or select speaker. + Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name. Parameters ---------- @@ -119,6 +120,9 @@ def update( trim_end_time : typing.Optional[int] The end time of the audio to be used for PVC training. Time should be in milliseconds + file_name : typing.Optional[str] + The name of the audio file to be used for PVC training. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -146,6 +150,7 @@ def update( selected_speaker_ids=selected_speaker_ids, trim_start_time=trim_start_time, trim_end_time=trim_end_time, + file_name=file_name, request_options=request_options, ) return _response.data @@ -294,10 +299,11 @@ async def update( selected_speaker_ids: typing.Optional[typing.Sequence[str]] = OMIT, trim_start_time: typing.Optional[int] = OMIT, trim_end_time: typing.Optional[int] = OMIT, + file_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AddVoiceResponseModel: """ - Update a PVC voice sample - apply noise removal, or select speaker. + Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name. Parameters ---------- @@ -319,6 +325,9 @@ async def update( trim_end_time : typing.Optional[int] The end time of the audio to be used for PVC training. Time should be in milliseconds + file_name : typing.Optional[str] + The name of the audio file to be used for PVC training. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -354,6 +363,7 @@ async def main() -> None: selected_speaker_ids=selected_speaker_ids, trim_start_time=trim_start_time, trim_end_time=trim_end_time, + file_name=file_name, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/voices/pvc/samples/raw_client.py b/src/elevenlabs/voices/pvc/samples/raw_client.py index 162bd68f..e99e34a4 100644 --- a/src/elevenlabs/voices/pvc/samples/raw_client.py +++ b/src/elevenlabs/voices/pvc/samples/raw_client.py @@ -102,10 +102,11 @@ def update( selected_speaker_ids: typing.Optional[typing.Sequence[str]] = OMIT, trim_start_time: typing.Optional[int] = OMIT, trim_end_time: typing.Optional[int] = OMIT, + file_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AddVoiceResponseModel]: """ - Update a PVC voice sample - apply noise removal, or select speaker. + Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name. Parameters ---------- @@ -127,6 +128,9 @@ def update( trim_end_time : typing.Optional[int] The end time of the audio to be used for PVC training. Time should be in milliseconds + file_name : typing.Optional[str] + The name of the audio file to be used for PVC training. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -143,6 +147,7 @@ def update( "selected_speaker_ids": selected_speaker_ids, "trim_start_time": trim_start_time, "trim_end_time": trim_end_time, + "file_name": file_name, }, headers={ "content-type": "application/json", @@ -312,10 +317,11 @@ async def update( selected_speaker_ids: typing.Optional[typing.Sequence[str]] = OMIT, trim_start_time: typing.Optional[int] = OMIT, trim_end_time: typing.Optional[int] = OMIT, + file_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AddVoiceResponseModel]: """ - Update a PVC voice sample - apply noise removal, or select speaker. + Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name. Parameters ---------- @@ -337,6 +343,9 @@ async def update( trim_end_time : typing.Optional[int] The end time of the audio to be used for PVC training. Time should be in milliseconds + file_name : typing.Optional[str] + The name of the audio file to be used for PVC training. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -353,6 +362,7 @@ async def update( "selected_speaker_ids": selected_speaker_ids, "trim_start_time": trim_start_time, "trim_end_time": trim_end_time, + "file_name": file_name, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/voices/samples/audio/client.py b/src/elevenlabs/voices/samples/audio/client.py index 97a7349b..ef285dd3 100644 --- a/src/elevenlabs/voices/samples/audio/client.py +++ b/src/elevenlabs/voices/samples/audio/client.py @@ -43,6 +43,18 @@ def get( ------- typing.Iterator[bytes] Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.voices.samples.audio.get( + voice_id="voice_id", + sample_id="sample_id", + ) """ with self._raw_client.get(voice_id, sample_id, request_options=request_options) as r: yield from r.data @@ -84,6 +96,26 @@ async def get( ------- typing.AsyncIterator[bytes] Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.voices.samples.audio.get( + voice_id="voice_id", + sample_id="sample_id", + ) + + + asyncio.run(main()) """ async with self._raw_client.get(voice_id, sample_id, request_options=request_options) as r: async for _chunk in r.data: From 568270638970d89487bea86d956045e6279fee6a Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:41:00 +0200 Subject: [PATCH 21/34] SDK regeneration (#634) Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> --- poetry.lock | 6 +- reference.md | 364 +++++++++--------- src/elevenlabs/__init__.py | 56 +-- src/elevenlabs/audio_isolation/__init__.py | 6 +- .../audio_isolation/types/__init__.py | 6 +- src/elevenlabs/audio_native/__init__.py | 6 +- src/elevenlabs/audio_native/types/__init__.py | 6 +- src/elevenlabs/conversational_ai/__init__.py | 34 +- .../conversational_ai/agents/__init__.py | 13 +- .../agents/widget/__init__.py | 8 +- src/elevenlabs/conversational_ai/client.py | 87 ----- .../conversations/__init__.py | 10 +- .../conversations/types/__init__.py | 6 +- .../conversational_ai/dashboard/__init__.py | 8 +- .../dashboard/settings/__init__.py | 6 +- .../dashboard/settings/types/__init__.py | 6 +- .../knowledge_base/__init__.py | 10 +- .../knowledge_base/documents/__init__.py | 8 +- .../documents/types/__init__.py | 6 +- .../conversational_ai/mcp_servers/__init__.py | 12 +- .../phone_numbers/__init__.py | 6 +- .../phone_numbers/types/__init__.py | 6 +- .../conversational_ai/raw_client.py | 125 ------ .../conversational_ai/secrets/client.py | 84 ++++ .../conversational_ai/secrets/raw_client.py | 124 ++++++ .../conversational_ai/tests/__init__.py | 8 +- .../conversational_ai/tests/types/__init__.py | 6 +- src/elevenlabs/core/__init__.py | 6 +- src/elevenlabs/core/pydantic_utilities.py | 2 +- src/elevenlabs/dubbing/__init__.py | 12 +- src/elevenlabs/dubbing/resource/__init__.py | 8 +- .../dubbing/resource/speaker/__init__.py | 8 +- src/elevenlabs/dubbing/transcript/__init__.py | 6 +- .../dubbing/transcript/types/__init__.py | 6 +- src/elevenlabs/dubbing/types/__init__.py | 6 +- src/elevenlabs/errors/__init__.py | 6 +- src/elevenlabs/history/__init__.py | 6 +- src/elevenlabs/history/types/__init__.py | 6 +- src/elevenlabs/music/__init__.py | 8 +- src/elevenlabs/music/types/__init__.py | 6 +- .../pronunciation_dictionaries/__init__.py | 8 +- .../pronunciation_dictionaries/client.py | 4 +- .../pronunciation_dictionaries/raw_client.py | 4 +- .../rules/__init__.py | 6 +- .../rules/types/__init__.py | 6 +- .../types/__init__.py | 6 +- src/elevenlabs/service_accounts/__init__.py | 8 +- .../service_accounts/api_keys/__init__.py | 6 +- .../api_keys/types/__init__.py | 6 +- src/elevenlabs/speech_to_speech/__init__.py | 6 +- .../speech_to_speech/types/__init__.py | 6 +- src/elevenlabs/speech_to_text/__init__.py | 8 +- .../speech_to_text/transcripts/__init__.py | 6 +- .../transcripts/types/__init__.py | 6 +- .../speech_to_text/types/__init__.py | 6 +- src/elevenlabs/studio/__init__.py | 8 +- src/elevenlabs/studio/projects/__init__.py | 14 +- .../studio/projects/chapters/__init__.py | 8 +- src/elevenlabs/studio/projects/client.py | 40 +- .../pronunciation_dictionaries/client.py | 4 +- .../pronunciation_dictionaries/raw_client.py | 4 +- src/elevenlabs/studio/projects/raw_client.py | 4 +- .../studio/projects/types/__init__.py | 6 +- src/elevenlabs/studio/types/__init__.py | 6 +- src/elevenlabs/text_to_dialogue/__init__.py | 6 +- .../text_to_dialogue/types/__init__.py | 6 +- .../text_to_sound_effects/__init__.py | 6 +- .../text_to_sound_effects/types/__init__.py | 6 +- src/elevenlabs/text_to_speech/__init__.py | 6 +- .../text_to_speech/types/__init__.py | 6 +- src/elevenlabs/text_to_voice/__init__.py | 8 +- .../text_to_voice/types/__init__.py | 6 +- src/elevenlabs/types/__init__.py | 6 +- src/elevenlabs/types/client_event.py | 1 + src/elevenlabs/types/llm.py | 4 + ...eech_history_item_response_model_source.py | 2 +- .../types/workspace_resource_type.py | 1 + src/elevenlabs/user/__init__.py | 8 +- .../__init__.py | 6 +- .../types/__init__.py | 6 +- .../__init__.py | 6 +- .../types/__init__.py | 6 +- src/elevenlabs/voices/__init__.py | 14 +- src/elevenlabs/voices/pvc/__init__.py | 8 +- src/elevenlabs/voices/pvc/samples/__init__.py | 8 +- .../voices/pvc/samples/speakers/__init__.py | 8 +- .../voices/pvc/verification/__init__.py | 8 +- src/elevenlabs/voices/samples/__init__.py | 8 +- src/elevenlabs/voices/types/__init__.py | 6 +- src/elevenlabs/workspace/__init__.py | 14 +- src/elevenlabs/workspace/groups/__init__.py | 8 +- src/elevenlabs/workspace/invites/__init__.py | 6 +- .../workspace/invites/types/__init__.py | 6 +- src/elevenlabs/workspace/members/__init__.py | 6 +- .../workspace/members/types/__init__.py | 6 +- .../workspace/resources/__init__.py | 6 +- .../workspace/resources/types/__init__.py | 6 +- 97 files changed, 840 insertions(+), 669 deletions(-) diff --git a/poetry.lock b/poetry.lock index 10ee395f..a6c11ab0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.8.3" +version = "2025.10.5" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"}, - {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"}, + {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, + {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, ] [[package]] diff --git a/reference.md b/reference.md index 591588ae..0e6409ee 100644 --- a/reference.md +++ b/reference.md @@ -5342,7 +5342,7 @@ client.pronunciation_dictionaries.download(
-**version_id:** `str` — The id of the version of the pronunciation dictionary +**version_id:** `str` — The id of the pronunciation dictionary version
@@ -6192,94 +6192,6 @@ client.conversational_ai.rag_index_overview()
- - -
- -
client.conversational_ai.update_secret(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Update an existing secret for the workspace -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.conversational_ai.update_secret( - secret_id="secret_id", - name="name", - value="value", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**secret_id:** `str` - -
-
- -
-
- -**name:** `str` - -
-
- -
-
- -**value:** `str` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- -
@@ -10092,6 +10004,94 @@ client.conversational_ai.secrets.delete( + + +
+ +
client.conversational_ai.secrets.update(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an existing secret for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.secrets.update( + secret_id="secret_id", + name="name", + value="value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -15149,7 +15149,7 @@ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate
-**pronunciation_dictionary_locators:** `typing.Optional[typing.List[str]]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[str]]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'.
@@ -15624,6 +15624,98 @@ client.studio.projects.convert( + + +
+ +## Studio Projects PronunciationDictionaries +
client.studio.projects.pronunciation_dictionaries.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, PronunciationDictionaryVersionLocator + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.studio.projects.pronunciation_dictionaries.create( + project_id="21m00Tcm4TlvDq8ikWAM", + pronunciation_dictionary_locators=[ + PronunciationDictionaryVersionLocator( + pronunciation_dictionary_id="pronunciation_dictionary_id", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Sequence[PronunciationDictionaryVersionLocator]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + +
+
+ +
+
+ +**invalidate_affected_text:** `typing.Optional[bool]` — This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -16542,98 +16634,6 @@ client.studio.projects.chapters.convert( - - -
- -## Studio Projects PronunciationDictionaries -
client.studio.projects.pronunciation_dictionaries.create(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from elevenlabs import ElevenLabs, PronunciationDictionaryVersionLocator - -client = ElevenLabs( - api_key="YOUR_API_KEY", -) -client.studio.projects.pronunciation_dictionaries.create( - project_id="21m00Tcm4TlvDq8ikWAM", - pronunciation_dictionary_locators=[ - PronunciationDictionaryVersionLocator( - pronunciation_dictionary_id="pronunciation_dictionary_id", - ) - ], -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - -
-
- -
-
- -**pronunciation_dictionary_locators:** `typing.Sequence[PronunciationDictionaryVersionLocator]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. - -
-
- -
-
- -**invalidate_affected_text:** `typing.Optional[bool]` — This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- -
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index bb386ee0..5ddd5c3e 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -2320,34 +2320,34 @@ "WorkspaceWebhookResponseModel": ".types", "WorkspaceWebhookUsageResponseModel": ".types", "__version__": ".version", - "audio_isolation": ".", - "audio_native": ".", - "conversational_ai": ".", - "dubbing": ".", - "forced_alignment": ".", - "history": ".", - "models": ".", - "music": ".", + "audio_isolation": ".audio_isolation", + "audio_native": ".audio_native", + "conversational_ai": ".conversational_ai", + "dubbing": ".dubbing", + "forced_alignment": ".forced_alignment", + "history": ".history", + "models": ".models", + "music": ".music", "play": ".play", - "pronunciation_dictionaries": ".", - "samples": ".", + "pronunciation_dictionaries": ".pronunciation_dictionaries", + "samples": ".samples", "save": ".play", - "service_accounts": ".", - "speech_to_speech": ".", - "speech_to_text": ".", + "service_accounts": ".service_accounts", + "speech_to_speech": ".speech_to_speech", + "speech_to_text": ".speech_to_text", "stream": ".play", - "studio": ".", - "text_to_dialogue": ".", - "text_to_sound_effects": ".", - "text_to_speech": ".", - "text_to_voice": ".", - "usage": ".", - "user": ".", - "v_1_text_to_speech_voice_id_multi_stream_input": ".", - "v_1_text_to_speech_voice_id_stream_input": ".", - "voices": ".", - "webhooks": ".", - "workspace": ".", + "studio": ".studio", + "text_to_dialogue": ".text_to_dialogue", + "text_to_sound_effects": ".text_to_sound_effects", + "text_to_speech": ".text_to_speech", + "text_to_voice": ".text_to_voice", + "usage": ".usage", + "user": ".user", + "v_1_text_to_speech_voice_id_multi_stream_input": ".v_1_text_to_speech_voice_id_multi_stream_input", + "v_1_text_to_speech_voice_id_stream_input": ".v_1_text_to_speech_voice_id_stream_input", + "voices": ".voices", + "webhooks": ".webhooks", + "workspace": ".workspace", } @@ -2357,8 +2357,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/audio_isolation/__init__.py b/src/elevenlabs/audio_isolation/__init__.py index 6d26c81a..1fbd94f7 100644 --- a/src/elevenlabs/audio_isolation/__init__.py +++ b/src/elevenlabs/audio_isolation/__init__.py @@ -19,8 +19,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/audio_isolation/types/__init__.py b/src/elevenlabs/audio_isolation/types/__init__.py index 2003734e..07655d87 100644 --- a/src/elevenlabs/audio_isolation/types/__init__.py +++ b/src/elevenlabs/audio_isolation/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/audio_native/__init__.py b/src/elevenlabs/audio_native/__init__.py index 90f944e5..daf6ffad 100644 --- a/src/elevenlabs/audio_native/__init__.py +++ b/src/elevenlabs/audio_native/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/audio_native/types/__init__.py b/src/elevenlabs/audio_native/types/__init__.py index 4adb0b49..dd51e77b 100644 --- a/src/elevenlabs/audio_native/types/__init__.py +++ b/src/elevenlabs/audio_native/types/__init__.py @@ -18,8 +18,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py index fac306be..43663c59 100644 --- a/src/elevenlabs/conversational_ai/__init__.py +++ b/src/elevenlabs/conversational_ai/__init__.py @@ -54,20 +54,20 @@ "PhoneNumbersUpdateResponse_SipTrunk": ".phone_numbers", "PhoneNumbersUpdateResponse_Twilio": ".phone_numbers", "UpdateUnitTestRequestDynamicVariablesValue": ".tests", - "agents": ".", - "batch_calls": ".", - "conversations": ".", - "dashboard": ".", - "knowledge_base": ".", - "llm_usage": ".", - "mcp_servers": ".", - "phone_numbers": ".", - "secrets": ".", - "settings": ".", - "sip_trunk": ".", - "tests": ".", - "tools": ".", - "twilio": ".", + "agents": ".agents", + "batch_calls": ".batch_calls", + "conversations": ".conversations", + "dashboard": ".dashboard", + "knowledge_base": ".knowledge_base", + "llm_usage": ".llm_usage", + "mcp_servers": ".mcp_servers", + "phone_numbers": ".phone_numbers", + "secrets": ".secrets", + "settings": ".settings", + "sip_trunk": ".sip_trunk", + "tests": ".tests", + "tools": ".tools", + "twilio": ".twilio", } @@ -77,8 +77,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/agents/__init__.py b/src/elevenlabs/conversational_ai/agents/__init__.py index b1a2da37..be1f5579 100644 --- a/src/elevenlabs/conversational_ai/agents/__init__.py +++ b/src/elevenlabs/conversational_ai/agents/__init__.py @@ -7,7 +7,12 @@ if typing.TYPE_CHECKING: from . import knowledge_base, link, llm_usage, widget -_dynamic_imports: typing.Dict[str, str] = {"knowledge_base": ".", "link": ".", "llm_usage": ".", "widget": "."} +_dynamic_imports: typing.Dict[str, str] = { + "knowledge_base": ".knowledge_base", + "link": ".link", + "llm_usage": ".llm_usage", + "widget": ".widget", +} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +21,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/agents/widget/__init__.py b/src/elevenlabs/conversational_ai/agents/widget/__init__.py index 02db3278..95dbe0a1 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/__init__.py +++ b/src/elevenlabs/conversational_ai/agents/widget/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import avatar -_dynamic_imports: typing.Dict[str, str] = {"avatar": "."} +_dynamic_imports: typing.Dict[str, str] = {"avatar": ".avatar"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py index 042f2a7a..8ac0220e 100644 --- a/src/elevenlabs/conversational_ai/client.py +++ b/src/elevenlabs/conversational_ai/client.py @@ -8,7 +8,6 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.add_knowledge_base_response_model import AddKnowledgeBaseResponseModel -from ..types.post_workspace_secret_response_model import PostWorkspaceSecretResponseModel from ..types.rag_document_index_response_model import RagDocumentIndexResponseModel from ..types.rag_document_indexes_response_model import RagDocumentIndexesResponseModel from ..types.rag_index_overview_response_model import RagIndexOverviewResponseModel @@ -212,44 +211,6 @@ def rag_index_overview( _response = self._raw_client.rag_index_overview(request_options=request_options) return _response.data - def update_secret( - self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None - ) -> PostWorkspaceSecretResponseModel: - """ - Update an existing secret for the workspace - - Parameters - ---------- - secret_id : str - - name : str - - value : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - PostWorkspaceSecretResponseModel - Successful Response - - Examples - -------- - from elevenlabs import ElevenLabs - - client = ElevenLabs( - api_key="YOUR_API_KEY", - ) - client.conversational_ai.update_secret( - secret_id="secret_id", - name="name", - value="value", - ) - """ - _response = self._raw_client.update_secret(secret_id, name=name, value=value, request_options=request_options) - return _response.data - @property def conversations(self): if self._conversations is None: @@ -574,54 +535,6 @@ async def main() -> None: _response = await self._raw_client.rag_index_overview(request_options=request_options) return _response.data - async def update_secret( - self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None - ) -> PostWorkspaceSecretResponseModel: - """ - Update an existing secret for the workspace - - Parameters - ---------- - secret_id : str - - name : str - - value : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - PostWorkspaceSecretResponseModel - Successful Response - - Examples - -------- - import asyncio - - from elevenlabs import AsyncElevenLabs - - client = AsyncElevenLabs( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.conversational_ai.update_secret( - secret_id="secret_id", - name="name", - value="value", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_secret( - secret_id, name=name, value=value, request_options=request_options - ) - return _response.data - @property def conversations(self): if self._conversations is None: diff --git a/src/elevenlabs/conversational_ai/conversations/__init__.py b/src/elevenlabs/conversational_ai/conversations/__init__.py index c881102e..396d504d 100644 --- a/src/elevenlabs/conversational_ai/conversations/__init__.py +++ b/src/elevenlabs/conversational_ai/conversations/__init__.py @@ -10,8 +10,8 @@ from . import audio, feedback _dynamic_imports: typing.Dict[str, str] = { "ConversationsListRequestSummaryMode": ".types", - "audio": ".", - "feedback": ".", + "audio": ".audio", + "feedback": ".feedback", } @@ -21,8 +21,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/conversations/types/__init__.py b/src/elevenlabs/conversational_ai/conversations/types/__init__.py index c11f2cc9..ef16c77c 100644 --- a/src/elevenlabs/conversational_ai/conversations/types/__init__.py +++ b/src/elevenlabs/conversational_ai/conversations/types/__init__.py @@ -18,8 +18,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/dashboard/__init__.py b/src/elevenlabs/conversational_ai/dashboard/__init__.py index 0fdd1366..68478233 100644 --- a/src/elevenlabs/conversational_ai/dashboard/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/__init__.py @@ -18,7 +18,7 @@ "PatchConvAiDashboardSettingsRequestChartsItem_CallSuccess": ".settings", "PatchConvAiDashboardSettingsRequestChartsItem_Criteria": ".settings", "PatchConvAiDashboardSettingsRequestChartsItem_DataCollection": ".settings", - "settings": ".", + "settings": ".settings", } @@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py b/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py index 6212a875..5c51a886 100644 --- a/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/settings/__init__.py @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py b/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py index 397cc9fb..e55a3e82 100644 --- a/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py +++ b/src/elevenlabs/conversational_ai/dashboard/settings/types/__init__.py @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/knowledge_base/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/__init__.py index 369c9df2..d12df712 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/__init__.py @@ -26,8 +26,8 @@ "DocumentsUpdateResponse_File": ".documents", "DocumentsUpdateResponse_Text": ".documents", "DocumentsUpdateResponse_Url": ".documents", - "document": ".", - "documents": ".", + "document": ".document", + "documents": ".documents", } @@ -37,8 +37,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py index 4a871403..f32b9ba4 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/__init__.py @@ -26,7 +26,7 @@ "DocumentsUpdateResponse_File": ".types", "DocumentsUpdateResponse_Text": ".types", "DocumentsUpdateResponse_Url": ".types", - "chunk": ".", + "chunk": ".chunk", } @@ -36,8 +36,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py index d018ba4d..dc09df13 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/types/__init__.py @@ -36,8 +36,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py index 86253bde..3fe0cfa4 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py @@ -7,7 +7,11 @@ if typing.TYPE_CHECKING: from . import approval_policy, tool_approvals, tools -_dynamic_imports: typing.Dict[str, str] = {"approval_policy": ".", "tool_approvals": ".", "tools": "."} +_dynamic_imports: typing.Dict[str, str] = { + "approval_policy": ".approval_policy", + "tool_approvals": ".tool_approvals", + "tools": ".tools", +} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/phone_numbers/__init__.py b/src/elevenlabs/conversational_ai/phone_numbers/__init__.py index 84c73f96..5519abc7 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/__init__.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/__init__.py @@ -42,8 +42,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py b/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py index c89d051d..444835c2 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/__init__.py @@ -48,8 +48,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/raw_client.py b/src/elevenlabs/conversational_ai/raw_client.py index eef42a91..32868c01 100644 --- a/src/elevenlabs/conversational_ai/raw_client.py +++ b/src/elevenlabs/conversational_ai/raw_client.py @@ -13,7 +13,6 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.add_knowledge_base_response_model import AddKnowledgeBaseResponseModel from ..types.http_validation_error import HttpValidationError -from ..types.post_workspace_secret_response_model import PostWorkspaceSecretResponseModel from ..types.rag_document_index_response_model import RagDocumentIndexResponseModel from ..types.rag_document_indexes_response_model import RagDocumentIndexesResponseModel from ..types.rag_index_overview_response_model import RagIndexOverviewResponseModel @@ -252,68 +251,6 @@ def rag_index_overview( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def update_secret( - self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[PostWorkspaceSecretResponseModel]: - """ - Update an existing secret for the workspace - - Parameters - ---------- - secret_id : str - - name : str - - value : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[PostWorkspaceSecretResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/convai/secrets/{jsonable_encoder(secret_id)}", - method="PATCH", - json={ - "name": name, - "value": value, - "type": "update", - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - PostWorkspaceSecretResponseModel, - construct_type( - type_=PostWorkspaceSecretResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - class AsyncRawConversationalAiClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -544,65 +481,3 @@ async def rag_index_overview( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def update_secret( - self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[PostWorkspaceSecretResponseModel]: - """ - Update an existing secret for the workspace - - Parameters - ---------- - secret_id : str - - name : str - - value : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[PostWorkspaceSecretResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/convai/secrets/{jsonable_encoder(secret_id)}", - method="PATCH", - json={ - "name": name, - "value": value, - "type": "update", - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - PostWorkspaceSecretResponseModel, - construct_type( - type_=PostWorkspaceSecretResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - construct_type( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/secrets/client.py b/src/elevenlabs/conversational_ai/secrets/client.py index 69aff87c..92807c32 100644 --- a/src/elevenlabs/conversational_ai/secrets/client.py +++ b/src/elevenlabs/conversational_ai/secrets/client.py @@ -117,6 +117,44 @@ def delete(self, secret_id: str, *, request_options: typing.Optional[RequestOpti _response = self._raw_client.delete(secret_id, request_options=request_options) return _response.data + def update( + self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None + ) -> PostWorkspaceSecretResponseModel: + """ + Update an existing secret for the workspace + + Parameters + ---------- + secret_id : str + + name : str + + value : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PostWorkspaceSecretResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.secrets.update( + secret_id="secret_id", + name="name", + value="value", + ) + """ + _response = self._raw_client.update(secret_id, name=name, value=value, request_options=request_options) + return _response.data + class AsyncSecretsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -248,3 +286,49 @@ async def main() -> None: """ _response = await self._raw_client.delete(secret_id, request_options=request_options) return _response.data + + async def update( + self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None + ) -> PostWorkspaceSecretResponseModel: + """ + Update an existing secret for the workspace + + Parameters + ---------- + secret_id : str + + name : str + + value : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PostWorkspaceSecretResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.secrets.update( + secret_id="secret_id", + name="name", + value="value", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update(secret_id, name=name, value=value, request_options=request_options) + return _response.data diff --git a/src/elevenlabs/conversational_ai/secrets/raw_client.py b/src/elevenlabs/conversational_ai/secrets/raw_client.py index 120be6d6..ee6e0929 100644 --- a/src/elevenlabs/conversational_ai/secrets/raw_client.py +++ b/src/elevenlabs/conversational_ai/secrets/raw_client.py @@ -168,6 +168,68 @@ def delete(self, secret_id: str, *, request_options: typing.Optional[RequestOpti raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def update( + self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[PostWorkspaceSecretResponseModel]: + """ + Update an existing secret for the workspace + + Parameters + ---------- + secret_id : str + + name : str + + value : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PostWorkspaceSecretResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/secrets/{jsonable_encoder(secret_id)}", + method="PATCH", + json={ + "name": name, + "value": value, + "type": "update", + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PostWorkspaceSecretResponseModel, + construct_type( + type_=PostWorkspaceSecretResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawSecretsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -320,3 +382,65 @@ async def delete( except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, secret_id: str, *, name: str, value: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[PostWorkspaceSecretResponseModel]: + """ + Update an existing secret for the workspace + + Parameters + ---------- + secret_id : str + + name : str + + value : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PostWorkspaceSecretResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/secrets/{jsonable_encoder(secret_id)}", + method="PATCH", + json={ + "name": name, + "value": value, + "type": "update", + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PostWorkspaceSecretResponseModel, + construct_type( + type_=PostWorkspaceSecretResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/tests/__init__.py b/src/elevenlabs/conversational_ai/tests/__init__.py index e1f1df81..6f2197a2 100644 --- a/src/elevenlabs/conversational_ai/tests/__init__.py +++ b/src/elevenlabs/conversational_ai/tests/__init__.py @@ -11,7 +11,7 @@ _dynamic_imports: typing.Dict[str, str] = { "CreateUnitTestRequestDynamicVariablesValue": ".types", "UpdateUnitTestRequestDynamicVariablesValue": ".types", - "invocations": ".", + "invocations": ".invocations", } @@ -21,8 +21,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/conversational_ai/tests/types/__init__.py b/src/elevenlabs/conversational_ai/tests/types/__init__.py index d066d8c6..4934bed5 100644 --- a/src/elevenlabs/conversational_ai/tests/types/__init__.py +++ b/src/elevenlabs/conversational_ai/tests/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/core/__init__.py b/src/elevenlabs/core/__init__.py index 18228526..a7e9f033 100644 --- a/src/elevenlabs/core/__init__.py +++ b/src/elevenlabs/core/__init__.py @@ -65,8 +65,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/core/pydantic_utilities.py b/src/elevenlabs/core/pydantic_utilities.py index dd7d89f5..8906cdfa 100644 --- a/src/elevenlabs/core/pydantic_utilities.py +++ b/src/elevenlabs/core/pydantic_utilities.py @@ -61,7 +61,7 @@ class UniversalBaseModel(pydantic.BaseModel): @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] def serialize_model(self) -> Any: # type: ignore[name-defined] - serialized = self.model_dump() # type: ignore[attr-defined] + serialized = self.dict() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data diff --git a/src/elevenlabs/dubbing/__init__.py b/src/elevenlabs/dubbing/__init__.py index de1c492e..0be366f9 100644 --- a/src/elevenlabs/dubbing/__init__.py +++ b/src/elevenlabs/dubbing/__init__.py @@ -20,9 +20,9 @@ "DubbingListRequestFilterByCreator": ".types", "DubbingListRequestOrderDirection": ".types", "TranscriptGetTranscriptForDubRequestFormatType": ".transcript", - "audio": ".", - "resource": ".", - "transcript": ".", + "audio": ".audio", + "resource": ".resource", + "transcript": ".transcript", } @@ -32,8 +32,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/dubbing/resource/__init__.py b/src/elevenlabs/dubbing/resource/__init__.py index 4ea7122d..b3e1a310 100644 --- a/src/elevenlabs/dubbing/resource/__init__.py +++ b/src/elevenlabs/dubbing/resource/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import language, segment, speaker -_dynamic_imports: typing.Dict[str, str] = {"language": ".", "segment": ".", "speaker": "."} +_dynamic_imports: typing.Dict[str, str] = {"language": ".language", "segment": ".segment", "speaker": ".speaker"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/dubbing/resource/speaker/__init__.py b/src/elevenlabs/dubbing/resource/speaker/__init__.py index 0d923748..0f567a06 100644 --- a/src/elevenlabs/dubbing/resource/speaker/__init__.py +++ b/src/elevenlabs/dubbing/resource/speaker/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import segment -_dynamic_imports: typing.Dict[str, str] = {"segment": "."} +_dynamic_imports: typing.Dict[str, str] = {"segment": ".segment"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/dubbing/transcript/__init__.py b/src/elevenlabs/dubbing/transcript/__init__.py index d3538871..29f9cbc2 100644 --- a/src/elevenlabs/dubbing/transcript/__init__.py +++ b/src/elevenlabs/dubbing/transcript/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/dubbing/transcript/types/__init__.py b/src/elevenlabs/dubbing/transcript/types/__init__.py index f515ddf3..7397b45a 100644 --- a/src/elevenlabs/dubbing/transcript/types/__init__.py +++ b/src/elevenlabs/dubbing/transcript/types/__init__.py @@ -18,8 +18,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/dubbing/types/__init__.py b/src/elevenlabs/dubbing/types/__init__.py index b39c891a..3cf50401 100644 --- a/src/elevenlabs/dubbing/types/__init__.py +++ b/src/elevenlabs/dubbing/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/errors/__init__.py b/src/elevenlabs/errors/__init__.py index 4645f0d2..2363ce48 100644 --- a/src/elevenlabs/errors/__init__.py +++ b/src/elevenlabs/errors/__init__.py @@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/history/__init__.py b/src/elevenlabs/history/__init__.py index a74ebe6c..4d6d3a9f 100644 --- a/src/elevenlabs/history/__init__.py +++ b/src/elevenlabs/history/__init__.py @@ -19,8 +19,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/history/types/__init__.py b/src/elevenlabs/history/types/__init__.py index ca843d97..9cde94e8 100644 --- a/src/elevenlabs/history/types/__init__.py +++ b/src/elevenlabs/history/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/music/__init__.py b/src/elevenlabs/music/__init__.py index d30a333a..d12d1182 100644 --- a/src/elevenlabs/music/__init__.py +++ b/src/elevenlabs/music/__init__.py @@ -16,7 +16,7 @@ "MusicComposeDetailedRequestOutputFormat": ".types", "MusicComposeRequestOutputFormat": ".types", "MusicStreamRequestOutputFormat": ".types", - "composition_plan": ".", + "composition_plan": ".composition_plan", } @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/music/types/__init__.py b/src/elevenlabs/music/types/__init__.py index a9e13c18..a57bb95e 100644 --- a/src/elevenlabs/music/types/__init__.py +++ b/src/elevenlabs/music/types/__init__.py @@ -22,8 +22,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/pronunciation_dictionaries/__init__.py b/src/elevenlabs/pronunciation_dictionaries/__init__.py index 63fc4f22..5b463606 100644 --- a/src/elevenlabs/pronunciation_dictionaries/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/__init__.py @@ -30,7 +30,7 @@ "PronunciationDictionaryRule": ".rules", "PronunciationDictionaryRule_Alias": ".rules", "PronunciationDictionaryRule_Phoneme": ".rules", - "rules": ".", + "rules": ".rules", } @@ -40,8 +40,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index 950b5bce..279045be 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -259,7 +259,7 @@ def download( The id of the pronunciation dictionary version_id : str - The id of the version of the pronunciation dictionary + The id of the pronunciation dictionary version request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -611,7 +611,7 @@ async def download( The id of the pronunciation dictionary version_id : str - The id of the version of the pronunciation dictionary + The id of the pronunciation dictionary version request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py index bfe1a099..b6edd429 100644 --- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py @@ -330,7 +330,7 @@ def download( The id of the pronunciation dictionary version_id : str - The id of the version of the pronunciation dictionary + The id of the pronunciation dictionary version request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -742,7 +742,7 @@ async def download( The id of the pronunciation dictionary version_id : str - The id of the version of the pronunciation dictionary + The id of the pronunciation dictionary version request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. diff --git a/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py b/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py index 1876a209..70dec2c2 100644 --- a/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/rules/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py b/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py index 80e65e8d..dc7fdf84 100644 --- a/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/rules/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/pronunciation_dictionaries/types/__init__.py b/src/elevenlabs/pronunciation_dictionaries/types/__init__.py index 2898b0e0..1af0426d 100644 --- a/src/elevenlabs/pronunciation_dictionaries/types/__init__.py +++ b/src/elevenlabs/pronunciation_dictionaries/types/__init__.py @@ -34,8 +34,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/service_accounts/__init__.py b/src/elevenlabs/service_accounts/__init__.py index c6f2534b..b6a0f743 100644 --- a/src/elevenlabs/service_accounts/__init__.py +++ b/src/elevenlabs/service_accounts/__init__.py @@ -18,7 +18,7 @@ "BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissionsItem": ".api_keys", "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions": ".api_keys", "BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissionsItem": ".api_keys", - "api_keys": ".", + "api_keys": ".api_keys", } @@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/service_accounts/api_keys/__init__.py b/src/elevenlabs/service_accounts/api_keys/__init__.py index 126a28ee..4c09ca3f 100644 --- a/src/elevenlabs/service_accounts/api_keys/__init__.py +++ b/src/elevenlabs/service_accounts/api_keys/__init__.py @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/service_accounts/api_keys/types/__init__.py b/src/elevenlabs/service_accounts/api_keys/types/__init__.py index e5710475..6e60acde 100644 --- a/src/elevenlabs/service_accounts/api_keys/types/__init__.py +++ b/src/elevenlabs/service_accounts/api_keys/types/__init__.py @@ -32,8 +32,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_speech/__init__.py b/src/elevenlabs/speech_to_speech/__init__.py index aa278ffc..f5a38542 100644 --- a/src/elevenlabs/speech_to_speech/__init__.py +++ b/src/elevenlabs/speech_to_speech/__init__.py @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_speech/types/__init__.py b/src/elevenlabs/speech_to_speech/types/__init__.py index 0d215db2..f8e27ae2 100644 --- a/src/elevenlabs/speech_to_speech/types/__init__.py +++ b/src/elevenlabs/speech_to_speech/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_text/__init__.py b/src/elevenlabs/speech_to_text/__init__.py index cf173164..6c72544c 100644 --- a/src/elevenlabs/speech_to_text/__init__.py +++ b/src/elevenlabs/speech_to_text/__init__.py @@ -20,7 +20,7 @@ "SpeechToTextConvertRequestWebhookMetadata": ".types", "SpeechToTextConvertResponse": ".types", "TranscriptsGetResponse": ".transcripts", - "transcripts": ".", + "transcripts": ".transcripts", } @@ -30,8 +30,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_text/transcripts/__init__.py b/src/elevenlabs/speech_to_text/transcripts/__init__.py index c10ff243..51c0952b 100644 --- a/src/elevenlabs/speech_to_text/transcripts/__init__.py +++ b/src/elevenlabs/speech_to_text/transcripts/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_text/transcripts/types/__init__.py b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py index a4adb3ee..57194ed5 100644 --- a/src/elevenlabs/speech_to_text/transcripts/types/__init__.py +++ b/src/elevenlabs/speech_to_text/transcripts/types/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/speech_to_text/types/__init__.py b/src/elevenlabs/speech_to_text/types/__init__.py index 08e5b6ed..02e03c47 100644 --- a/src/elevenlabs/speech_to_text/types/__init__.py +++ b/src/elevenlabs/speech_to_text/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/studio/__init__.py b/src/elevenlabs/studio/__init__.py index dd857538..f7a256ec 100644 --- a/src/elevenlabs/studio/__init__.py +++ b/src/elevenlabs/studio/__init__.py @@ -40,7 +40,7 @@ "ProjectsCreateRequestFiction": ".projects", "ProjectsCreateRequestSourceType": ".projects", "ProjectsCreateRequestTargetAudience": ".projects", - "projects": ".", + "projects": ".projects", } @@ -50,8 +50,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/studio/projects/__init__.py b/src/elevenlabs/studio/projects/__init__.py index ceddd34b..eda81aff 100644 --- a/src/elevenlabs/studio/projects/__init__.py +++ b/src/elevenlabs/studio/projects/__init__.py @@ -18,10 +18,10 @@ "ProjectsCreateRequestFiction": ".types", "ProjectsCreateRequestSourceType": ".types", "ProjectsCreateRequestTargetAudience": ".types", - "chapters": ".", - "content": ".", - "pronunciation_dictionaries": ".", - "snapshots": ".", + "chapters": ".chapters", + "content": ".content", + "pronunciation_dictionaries": ".pronunciation_dictionaries", + "snapshots": ".snapshots", } @@ -31,8 +31,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/studio/projects/chapters/__init__.py b/src/elevenlabs/studio/projects/chapters/__init__.py index b6ccf224..89557354 100644 --- a/src/elevenlabs/studio/projects/chapters/__init__.py +++ b/src/elevenlabs/studio/projects/chapters/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import snapshots -_dynamic_imports: typing.Dict[str, str] = {"snapshots": "."} +_dynamic_imports: typing.Dict[str, str] = {"snapshots": ".snapshots"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index c295ec3f..a5e5ca29 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -32,10 +32,10 @@ class ProjectsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawProjectsClient(client_wrapper=client_wrapper) self._client_wrapper = client_wrapper + self._pronunciation_dictionaries: typing.Optional[PronunciationDictionariesClient] = None self._content: typing.Optional[ContentClient] = None self._snapshots: typing.Optional[SnapshotsClient] = None self._chapters: typing.Optional[ChaptersClient] = None - self._pronunciation_dictionaries: typing.Optional[PronunciationDictionariesClient] = None @property def with_raw_response(self) -> RawProjectsClient: @@ -181,7 +181,7 @@ def create( When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements pronunciation_dictionary_locators : typing.Optional[typing.List[str]] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. callback_url : typing.Optional[str] @@ -495,6 +495,14 @@ def convert( _response = self._raw_client.convert(project_id, request_options=request_options) return _response.data + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import PronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries + @property def content(self): if self._content is None: @@ -519,23 +527,15 @@ def chapters(self): self._chapters = ChaptersClient(client_wrapper=self._client_wrapper) return self._chapters - @property - def pronunciation_dictionaries(self): - if self._pronunciation_dictionaries is None: - from .pronunciation_dictionaries.client import PronunciationDictionariesClient # noqa: E402 - - self._pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) - return self._pronunciation_dictionaries - class AsyncProjectsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawProjectsClient(client_wrapper=client_wrapper) self._client_wrapper = client_wrapper + self._pronunciation_dictionaries: typing.Optional[AsyncPronunciationDictionariesClient] = None self._content: typing.Optional[AsyncContentClient] = None self._snapshots: typing.Optional[AsyncSnapshotsClient] = None self._chapters: typing.Optional[AsyncChaptersClient] = None - self._pronunciation_dictionaries: typing.Optional[AsyncPronunciationDictionariesClient] = None @property def with_raw_response(self) -> AsyncRawProjectsClient: @@ -689,7 +689,7 @@ async def create( When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements pronunciation_dictionary_locators : typing.Optional[typing.List[str]] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. callback_url : typing.Optional[str] @@ -1043,6 +1043,14 @@ async def main() -> None: _response = await self._raw_client.convert(project_id, request_options=request_options) return _response.data + @property + def pronunciation_dictionaries(self): + if self._pronunciation_dictionaries is None: + from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient # noqa: E402 + + self._pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) + return self._pronunciation_dictionaries + @property def content(self): if self._content is None: @@ -1066,11 +1074,3 @@ def chapters(self): self._chapters = AsyncChaptersClient(client_wrapper=self._client_wrapper) return self._chapters - - @property - def pronunciation_dictionaries(self): - if self._pronunciation_dictionaries is None: - from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient # noqa: E402 - - self._pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) - return self._pronunciation_dictionaries diff --git a/src/elevenlabs/studio/projects/pronunciation_dictionaries/client.py b/src/elevenlabs/studio/projects/pronunciation_dictionaries/client.py index b8e13ffb..e613b295 100644 --- a/src/elevenlabs/studio/projects/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/studio/projects/pronunciation_dictionaries/client.py @@ -44,7 +44,7 @@ def create( The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. invalidate_affected_text : typing.Optional[bool] This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. @@ -114,7 +114,7 @@ async def create( The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. invalidate_affected_text : typing.Optional[bool] This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. diff --git a/src/elevenlabs/studio/projects/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/studio/projects/pronunciation_dictionaries/raw_client.py index ec202830..ffccdfb3 100644 --- a/src/elevenlabs/studio/projects/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/studio/projects/pronunciation_dictionaries/raw_client.py @@ -40,7 +40,7 @@ def create( The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. invalidate_affected_text : typing.Optional[bool] This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. @@ -118,7 +118,7 @@ async def create( The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. invalidate_affected_text : typing.Optional[bool] This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py index 87b5ee68..d9c6e791 100644 --- a/src/elevenlabs/studio/projects/raw_client.py +++ b/src/elevenlabs/studio/projects/raw_client.py @@ -183,7 +183,7 @@ def create( When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements pronunciation_dictionary_locators : typing.Optional[typing.List[str]] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. callback_url : typing.Optional[str] @@ -747,7 +747,7 @@ async def create( When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements pronunciation_dictionary_locators : typing.Optional[typing.List[str]] - A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first. + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. callback_url : typing.Optional[str] diff --git a/src/elevenlabs/studio/projects/types/__init__.py b/src/elevenlabs/studio/projects/types/__init__.py index 76c9d27c..9428f3ac 100644 --- a/src/elevenlabs/studio/projects/types/__init__.py +++ b/src/elevenlabs/studio/projects/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/studio/types/__init__.py b/src/elevenlabs/studio/types/__init__.py index 569bff26..ebe636cf 100644 --- a/src/elevenlabs/studio/types/__init__.py +++ b/src/elevenlabs/studio/types/__init__.py @@ -46,8 +46,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_dialogue/__init__.py b/src/elevenlabs/text_to_dialogue/__init__.py index a37c44fc..0939fe36 100644 --- a/src/elevenlabs/text_to_dialogue/__init__.py +++ b/src/elevenlabs/text_to_dialogue/__init__.py @@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_dialogue/types/__init__.py b/src/elevenlabs/text_to_dialogue/types/__init__.py index 58f90396..c3b346d4 100644 --- a/src/elevenlabs/text_to_dialogue/types/__init__.py +++ b/src/elevenlabs/text_to_dialogue/types/__init__.py @@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_sound_effects/__init__.py b/src/elevenlabs/text_to_sound_effects/__init__.py index efa9d3f6..e7566f6d 100644 --- a/src/elevenlabs/text_to_sound_effects/__init__.py +++ b/src/elevenlabs/text_to_sound_effects/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_sound_effects/types/__init__.py b/src/elevenlabs/text_to_sound_effects/types/__init__.py index 31fd65a2..d875efa2 100644 --- a/src/elevenlabs/text_to_sound_effects/types/__init__.py +++ b/src/elevenlabs/text_to_sound_effects/types/__init__.py @@ -18,8 +18,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_speech/__init__.py b/src/elevenlabs/text_to_speech/__init__.py index 247e10e1..8140b0bd 100644 --- a/src/elevenlabs/text_to_speech/__init__.py +++ b/src/elevenlabs/text_to_speech/__init__.py @@ -34,8 +34,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_speech/types/__init__.py b/src/elevenlabs/text_to_speech/types/__init__.py index 943a1513..fdd44c3e 100644 --- a/src/elevenlabs/text_to_speech/types/__init__.py +++ b/src/elevenlabs/text_to_speech/types/__init__.py @@ -40,8 +40,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_voice/__init__.py b/src/elevenlabs/text_to_voice/__init__.py index 19cf751c..19e5ec49 100644 --- a/src/elevenlabs/text_to_voice/__init__.py +++ b/src/elevenlabs/text_to_voice/__init__.py @@ -18,7 +18,7 @@ "TextToVoiceDesignRequestOutputFormat": ".types", "TextToVoiceRemixRequestOutputFormat": ".types", "VoiceDesignRequestModelModelId": ".types", - "preview": ".", + "preview": ".preview", } @@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/text_to_voice/types/__init__.py b/src/elevenlabs/text_to_voice/types/__init__.py index 264e1a98..6af89dfc 100644 --- a/src/elevenlabs/text_to_voice/types/__init__.py +++ b/src/elevenlabs/text_to_voice/types/__init__.py @@ -24,8 +24,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index c3803871..76fabbe5 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -2320,8 +2320,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/types/client_event.py b/src/elevenlabs/types/client_event.py index c0f65f7e..8f2c42b7 100644 --- a/src/elevenlabs/types/client_event.py +++ b/src/elevenlabs/types/client_event.py @@ -18,6 +18,7 @@ "mcp_connection_status", "agent_tool_response", "vad_score", + "agent_chat_response_part", "internal_turn_probability", "internal_tentative_agent_response", ], diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index 48767995..8bf6eda3 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -21,6 +21,7 @@ "gemini-2.0-flash-lite", "gemini-2.5-flash-lite", "gemini-2.5-flash", + "claude-sonnet-4-5", "claude-sonnet-4", "claude-3-7-sonnet", "claude-3-5-sonnet", @@ -33,6 +34,8 @@ "gpt-oss-20b", "gpt-oss-120b", "glm-45-air-fp8", + "gemini-2.5-flash-preview-09-2025", + "gemini-2.5-flash-lite-preview-09-2025", "gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-flash-lite-preview-06-17", @@ -43,6 +46,7 @@ "gemini-1.5-pro-002", "gemini-1.5-pro-001", "claude-sonnet-4@20250514", + "claude-sonnet-4-5@20250929", "claude-3-7-sonnet@20250219", "claude-3-5-sonnet@20240620", "claude-3-5-sonnet-v2@20241022", diff --git a/src/elevenlabs/types/speech_history_item_response_model_source.py b/src/elevenlabs/types/speech_history_item_response_model_source.py index ce3689bf..6bbf0908 100644 --- a/src/elevenlabs/types/speech_history_item_response_model_source.py +++ b/src/elevenlabs/types/speech_history_item_response_model_source.py @@ -3,5 +3,5 @@ import typing SpeechHistoryItemResponseModelSource = typing.Union[ - typing.Literal["TTS", "STS", "Projects", "PD", "AN", "Dubbing", "PlayAPI", "ConvAI"], typing.Any + typing.Literal["TTS", "STS", "Projects", "PD", "AN", "Dubbing", "PlayAPI", "ConvAI", "VoiceGeneration"], typing.Any ] diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 0522972c..6b6a6a6c 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -20,6 +20,7 @@ "convai_batch_calls", "convai_agent_response_tests", "convai_test_suite_invocations", + "convai_whatsapp_accounts", ], typing.Any, ] diff --git a/src/elevenlabs/user/__init__.py b/src/elevenlabs/user/__init__.py index 1dd5020a..59f00b1a 100644 --- a/src/elevenlabs/user/__init__.py +++ b/src/elevenlabs/user/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import subscription -_dynamic_imports: typing.Dict[str, str] = {"subscription": "."} +_dynamic_imports: typing.Dict[str, str] = {"subscription": ".subscription"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py index e3c7095d..f6d676b7 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py index a8cda802..0f70bab0 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_multi_stream_input/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py index ea22558c..3ce5d15f 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py index 9f336c67..0c784f86 100644 --- a/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py +++ b/src/elevenlabs/v_1_text_to_speech_voice_id_stream_input/types/__init__.py @@ -17,8 +17,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/__init__.py b/src/elevenlabs/voices/__init__.py index 3ede28ea..d87caa0f 100644 --- a/src/elevenlabs/voices/__init__.py +++ b/src/elevenlabs/voices/__init__.py @@ -10,10 +10,10 @@ from . import ivc, pvc, samples, settings _dynamic_imports: typing.Dict[str, str] = { "VoicesGetSharedRequestCategory": ".types", - "ivc": ".", - "pvc": ".", - "samples": ".", - "settings": ".", + "ivc": ".ivc", + "pvc": ".pvc", + "samples": ".samples", + "settings": ".settings", } @@ -23,8 +23,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/pvc/__init__.py b/src/elevenlabs/voices/pvc/__init__.py index e2f6de53..2c889c3f 100644 --- a/src/elevenlabs/voices/pvc/__init__.py +++ b/src/elevenlabs/voices/pvc/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import samples, verification -_dynamic_imports: typing.Dict[str, str] = {"samples": ".", "verification": "."} +_dynamic_imports: typing.Dict[str, str] = {"samples": ".samples", "verification": ".verification"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/pvc/samples/__init__.py b/src/elevenlabs/voices/pvc/samples/__init__.py index c32c9783..865981c9 100644 --- a/src/elevenlabs/voices/pvc/samples/__init__.py +++ b/src/elevenlabs/voices/pvc/samples/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import audio, speakers, waveform -_dynamic_imports: typing.Dict[str, str] = {"audio": ".", "speakers": ".", "waveform": "."} +_dynamic_imports: typing.Dict[str, str] = {"audio": ".audio", "speakers": ".speakers", "waveform": ".waveform"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/pvc/samples/speakers/__init__.py b/src/elevenlabs/voices/pvc/samples/speakers/__init__.py index 2711324f..6ac40397 100644 --- a/src/elevenlabs/voices/pvc/samples/speakers/__init__.py +++ b/src/elevenlabs/voices/pvc/samples/speakers/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import audio -_dynamic_imports: typing.Dict[str, str] = {"audio": "."} +_dynamic_imports: typing.Dict[str, str] = {"audio": ".audio"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/pvc/verification/__init__.py b/src/elevenlabs/voices/pvc/verification/__init__.py index 0a38a0a4..ae4b58d0 100644 --- a/src/elevenlabs/voices/pvc/verification/__init__.py +++ b/src/elevenlabs/voices/pvc/verification/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import captcha -_dynamic_imports: typing.Dict[str, str] = {"captcha": "."} +_dynamic_imports: typing.Dict[str, str] = {"captcha": ".captcha"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/samples/__init__.py b/src/elevenlabs/voices/samples/__init__.py index 2711324f..6ac40397 100644 --- a/src/elevenlabs/voices/samples/__init__.py +++ b/src/elevenlabs/voices/samples/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import audio -_dynamic_imports: typing.Dict[str, str] = {"audio": "."} +_dynamic_imports: typing.Dict[str, str] = {"audio": ".audio"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/voices/types/__init__.py b/src/elevenlabs/voices/types/__init__.py index 927b87bf..44772e48 100644 --- a/src/elevenlabs/voices/types/__init__.py +++ b/src/elevenlabs/voices/types/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/__init__.py b/src/elevenlabs/workspace/__init__.py index 3b0f2c7e..6a78328f 100644 --- a/src/elevenlabs/workspace/__init__.py +++ b/src/elevenlabs/workspace/__init__.py @@ -14,10 +14,10 @@ "BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission": ".invites", "BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole": ".resources", "BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole": ".members", - "groups": ".", - "invites": ".", - "members": ".", - "resources": ".", + "groups": ".groups", + "invites": ".invites", + "members": ".members", + "resources": ".resources", } @@ -27,8 +27,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/groups/__init__.py b/src/elevenlabs/workspace/groups/__init__.py index abf38af1..6184be4a 100644 --- a/src/elevenlabs/workspace/groups/__init__.py +++ b/src/elevenlabs/workspace/groups/__init__.py @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from . import members -_dynamic_imports: typing.Dict[str, str] = {"members": "."} +_dynamic_imports: typing.Dict[str, str] = {"members": ".members"} def __getattr__(attr_name: str) -> typing.Any: @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/invites/__init__.py b/src/elevenlabs/workspace/invites/__init__.py index 9504611c..d0532380 100644 --- a/src/elevenlabs/workspace/invites/__init__.py +++ b/src/elevenlabs/workspace/invites/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/invites/types/__init__.py b/src/elevenlabs/workspace/invites/types/__init__.py index 736dde1f..7739f710 100644 --- a/src/elevenlabs/workspace/invites/types/__init__.py +++ b/src/elevenlabs/workspace/invites/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/members/__init__.py b/src/elevenlabs/workspace/members/__init__.py index c59134f8..4c568957 100644 --- a/src/elevenlabs/workspace/members/__init__.py +++ b/src/elevenlabs/workspace/members/__init__.py @@ -16,8 +16,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/members/types/__init__.py b/src/elevenlabs/workspace/members/types/__init__.py index b95be54b..c04d34f4 100644 --- a/src/elevenlabs/workspace/members/types/__init__.py +++ b/src/elevenlabs/workspace/members/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/resources/__init__.py b/src/elevenlabs/workspace/resources/__init__.py index a079aa9c..33f0b39d 100644 --- a/src/elevenlabs/workspace/resources/__init__.py +++ b/src/elevenlabs/workspace/resources/__init__.py @@ -18,8 +18,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: diff --git a/src/elevenlabs/workspace/resources/types/__init__.py b/src/elevenlabs/workspace/resources/types/__init__.py index bb46aecb..962328fd 100644 --- a/src/elevenlabs/workspace/resources/types/__init__.py +++ b/src/elevenlabs/workspace/resources/types/__init__.py @@ -20,8 +20,10 @@ def __getattr__(attr_name: str) -> typing.Any: raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") try: module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) except ImportError as e: raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e except AttributeError as e: From 665f44068139716d122c206c0744917ae2e58cc6 Mon Sep 17 00:00:00 2001 From: Angelo Giacco Date: Fri, 10 Oct 2025 14:14:35 +0100 Subject: [PATCH 22/34] add support for streaming (#641) * add support for streaming * fix --- pyproject.toml | 2 +- .../conversational_ai/conversation.py | 46 ++++++++++++ tests/test_convai.py | 75 ++++++++++++++++++- 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a3650b89..62dbf786 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.17.0" +version = "v2.18.0" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index 207eda6e..6feceb5d 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -31,6 +31,12 @@ class ClientToOrchestratorEvent(str, Enum): USER_ACTIVITY = "user_activity" +class AgentChatResponsePartType(str, Enum): + START = "start" + DELTA = "delta" + STOP = "stop" + + class UserMessageClientToOrchestratorEvent: """Event for sending user text messages.""" @@ -382,6 +388,17 @@ def _handle_message_core(self, message, message_handler): event = message["agent_response_event"] message_handler.handle_agent_response(event["agent_response"].strip()) + elif message["type"] == "agent_chat_response_part": + if message_handler.callback_agent_chat_response_part: + event = message.get("text_response_part", {}) + text = event.get("text", "") + part_type_str = event.get("type", "delta") + try: + part_type = AgentChatResponsePartType(part_type_str) + except ValueError: + part_type = AgentChatResponsePartType.DELTA + message_handler.handle_agent_chat_response_part(text, part_type) + elif message["type"] == "agent_response_correction": if message_handler.callback_agent_response_correction: event = message["agent_response_correction_event"] @@ -433,6 +450,17 @@ async def _handle_message_core_async(self, message, message_handler): event = message["agent_response_event"] await message_handler.handle_agent_response(event["agent_response"].strip()) + elif message["type"] == "agent_chat_response_part": + if message_handler.callback_agent_chat_response_part: + event = message.get("text_response_part", {}) + text = event.get("text", "") + part_type_str = event.get("type", "delta") + try: + part_type = AgentChatResponsePartType(part_type_str) + except ValueError: + part_type = AgentChatResponsePartType.DELTA + await message_handler.handle_agent_chat_response_part(text, part_type) + elif message["type"] == "agent_response_correction": if message_handler.callback_agent_response_correction: event = message["agent_response_correction_event"] @@ -470,6 +498,7 @@ class Conversation(BaseConversation): audio_interface: AudioInterface callback_agent_response: Optional[Callable[[str], None]] callback_agent_response_correction: Optional[Callable[[str, str], None]] + callback_agent_chat_response_part: Optional[Callable[[str, AgentChatResponsePartType], None]] callback_user_transcript: Optional[Callable[[str], None]] callback_latency_measurement: Optional[Callable[[int], None]] callback_end_session: Optional[Callable] @@ -490,6 +519,7 @@ def __init__( client_tools: Optional[ClientTools] = None, callback_agent_response: Optional[Callable[[str], None]] = None, callback_agent_response_correction: Optional[Callable[[str, str], None]] = None, + callback_agent_chat_response_part: Optional[Callable[[str, AgentChatResponsePartType], None]] = None, callback_user_transcript: Optional[Callable[[str], None]] = None, callback_latency_measurement: Optional[Callable[[int], None]] = None, callback_end_session: Optional[Callable] = None, @@ -509,6 +539,8 @@ def __init__( callback_agent_response_correction: Callback for agent response corrections. First argument is the original response (previously given to callback_agent_response), second argument is the corrected response. + callback_agent_chat_response_part: Callback for streaming text response chunks. + First argument is the text chunk, second argument is the type (START, DELTA, STOP). callback_user_transcript: Callback for user transcripts. callback_latency_measurement: Callback for latency measurements (in milliseconds). """ @@ -525,6 +557,7 @@ def __init__( self.audio_interface = audio_interface self.callback_agent_response = callback_agent_response self.callback_agent_response_correction = callback_agent_response_correction + self.callback_agent_chat_response_part = callback_agent_chat_response_part self.callback_user_transcript = callback_user_transcript self.callback_latency_measurement = callback_latency_measurement self.callback_end_session = callback_end_session @@ -668,6 +701,7 @@ def __init__(self, conversation, ws): self.ws = ws self.callback_agent_response = conversation.callback_agent_response self.callback_agent_response_correction = conversation.callback_agent_response_correction + self.callback_agent_chat_response_part = conversation.callback_agent_chat_response_part self.callback_user_transcript = conversation.callback_user_transcript self.callback_latency_measurement = conversation.callback_latency_measurement @@ -680,6 +714,9 @@ def handle_agent_response(self, response): def handle_agent_response_correction(self, original, corrected): self.conversation.callback_agent_response_correction(original, corrected) + def handle_agent_chat_response_part(self, text, part_type): + self.conversation.callback_agent_chat_response_part(text, part_type) + def handle_user_transcript(self, transcript): self.conversation.callback_user_transcript(transcript) @@ -714,6 +751,7 @@ class AsyncConversation(BaseConversation): audio_interface: AsyncAudioInterface callback_agent_response: Optional[Callable[[str], Awaitable[None]]] callback_agent_response_correction: Optional[Callable[[str, str], Awaitable[None]]] + callback_agent_chat_response_part: Optional[Callable[[str, AgentChatResponsePartType], Awaitable[None]]] callback_user_transcript: Optional[Callable[[str], Awaitable[None]]] callback_latency_measurement: Optional[Callable[[int], Awaitable[None]]] callback_end_session: Optional[Callable[[], Awaitable[None]]] @@ -734,6 +772,7 @@ def __init__( client_tools: Optional[ClientTools] = None, callback_agent_response: Optional[Callable[[str], Awaitable[None]]] = None, callback_agent_response_correction: Optional[Callable[[str, str], Awaitable[None]]] = None, + callback_agent_chat_response_part: Optional[Callable[[str, AgentChatResponsePartType], Awaitable[None]]] = None, callback_user_transcript: Optional[Callable[[str], Awaitable[None]]] = None, callback_latency_measurement: Optional[Callable[[int], Awaitable[None]]] = None, callback_end_session: Optional[Callable[[], Awaitable[None]]] = None, @@ -753,6 +792,8 @@ def __init__( callback_agent_response_correction: Async callback for agent response corrections. First argument is the original response (previously given to callback_agent_response), second argument is the corrected response. + callback_agent_chat_response_part: Async callback for streaming text response chunks. + First argument is the text chunk, second argument is the type (START, DELTA, STOP). callback_user_transcript: Async callback for user transcripts. callback_latency_measurement: Async callback for latency measurements (in milliseconds). callback_end_session: Async callback for when session ends. @@ -770,6 +811,7 @@ def __init__( self.audio_interface = audio_interface self.callback_agent_response = callback_agent_response self.callback_agent_response_correction = callback_agent_response_correction + self.callback_agent_chat_response_part = callback_agent_chat_response_part self.callback_user_transcript = callback_user_transcript self.callback_latency_measurement = callback_latency_measurement self.callback_end_session = callback_end_session @@ -916,6 +958,7 @@ def __init__(self, conversation, ws): self.ws = ws self.callback_agent_response = conversation.callback_agent_response self.callback_agent_response_correction = conversation.callback_agent_response_correction + self.callback_agent_chat_response_part = conversation.callback_agent_chat_response_part self.callback_user_transcript = conversation.callback_user_transcript self.callback_latency_measurement = conversation.callback_latency_measurement @@ -928,6 +971,9 @@ async def handle_agent_response(self, response): async def handle_agent_response_correction(self, original, corrected): await self.conversation.callback_agent_response_correction(original, corrected) + async def handle_agent_chat_response_part(self, text, part_type): + await self.conversation.callback_agent_chat_response_part(text, part_type) + async def handle_user_transcript(self, transcript): await self.conversation.callback_user_transcript(transcript) diff --git a/tests/test_convai.py b/tests/test_convai.py index d8f12121..c1b686c9 100644 --- a/tests/test_convai.py +++ b/tests/test_convai.py @@ -1,5 +1,10 @@ from unittest.mock import MagicMock, patch -from elevenlabs.conversational_ai.conversation import Conversation, AudioInterface, ConversationInitiationData +from elevenlabs.conversational_ai.conversation import ( + Conversation, + AudioInterface, + ConversationInitiationData, + AgentChatResponsePartType, +) import json import time @@ -326,3 +331,71 @@ def test_websocket_url_construction_edge_cases(): # Ensure no double slashes in the path tts_url_path = full_tts_url.split("://", 1)[1] assert "//" not in tts_url_path, f"TTS URL should not contain double slashes in path: {full_tts_url}" + + +def test_conversation_streaming_text_response(): + mock_ws = create_mock_websocket( + [ + { + "type": "conversation_initiation_metadata", + "conversation_initiation_metadata_event": {"conversation_id": TEST_CONVERSATION_ID}, + }, + { + "type": "agent_chat_response_part", + "text_response_part": {"text": "", "type": "start"}, + }, + { + "type": "agent_chat_response_part", + "text_response_part": {"text": "Hello", "type": "delta"}, + }, + { + "type": "agent_chat_response_part", + "text_response_part": {"text": " there", "type": "delta"}, + }, + { + "type": "agent_chat_response_part", + "text_response_part": {"text": "!", "type": "delta"}, + }, + { + "type": "agent_chat_response_part", + "text_response_part": {"text": "", "type": "stop"}, + }, + ] + ) + mock_client = MagicMock() + mock_client._client_wrapper.get_base_url.return_value = "https://api.elevenlabs.io/" + + streaming_calls = [] + + def streaming_callback(text, part_type): + streaming_calls.append((text, part_type)) + + conversation = Conversation( + client=mock_client, + agent_id=TEST_AGENT_ID, + requires_auth=False, + audio_interface=MockAudioInterface(), + callback_agent_chat_response_part=streaming_callback, + ) + + with patch("elevenlabs.conversational_ai.conversation.connect") as mock_connect: + mock_connect.return_value.__enter__.return_value = mock_ws + conversation.start_session() + + timeout = 5 + start_time = time.time() + while len(streaming_calls) < 5 and time.time() - start_time < timeout: + time.sleep(0.1) + + conversation.end_session() + conversation.wait_for_session_end() + + assert len(streaming_calls) == 5, f"Expected 5 streaming calls, got {len(streaming_calls)}" + + assert streaming_calls[0] == ("", AgentChatResponsePartType.START) + + assert streaming_calls[1] == ("Hello", AgentChatResponsePartType.DELTA) + assert streaming_calls[2] == (" there", AgentChatResponsePartType.DELTA) + assert streaming_calls[3] == ("!", AgentChatResponsePartType.DELTA) + + assert streaming_calls[4] == ("", AgentChatResponsePartType.STOP) From 0fd34e45d7ceb39da6ba95b122e2952b3f4ceff5 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 11:21:12 +0200 Subject: [PATCH 23/34] SDK regeneration (#645) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> --- poetry.lock | 278 +- reference.md | 145 +- src/elevenlabs/__init__.py | 2472 +++++++++++----- src/elevenlabs/audio_isolation/client.py | 16 +- src/elevenlabs/audio_isolation/raw_client.py | 10 + src/elevenlabs/audio_native/client.py | 10 + src/elevenlabs/audio_native/raw_client.py | 10 + .../conversational_ai/agents/client.py | 75 +- .../conversational_ai/agents/link/client.py | 4 +- .../conversational_ai/agents/raw_client.py | 61 +- .../agents/widget/avatar/client.py | 4 +- .../conversational_ai/agents/widget/client.py | 4 +- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/dubbing/client.py | 32 +- src/elevenlabs/dubbing/raw_client.py | 48 +- src/elevenlabs/music/client.py | 42 +- .../music/composition_plan/client.py | 4 +- .../music/composition_plan/raw_client.py | 4 +- src/elevenlabs/music/raw_client.py | 42 +- ..._compose_detailed_request_output_format.py | 2 + .../music_compose_request_output_format.py | 2 + .../music_stream_request_output_format.py | 2 + .../pronunciation_dictionaries/client.py | 8 +- .../pronunciation_dictionaries/raw_client.py | 12 +- ...to_speech_convert_request_output_format.py | 2 + ..._to_speech_stream_request_output_format.py | 2 + src/elevenlabs/speech_to_text/client.py | 20 +- src/elevenlabs/speech_to_text/raw_client.py | 20 +- src/elevenlabs/studio/projects/client.py | 20 +- .../studio/projects/content/client.py | 20 +- .../studio/projects/content/raw_client.py | 20 +- src/elevenlabs/studio/projects/raw_client.py | 20 +- ..._dialogue_convert_request_output_format.py | 2 + ...o_dialogue_stream_request_output_format.py | 2 + ...d_effects_convert_request_output_format.py | 2 + src/elevenlabs/text_to_speech/client.py | 40 - src/elevenlabs/text_to_speech/raw_client.py | 40 - ...to_speech_convert_request_output_format.py | 2 + ...t_with_timestamps_request_output_format.py | 2 + ..._to_speech_stream_request_output_format.py | 2 + ...m_with_timestamps_request_output_format.py | 2 + ...e_create_previews_request_output_format.py | 2 + ...t_to_voice_design_request_output_format.py | 2 + ...xt_to_voice_remix_request_output_format.py | 2 + src/elevenlabs/types/__init__.py | 2600 +++++++++++------ ..._config_override_for_test_request_model.py | 16 +- ...nfig_api_model_workflow_override_input.py} | 8 +- ...nfig_api_model_workflow_override_output.py | 53 + ...ride.py => agent_config_override_input.py} | 2 +- .../types/agent_config_override_output.py | 34 + .../agent_platform_settings_request_model.py | 30 +- .../agent_platform_settings_response_model.py | 30 +- .../types/agent_workflow_request_model.py | 20 +- ...gent_workflow_request_model_nodes_value.py | 24 +- .../types/agent_workflow_response_model.py | 39 + ...ent_workflow_response_model_nodes_value.py | 138 + src/elevenlabs/types/alignment.py | 6 +- src/elevenlabs/types/ast_and_operator_node.py | 34 - .../ast_and_operator_node_children_item.py | 250 -- .../types/ast_and_operator_node_input.py | 37 + ..._and_operator_node_input_children_item.py} | 142 +- .../types/ast_and_operator_node_output.py | 37 + ..._and_operator_node_output_children_item.py | 250 ++ .../types/ast_boolean_node_input.py | 23 + .../types/ast_boolean_node_output.py | 23 + .../types/ast_dynamic_variable_node_input.py | 23 + .../types/ast_dynamic_variable_node_output.py | 23 + .../types/ast_equals_operator_node.py | 36 - .../types/ast_equals_operator_node_input.py | 43 + .../ast_equals_operator_node_input_left.py | 302 ++ .../ast_equals_operator_node_input_right.py | 302 ++ .../types/ast_equals_operator_node_left.py | 250 -- .../types/ast_equals_operator_node_output.py | 43 + .../ast_equals_operator_node_output_left.py | 302 ++ .../ast_equals_operator_node_output_right.py | 302 ++ .../types/ast_equals_operator_node_right.py | 250 -- .../types/ast_greater_than_operator_node.py | 36 - .../ast_greater_than_operator_node_input.py | 43 + ...t_greater_than_operator_node_input_left.py | 302 ++ ..._greater_than_operator_node_input_right.py | 302 ++ .../ast_greater_than_operator_node_left.py | 250 -- .../ast_greater_than_operator_node_output.py | 43 + ..._greater_than_operator_node_output_left.py | 302 ++ ...greater_than_operator_node_output_right.py | 302 ++ .../ast_greater_than_operator_node_right.py | 250 -- ...st_greater_than_or_equals_operator_node.py | 36 - ...ater_than_or_equals_operator_node_input.py | 43 + ...than_or_equals_operator_node_input_left.py | 302 ++ ...han_or_equals_operator_node_input_right.py | 302 ++ ...eater_than_or_equals_operator_node_left.py | 250 -- ...ter_than_or_equals_operator_node_output.py | 43 + ...han_or_equals_operator_node_output_left.py | 302 ++ ...an_or_equals_operator_node_output_right.py | 302 ++ ...ater_than_or_equals_operator_node_right.py | 250 -- .../types/ast_less_than_operator_node.py | 36 - .../ast_less_than_operator_node_input.py | 43 + .../ast_less_than_operator_node_input_left.py | 302 ++ ...ast_less_than_operator_node_input_right.py | 302 ++ .../types/ast_less_than_operator_node_left.py | 250 -- .../ast_less_than_operator_node_output.py | 43 + ...ast_less_than_operator_node_output_left.py | 302 ++ ...st_less_than_operator_node_output_right.py | 302 ++ .../ast_less_than_operator_node_right.py | 250 -- .../ast_less_than_or_equals_operator_node.py | 36 - ...less_than_or_equals_operator_node_input.py | 43 + ...than_or_equals_operator_node_input_left.py | 302 ++ ...han_or_equals_operator_node_input_right.py | 302 ++ ...ess_than_or_equals_operator_node_output.py | 43 + ...han_or_equals_operator_node_output_left.py | 302 ++ ...an_or_equals_operator_node_output_right.py | 302 ++ ...less_than_or_equals_operator_node_right.py | 250 -- .../types/ast_not_equals_operator_node.py | 36 - .../ast_not_equals_operator_node_input.py | 43 + ...ast_not_equals_operator_node_input_left.py | 302 ++ ...st_not_equals_operator_node_input_right.py | 302 ++ .../ast_not_equals_operator_node_left.py | 250 -- .../ast_not_equals_operator_node_output.py | 43 + ...st_not_equals_operator_node_output_left.py | 302 ++ ...t_not_equals_operator_node_output_right.py | 302 ++ .../ast_not_equals_operator_node_right.py | 250 -- src/elevenlabs/types/ast_number_node_input.py | 23 + .../types/ast_number_node_output.py | 23 + src/elevenlabs/types/ast_or_operator_node.py | 34 - .../ast_or_operator_node_children_item.py | 250 -- .../types/ast_or_operator_node_input.py | 37 + ...st_or_operator_node_input_children_item.py | 250 ++ .../types/ast_or_operator_node_output.py | 37 + ...t_or_operator_node_output_children_item.py | 250 ++ src/elevenlabs/types/ast_string_node_input.py | 23 + .../types/ast_string_node_output.py | 23 + src/elevenlabs/types/astllm_node_input.py | 23 + src/elevenlabs/types/astllm_node_output.py | 23 + .../types/async_conversation_metadata.py | 31 + ...c_conversation_metadata_delivery_status.py | 5 + .../{astllm_node.py => backup_llm_default.py} | 4 +- ..._string_node.py => backup_llm_disabled.py} | 4 +- src/elevenlabs/types/backup_llm_override.py | 21 + ...built_in_tools_workflow_override_input.py} | 2 +- ...built_in_tools_workflow_override_output.py | 54 + src/elevenlabs/types/conv_ai_webhooks.py | 8 +- ...nversation_config_client_override_input.py | 4 +- ...versation_config_client_override_output.py | 4 +- ...versation_history_metadata_common_model.py | 6 + ...etadata_common_model_initiation_trigger.py | 46 + .../types/conversation_initiation_source.py | 1 + ...nfig_api_model_workflow_override_input.py} | 12 +- ...nfig_api_model_workflow_override_output.py | 70 + .../types/create_agent_response_model.py | 10 + ...default_conversation_initiation_trigger.py | 22 + ...ed_subscription_response_model_currency.py | 2 +- .../types/get_agent_response_model.py | 20 +- src/elevenlabs/types/normalized_alignment.py | 6 +- .../types/{position.py => position_input.py} | 2 +- ...ic_variable_node.py => position_output.py} | 5 +- .../types/project_extended_response.py | 6 + ...ct_extended_response_model_aspect_ratio.py | 5 + src/elevenlabs/types/project_response.py | 6 + .../project_response_model_aspect_ratio.py | 5 + .../types/prompt_agent_api_model_input.py | 11 + ...agent_api_model_input_backup_llm_config.py | 73 + .../types/prompt_agent_api_model_output.py | 11 + ...gent_api_model_output_backup_llm_config.py | 73 + .../types/prompt_agent_api_model_override.py | 6 + .../prompt_agent_api_model_override_config.py | 5 + ...gent_api_model_workflow_override_input.py} | 29 +- ...rkflow_override_input_backup_llm_config.py | 11 + ...del_workflow_override_input_tools_item.py} | 22 +- ...gent_api_model_workflow_override_output.py | 127 + ...kflow_override_output_backup_llm_config.py | 11 + ...del_workflow_override_output_tools_item.py | 118 + src/elevenlabs/types/section_source.py | 34 + src/elevenlabs/types/song_section.py | 6 + .../subscription_response_model_currency.py | 2 +- src/elevenlabs/types/time_range.py | 21 + ...ational_config_workflow_override_input.py} | 2 +- ...ational_config_workflow_override_output.py | 70 + .../types/unit_test_common_model.py | 74 + ...st_common_model_dynamic_variables_value.py | 5 + .../types/unit_test_run_response_model.py | 2 + src/elevenlabs/types/webhook_event_type.py | 5 + .../types/whats_app_business_account.py | 22 + ...whats_app_business_account_changes_item.py | 44 + src/elevenlabs/types/whats_app_call.py | 30 + .../types/whats_app_call_direction.py | 5 + src/elevenlabs/types/whats_app_calls.py | 23 + .../types/whats_app_change_calls.py | 21 + ...n_node.py => whats_app_change_messages.py} | 4 +- .../types/whats_app_event_request.py | 22 + ...t_number_node.py => whats_app_metadata.py} | 4 +- src/elevenlabs/types/whats_app_session.py | 21 + src/elevenlabs/types/workflow_edge_model.py | 46 - .../types/workflow_edge_model_input.py | 54 + ...low_edge_model_input_backward_condition.py | 92 + ...low_edge_model_input_forward_condition.py} | 40 +- .../types/workflow_edge_model_output.py | 54 + ...w_edge_model_output_backward_condition.py} | 40 +- ...low_edge_model_output_forward_condition.py | 92 + ...el.py => workflow_end_node_model_input.py} | 6 +- ...l.py => workflow_end_node_model_output.py} | 13 +- .../workflow_expression_condition_model.py | 36 - ...w_expression_condition_model_expression.py | 264 -- ...rkflow_expression_condition_model_input.py | 43 + ...ession_condition_model_input_expression.py | 316 ++ ...kflow_expression_condition_model_output.py | 43 + ...ssion_condition_model_output_expression.py | 316 ++ .../workflow_features_usage_common_model.py | 3 + .../types/workflow_llm_condition_model.py | 21 - .../workflow_llm_condition_model_input.py | 28 + .../workflow_llm_condition_model_output.py | 28 + .../workflow_override_agent_node_model.py | 45 - ...orkflow_override_agent_node_model_input.py | 66 + ...rkflow_override_agent_node_model_output.py | 64 + ...workflow_phone_number_node_model_input.py} | 12 +- ..._node_model_input_transfer_destination.py} | 9 +- ...workflow_phone_number_node_model_output.py | 36 + ..._node_model_output_transfer_destination.py | 47 + .../types/workflow_result_condition_model.py | 21 - .../workflow_result_condition_model_input.py | 28 + .../workflow_result_condition_model_output.py | 28 + ...kflow_standalone_agent_node_model_input.py | 49 + ...flow_standalone_agent_node_model_output.py | 49 + ....py => workflow_start_node_model_input.py} | 6 +- .../types/workflow_start_node_model_output.py | 29 + ...l.py => workflow_tool_node_model_input.py} | 11 +- .../types/workflow_tool_node_model_output.py | 35 + .../types/workflow_unconditional_model.py | 20 - .../workflow_unconditional_model_input.py | 23 + .../workflow_unconditional_model_output.py | 23 + .../types/workspace_resource_type.py | 1 + ...zendesk_conversation_initiation_trigger.py | 24 + 230 files changed, 16245 insertions(+), 6274 deletions(-) rename src/elevenlabs/types/{agent_config_api_model_workflow_override.py => agent_config_api_model_workflow_override_input.py} (83%) create mode 100644 src/elevenlabs/types/agent_config_api_model_workflow_override_output.py rename src/elevenlabs/types/{agent_config_override.py => agent_config_override_input.py} (95%) create mode 100644 src/elevenlabs/types/agent_config_override_output.py create mode 100644 src/elevenlabs/types/agent_workflow_response_model.py create mode 100644 src/elevenlabs/types/agent_workflow_response_model_nodes_value.py delete mode 100644 src/elevenlabs/types/ast_and_operator_node.py delete mode 100644 src/elevenlabs/types/ast_and_operator_node_children_item.py create mode 100644 src/elevenlabs/types/ast_and_operator_node_input.py rename src/elevenlabs/types/{ast_less_than_or_equals_operator_node_left.py => ast_and_operator_node_input_children_item.py} (50%) create mode 100644 src/elevenlabs/types/ast_and_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_and_operator_node_output_children_item.py create mode 100644 src/elevenlabs/types/ast_boolean_node_input.py create mode 100644 src/elevenlabs/types/ast_boolean_node_output.py create mode 100644 src/elevenlabs/types/ast_dynamic_variable_node_input.py create mode 100644 src/elevenlabs/types/ast_dynamic_variable_node_output.py delete mode 100644 src/elevenlabs/types/ast_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_input_right.py delete mode 100644 src/elevenlabs/types/ast_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_equals_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_equals_operator_node_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_operator_node.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_input_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_operator_node_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py delete mode 100644 src/elevenlabs/types/ast_less_than_operator_node.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_input_right.py delete mode 100644 src/elevenlabs/types/ast_less_than_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_less_than_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_less_than_operator_node_right.py delete mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py delete mode 100644 src/elevenlabs/types/ast_not_equals_operator_node.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_input_left.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_input_right.py delete mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_left.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_output_left.py create mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_output_right.py delete mode 100644 src/elevenlabs/types/ast_not_equals_operator_node_right.py create mode 100644 src/elevenlabs/types/ast_number_node_input.py create mode 100644 src/elevenlabs/types/ast_number_node_output.py delete mode 100644 src/elevenlabs/types/ast_or_operator_node.py delete mode 100644 src/elevenlabs/types/ast_or_operator_node_children_item.py create mode 100644 src/elevenlabs/types/ast_or_operator_node_input.py create mode 100644 src/elevenlabs/types/ast_or_operator_node_input_children_item.py create mode 100644 src/elevenlabs/types/ast_or_operator_node_output.py create mode 100644 src/elevenlabs/types/ast_or_operator_node_output_children_item.py create mode 100644 src/elevenlabs/types/ast_string_node_input.py create mode 100644 src/elevenlabs/types/ast_string_node_output.py create mode 100644 src/elevenlabs/types/astllm_node_input.py create mode 100644 src/elevenlabs/types/astllm_node_output.py create mode 100644 src/elevenlabs/types/async_conversation_metadata.py create mode 100644 src/elevenlabs/types/async_conversation_metadata_delivery_status.py rename src/elevenlabs/types/{astllm_node.py => backup_llm_default.py} (90%) rename src/elevenlabs/types/{ast_string_node.py => backup_llm_disabled.py} (89%) create mode 100644 src/elevenlabs/types/backup_llm_override.py rename src/elevenlabs/types/{built_in_tools_workflow_override.py => built_in_tools_workflow_override_input.py} (96%) create mode 100644 src/elevenlabs/types/built_in_tools_workflow_override_output.py create mode 100644 src/elevenlabs/types/conversation_history_metadata_common_model_initiation_trigger.py rename src/elevenlabs/types/{conversational_config_api_model_workflow_override.py => conversational_config_api_model_workflow_override_input.py} (83%) create mode 100644 src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py create mode 100644 src/elevenlabs/types/default_conversation_initiation_trigger.py rename src/elevenlabs/types/{position.py => position_input.py} (93%) rename src/elevenlabs/types/{ast_dynamic_variable_node.py => position_output.py} (88%) create mode 100644 src/elevenlabs/types/project_extended_response_model_aspect_ratio.py create mode 100644 src/elevenlabs/types/project_response_model_aspect_ratio.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_input_backup_llm_config.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_output_backup_llm_config.py rename src/elevenlabs/types/{prompt_agent_api_model_workflow_override.py => prompt_agent_api_model_workflow_override_input.py} (77%) create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_backup_llm_config.py rename src/elevenlabs/types/{prompt_agent_api_model_workflow_override_tools_item.py => prompt_agent_api_model_workflow_override_input_tools_item.py} (80%) create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_backup_llm_config.py create mode 100644 src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py create mode 100644 src/elevenlabs/types/section_source.py create mode 100644 src/elevenlabs/types/time_range.py rename src/elevenlabs/types/{tts_conversational_config_workflow_override.py => tts_conversational_config_workflow_override_input.py} (96%) create mode 100644 src/elevenlabs/types/tts_conversational_config_workflow_override_output.py create mode 100644 src/elevenlabs/types/unit_test_common_model.py create mode 100644 src/elevenlabs/types/unit_test_common_model_dynamic_variables_value.py create mode 100644 src/elevenlabs/types/webhook_event_type.py create mode 100644 src/elevenlabs/types/whats_app_business_account.py create mode 100644 src/elevenlabs/types/whats_app_business_account_changes_item.py create mode 100644 src/elevenlabs/types/whats_app_call.py create mode 100644 src/elevenlabs/types/whats_app_call_direction.py create mode 100644 src/elevenlabs/types/whats_app_calls.py create mode 100644 src/elevenlabs/types/whats_app_change_calls.py rename src/elevenlabs/types/{ast_boolean_node.py => whats_app_change_messages.py} (89%) create mode 100644 src/elevenlabs/types/whats_app_event_request.py rename src/elevenlabs/types/{ast_number_node.py => whats_app_metadata.py} (87%) create mode 100644 src/elevenlabs/types/whats_app_session.py delete mode 100644 src/elevenlabs/types/workflow_edge_model.py create mode 100644 src/elevenlabs/types/workflow_edge_model_input.py create mode 100644 src/elevenlabs/types/workflow_edge_model_input_backward_condition.py rename src/elevenlabs/types/{workflow_edge_model_backward_condition.py => workflow_edge_model_input_forward_condition.py} (54%) create mode 100644 src/elevenlabs/types/workflow_edge_model_output.py rename src/elevenlabs/types/{workflow_edge_model_forward_condition.py => workflow_edge_model_output_backward_condition.py} (54%) create mode 100644 src/elevenlabs/types/workflow_edge_model_output_forward_condition.py rename src/elevenlabs/types/{workflow_end_node_model.py => workflow_end_node_model_input.py} (81%) rename src/elevenlabs/types/{workflow_standalone_agent_node_model.py => workflow_end_node_model_output.py} (60%) delete mode 100644 src/elevenlabs/types/workflow_expression_condition_model.py delete mode 100644 src/elevenlabs/types/workflow_expression_condition_model_expression.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model_input.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model_input_expression.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model_output.py create mode 100644 src/elevenlabs/types/workflow_expression_condition_model_output_expression.py delete mode 100644 src/elevenlabs/types/workflow_llm_condition_model.py create mode 100644 src/elevenlabs/types/workflow_llm_condition_model_input.py create mode 100644 src/elevenlabs/types/workflow_llm_condition_model_output.py delete mode 100644 src/elevenlabs/types/workflow_override_agent_node_model.py create mode 100644 src/elevenlabs/types/workflow_override_agent_node_model_input.py create mode 100644 src/elevenlabs/types/workflow_override_agent_node_model_output.py rename src/elevenlabs/types/{workflow_phone_number_node_model.py => workflow_phone_number_node_model_input.py} (68%) rename src/elevenlabs/types/{workflow_phone_number_node_model_transfer_destination.py => workflow_phone_number_node_model_input_transfer_destination.py} (73%) create mode 100644 src/elevenlabs/types/workflow_phone_number_node_model_output.py create mode 100644 src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py delete mode 100644 src/elevenlabs/types/workflow_result_condition_model.py create mode 100644 src/elevenlabs/types/workflow_result_condition_model_input.py create mode 100644 src/elevenlabs/types/workflow_result_condition_model_output.py create mode 100644 src/elevenlabs/types/workflow_standalone_agent_node_model_input.py create mode 100644 src/elevenlabs/types/workflow_standalone_agent_node_model_output.py rename src/elevenlabs/types/{workflow_start_node_model.py => workflow_start_node_model_input.py} (80%) create mode 100644 src/elevenlabs/types/workflow_start_node_model_output.py rename src/elevenlabs/types/{workflow_tool_node_model.py => workflow_tool_node_model_input.py} (66%) create mode 100644 src/elevenlabs/types/workflow_tool_node_model_output.py delete mode 100644 src/elevenlabs/types/workflow_unconditional_model.py create mode 100644 src/elevenlabs/types/workflow_unconditional_model_input.py create mode 100644 src/elevenlabs/types/workflow_unconditional_model_output.py create mode 100644 src/elevenlabs/types/zendesk_conversation_initiation_trigger.py diff --git a/poetry.lock b/poetry.lock index a6c11ab0..24470df9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -49,90 +49,124 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.3" +version = "3.4.4" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fb7f67a1bfa6e40b438170ebdc8158b78dc465a5a67b6dde178a46987b244a72"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc9370a2da1ac13f0153780040f465839e6cccb4a1e44810124b4e22483c93fe"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:07a0eae9e2787b586e129fdcbe1af6997f8d0e5abaa0bc98c0e20e124d67e601"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:74d77e25adda8581ffc1c720f1c81ca082921329452eba58b16233ab1842141c"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0e909868420b7049dafd3a31d45125b31143eec59235311fc4c57ea26a4acd2"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c6f162aabe9a91a309510d74eeb6507fab5fff92337a15acbe77753d88d9dcf0"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca4c094de7771a98d7fbd67d9e5dbf1eb73efa4f744a730437d8a3a5cf994f0"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:02425242e96bcf29a49711b0ca9f37e451da7c70562bc10e8ed992a5a7a25cc0"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:78deba4d8f9590fe4dae384aeff04082510a709957e968753ff3c48399f6f92a"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-win32.whl", hash = "sha256:d79c198e27580c8e958906f803e63cddb77653731be08851c7df0b1a14a8fc0f"}, - {file = "charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:c6e490913a46fa054e03699c70019ab869e990270597018cef1d8562132c2669"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-win32.whl", hash = "sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849"}, - {file = "charset_normalizer-3.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-win32.whl", hash = "sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37"}, - {file = "charset_normalizer-3.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-win32.whl", hash = "sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce"}, - {file = "charset_normalizer-3.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-win32.whl", hash = "sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce"}, - {file = "charset_normalizer-3.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0f2be7e0cf7754b9a30eb01f4295cc3d4358a479843b31f328afd210e2c7598c"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c60e092517a73c632ec38e290eba714e9627abe9d301c8c8a12ec32c314a2a4b"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:252098c8c7a873e17dd696ed98bbe91dbacd571da4b87df3736768efa7a792e4"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3653fad4fe3ed447a596ae8638b437f827234f01a8cd801842e43f3d0a6b281b"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8999f965f922ae054125286faf9f11bc6932184b93011d138925a1773830bbe9"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d95bfb53c211b57198bb91c46dd5a2d8018b3af446583aab40074bf7988401cb"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:5b413b0b1bfd94dbf4023ad6945889f374cd24e3f62de58d6bb102c4d9ae534a"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:b5e3b2d152e74e100a9e9573837aba24aab611d39428ded46f4e4022ea7d1942"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a2d08ac246bb48479170408d6c19f6385fa743e7157d716e144cad849b2dd94b"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-win32.whl", hash = "sha256:ec557499516fc90fd374bf2e32349a2887a876fbf162c160e3c01b6849eaf557"}, - {file = "charset_normalizer-3.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:5d8d01eac18c423815ed4f4a2ec3b439d654e55ee4ad610e153cf02faf67ea40"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:70bfc5f2c318afece2f5838ea5e4c3febada0be750fcf4775641052bbba14d05"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:23b6b24d74478dc833444cbd927c338349d6ae852ba53a0d02a2de1fce45b96e"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:34a7f768e3f985abdb42841e20e17b330ad3aaf4bb7e7aeeb73db2e70f077b99"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fb731e5deb0c7ef82d698b0f4c5bb724633ee2a489401594c5c88b02e6cb15f7"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:257f26fed7d7ff59921b78244f3cd93ed2af1800ff048c33f624c87475819dd7"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1ef99f0456d3d46a50945c98de1774da86f8e992ab5c77865ea8b8195341fc19"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:2c322db9c8c89009a990ef07c3bcc9f011a3269bc06782f916cd3d9eed7c9312"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:511729f456829ef86ac41ca78c63a5cb55240ed23b4b737faca0eb1abb1c41bc"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:88ab34806dea0671532d3f82d82b85e8fc23d7b2dd12fa837978dad9bb392a34"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-win32.whl", hash = "sha256:16a8770207946ac75703458e2c743631c79c59c5890c80011d536248f8eaa432"}, - {file = "charset_normalizer-3.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:d22dbedd33326a4a5190dd4fe9e9e693ef12160c77382d9e87919bce54f3d4ca"}, - {file = "charset_normalizer-3.4.3-py3-none-any.whl", hash = "sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a"}, - {file = "charset_normalizer-3.4.3.tar.gz", hash = "sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_riscv64.whl", hash = "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-win32.whl", hash = "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win32.whl", hash = "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50"}, + {file = "charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f"}, + {file = "charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a"}, ] [[package]] @@ -221,13 +255,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.10" +version = "3.11" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, + {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, ] [package.extras] @@ -617,43 +651,53 @@ files = [ [[package]] name = "tomli" -version = "2.2.1" +version = "2.3.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" files = [ - {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, - {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, - {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, - {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, - {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, - {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, - {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, - {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, - {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, - {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"}, + {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"}, + {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"}, + {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"}, + {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"}, + {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"}, + {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"}, + {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"}, + {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"}, + {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"}, + {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"}, + {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"}, + {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"}, ] [[package]] diff --git a/reference.md b/reference.md index 0e6409ee..1a0e0e8f 100644 --- a/reference.md +++ b/reference.md @@ -881,14 +881,6 @@ Defaults to None.
-**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1100,14 +1092,6 @@ Defaults to None.
-**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1318,14 +1302,6 @@ Defaults to None.
-**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -1538,14 +1514,6 @@ Defaults to None.
-**hcaptcha_token:** `typing.Optional[str]` — HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4073,7 +4041,7 @@ client.dubbing.create() **file:** `from __future__ import annotations -typing.Optional[core.File]` — See core.File for more documentation +core.File` — See core.File for more documentation
@@ -4083,7 +4051,7 @@ typing.Optional[core.File]` — See core.File for more documentation **csv_file:** `from __future__ import annotations -typing.Optional[core.File]` — See core.File for more documentation +core.File` — See core.File for more documentation
@@ -4093,7 +4061,7 @@ typing.Optional[core.File]` — See core.File for more documentation **foreground_audio_file:** `from __future__ import annotations -typing.Optional[core.File]` — See core.File for more documentation +core.File` — See core.File for more documentation
@@ -4103,7 +4071,7 @@ typing.Optional[core.File]` — See core.File for more documentation **background_audio_file:** `from __future__ import annotations -typing.Optional[core.File]` — See core.File for more documentation +core.File` — See core.File for more documentation
@@ -4610,6 +4578,14 @@ typing.Optional[core.File]` — See core.File for more documentation with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + + +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[str]]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. +
@@ -4980,7 +4956,7 @@ client.pronunciation_dictionaries.create_from_file( **file:** `from __future__ import annotations -typing.Optional[core.File]` — See core.File for more documentation +core.File` — See core.File for more documentation @@ -5651,7 +5627,9 @@ client.speech_to_text.convert(
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. +**file:** `from __future__ import annotations + +core.File` — See core.File for more documentation
@@ -5659,9 +5637,7 @@ client.speech_to_text.convert(
-**file:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers.
@@ -6277,7 +6253,7 @@ client.music.compose()
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -6317,6 +6293,14 @@ client.music.compose()
+**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -6409,7 +6393,7 @@ client.music.compose_detailed()
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -6441,6 +6425,14 @@ client.music.compose_detailed()
+**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -6533,7 +6525,7 @@ client.music.stream()
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -6565,6 +6557,14 @@ client.music.stream()
+**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -7173,7 +7173,7 @@ client.conversational_ai.agents.create(
-**workflow:** `typing.Optional[typing.Optional[typing.Any]]` +**workflow:** `typing.Optional[AgentWorkflowRequestModel]` — Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools.
@@ -7242,7 +7242,8 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + version_id="version_id", ) ``` @@ -7267,6 +7268,14 @@ client.conversational_ai.agents.get(
+**version_id:** `typing.Optional[str]` — The ID of the agent version to use + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7312,7 +7321,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.delete( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) ``` @@ -7382,7 +7391,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.update( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) ``` @@ -7423,7 +7432,7 @@ client.conversational_ai.agents.update(
-**workflow:** `typing.Optional[typing.Optional[typing.Any]]` +**workflow:** `typing.Optional[AgentWorkflowRequestModel]` — Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools.
@@ -7598,7 +7607,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.duplicate( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) ``` @@ -7680,7 +7689,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.simulate_conversation( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -7785,7 +7794,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.simulate_conversation_stream( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -7886,7 +7895,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.run_tests( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", tests=[ SingleTestRunRequestModel( test_id="test_id", @@ -10924,7 +10933,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.widget.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", conversation_signature="conversation_signature", ) @@ -11004,7 +11013,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.link.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) ``` @@ -11241,7 +11250,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.widget.avatar.create( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) ``` @@ -14155,7 +14164,7 @@ client.music.composition_plan.create(
-**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. +**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -14982,7 +14991,9 @@ client.studio.projects.create(
-**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles. +**from_document:** `from __future__ import annotations + +core.File` — See core.File for more documentation
@@ -14990,7 +15001,7 @@ client.studio.projects.create(
-**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs. +**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles.
@@ -14998,7 +15009,7 @@ client.studio.projects.create(
-**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. +**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs.
@@ -15006,7 +15017,7 @@ client.studio.projects.create(
-**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. +**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.
@@ -15014,9 +15025,7 @@ client.studio.projects.create(
-**from_document:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
@@ -15779,7 +15788,9 @@ client.studio.projects.content.update(
-**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. +**from_document:** `from __future__ import annotations + +core.File` — See core.File for more documentation
@@ -15787,9 +15798,7 @@ client.studio.projects.content.update(
-**from_document:** `from __future__ import annotations - -typing.Optional[core.File]` — See core.File for more documentation +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 5ddd5c3e..ff062217 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -24,9 +24,11 @@ Age, AgentCallLimits, AgentConfig, - AgentConfigApiModelWorkflowOverride, - AgentConfigOverride, + AgentConfigApiModelWorkflowOverrideInput, + AgentConfigApiModelWorkflowOverrideOutput, AgentConfigOverrideConfig, + AgentConfigOverrideInput, + AgentConfigOverrideOutput, AgentFailureResponseExample, AgentMetadata, AgentMetadataResponseModel, @@ -46,6 +48,14 @@ AgentWorkflowRequestModelNodesValue_StandaloneAgent, AgentWorkflowRequestModelNodesValue_Start, AgentWorkflowRequestModelNodesValue_Tool, + AgentWorkflowResponseModel, + AgentWorkflowResponseModelNodesValue, + AgentWorkflowResponseModelNodesValue_End, + AgentWorkflowResponseModelNodesValue_OverrideAgent, + AgentWorkflowResponseModelNodesValue_PhoneNumber, + AgentWorkflowResponseModelNodesValue_StandaloneAgent, + AgentWorkflowResponseModelNodesValue_Start, + AgentWorkflowResponseModelNodesValue_Tool, AgentWorkspaceOverridesInput, AgentWorkspaceOverridesOutput, Alignment, @@ -59,215 +69,426 @@ AsrInputFormat, AsrProvider, AsrQuality, - AstAndOperatorNode, - AstAndOperatorNodeChildrenItem, - AstAndOperatorNodeChildrenItem_AndOperator, - AstAndOperatorNodeChildrenItem_BooleanLiteral, - AstAndOperatorNodeChildrenItem_DynamicVariable, - AstAndOperatorNodeChildrenItem_EqOperator, - AstAndOperatorNodeChildrenItem_GtOperator, - AstAndOperatorNodeChildrenItem_GteOperator, - AstAndOperatorNodeChildrenItem_Llm, - AstAndOperatorNodeChildrenItem_LtOperator, - AstAndOperatorNodeChildrenItem_LteOperator, - AstAndOperatorNodeChildrenItem_NeqOperator, - AstAndOperatorNodeChildrenItem_NumberLiteral, - AstAndOperatorNodeChildrenItem_OrOperator, - AstAndOperatorNodeChildrenItem_StringLiteral, - AstBooleanNode, - AstDynamicVariableNode, - AstEqualsOperatorNode, - AstEqualsOperatorNodeLeft, - AstEqualsOperatorNodeLeft_AndOperator, - AstEqualsOperatorNodeLeft_BooleanLiteral, - AstEqualsOperatorNodeLeft_DynamicVariable, - AstEqualsOperatorNodeLeft_EqOperator, - AstEqualsOperatorNodeLeft_GtOperator, - AstEqualsOperatorNodeLeft_GteOperator, - AstEqualsOperatorNodeLeft_Llm, - AstEqualsOperatorNodeLeft_LtOperator, - AstEqualsOperatorNodeLeft_LteOperator, - AstEqualsOperatorNodeLeft_NeqOperator, - AstEqualsOperatorNodeLeft_NumberLiteral, - AstEqualsOperatorNodeLeft_OrOperator, - AstEqualsOperatorNodeLeft_StringLiteral, - AstEqualsOperatorNodeRight, - AstEqualsOperatorNodeRight_AndOperator, - AstEqualsOperatorNodeRight_BooleanLiteral, - AstEqualsOperatorNodeRight_DynamicVariable, - AstEqualsOperatorNodeRight_EqOperator, - AstEqualsOperatorNodeRight_GtOperator, - AstEqualsOperatorNodeRight_GteOperator, - AstEqualsOperatorNodeRight_Llm, - AstEqualsOperatorNodeRight_LtOperator, - AstEqualsOperatorNodeRight_LteOperator, - AstEqualsOperatorNodeRight_NeqOperator, - AstEqualsOperatorNodeRight_NumberLiteral, - AstEqualsOperatorNodeRight_OrOperator, - AstEqualsOperatorNodeRight_StringLiteral, - AstGreaterThanOperatorNode, - AstGreaterThanOperatorNodeLeft, - AstGreaterThanOperatorNodeLeft_AndOperator, - AstGreaterThanOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOperatorNodeLeft_DynamicVariable, - AstGreaterThanOperatorNodeLeft_EqOperator, - AstGreaterThanOperatorNodeLeft_GtOperator, - AstGreaterThanOperatorNodeLeft_GteOperator, - AstGreaterThanOperatorNodeLeft_Llm, - AstGreaterThanOperatorNodeLeft_LtOperator, - AstGreaterThanOperatorNodeLeft_LteOperator, - AstGreaterThanOperatorNodeLeft_NeqOperator, - AstGreaterThanOperatorNodeLeft_NumberLiteral, - AstGreaterThanOperatorNodeLeft_OrOperator, - AstGreaterThanOperatorNodeLeft_StringLiteral, - AstGreaterThanOperatorNodeRight, - AstGreaterThanOperatorNodeRight_AndOperator, - AstGreaterThanOperatorNodeRight_BooleanLiteral, - AstGreaterThanOperatorNodeRight_DynamicVariable, - AstGreaterThanOperatorNodeRight_EqOperator, - AstGreaterThanOperatorNodeRight_GtOperator, - AstGreaterThanOperatorNodeRight_GteOperator, - AstGreaterThanOperatorNodeRight_Llm, - AstGreaterThanOperatorNodeRight_LtOperator, - AstGreaterThanOperatorNodeRight_LteOperator, - AstGreaterThanOperatorNodeRight_NeqOperator, - AstGreaterThanOperatorNodeRight_NumberLiteral, - AstGreaterThanOperatorNodeRight_OrOperator, - AstGreaterThanOperatorNodeRight_StringLiteral, - AstGreaterThanOrEqualsOperatorNode, - AstGreaterThanOrEqualsOperatorNodeLeft, - AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_Llm, - AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, - AstGreaterThanOrEqualsOperatorNodeRight, - AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, - AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_Llm, - AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, - AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, - AstLessThanOperatorNode, - AstLessThanOperatorNodeLeft, - AstLessThanOperatorNodeLeft_AndOperator, - AstLessThanOperatorNodeLeft_BooleanLiteral, - AstLessThanOperatorNodeLeft_DynamicVariable, - AstLessThanOperatorNodeLeft_EqOperator, - AstLessThanOperatorNodeLeft_GtOperator, - AstLessThanOperatorNodeLeft_GteOperator, - AstLessThanOperatorNodeLeft_Llm, - AstLessThanOperatorNodeLeft_LtOperator, - AstLessThanOperatorNodeLeft_LteOperator, - AstLessThanOperatorNodeLeft_NeqOperator, - AstLessThanOperatorNodeLeft_NumberLiteral, - AstLessThanOperatorNodeLeft_OrOperator, - AstLessThanOperatorNodeLeft_StringLiteral, - AstLessThanOperatorNodeRight, - AstLessThanOperatorNodeRight_AndOperator, - AstLessThanOperatorNodeRight_BooleanLiteral, - AstLessThanOperatorNodeRight_DynamicVariable, - AstLessThanOperatorNodeRight_EqOperator, - AstLessThanOperatorNodeRight_GtOperator, - AstLessThanOperatorNodeRight_GteOperator, - AstLessThanOperatorNodeRight_Llm, - AstLessThanOperatorNodeRight_LtOperator, - AstLessThanOperatorNodeRight_LteOperator, - AstLessThanOperatorNodeRight_NeqOperator, - AstLessThanOperatorNodeRight_NumberLiteral, - AstLessThanOperatorNodeRight_OrOperator, - AstLessThanOperatorNodeRight_StringLiteral, - AstLessThanOrEqualsOperatorNode, - AstLessThanOrEqualsOperatorNodeLeft, - AstLessThanOrEqualsOperatorNodeLeft_AndOperator, - AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstLessThanOrEqualsOperatorNodeLeft_EqOperator, - AstLessThanOrEqualsOperatorNodeLeft_GtOperator, - AstLessThanOrEqualsOperatorNodeLeft_GteOperator, - AstLessThanOrEqualsOperatorNodeLeft_Llm, - AstLessThanOrEqualsOperatorNodeLeft_LtOperator, - AstLessThanOrEqualsOperatorNodeLeft_LteOperator, - AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, - AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstLessThanOrEqualsOperatorNodeLeft_OrOperator, - AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, - AstLessThanOrEqualsOperatorNodeRight, - AstLessThanOrEqualsOperatorNodeRight_AndOperator, - AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, - AstLessThanOrEqualsOperatorNodeRight_EqOperator, - AstLessThanOrEqualsOperatorNodeRight_GtOperator, - AstLessThanOrEqualsOperatorNodeRight_GteOperator, - AstLessThanOrEqualsOperatorNodeRight_Llm, - AstLessThanOrEqualsOperatorNodeRight_LtOperator, - AstLessThanOrEqualsOperatorNodeRight_LteOperator, - AstLessThanOrEqualsOperatorNodeRight_NeqOperator, - AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, - AstLessThanOrEqualsOperatorNodeRight_OrOperator, - AstLessThanOrEqualsOperatorNodeRight_StringLiteral, - AstNotEqualsOperatorNode, - AstNotEqualsOperatorNodeLeft, - AstNotEqualsOperatorNodeLeft_AndOperator, - AstNotEqualsOperatorNodeLeft_BooleanLiteral, - AstNotEqualsOperatorNodeLeft_DynamicVariable, - AstNotEqualsOperatorNodeLeft_EqOperator, - AstNotEqualsOperatorNodeLeft_GtOperator, - AstNotEqualsOperatorNodeLeft_GteOperator, - AstNotEqualsOperatorNodeLeft_Llm, - AstNotEqualsOperatorNodeLeft_LtOperator, - AstNotEqualsOperatorNodeLeft_LteOperator, - AstNotEqualsOperatorNodeLeft_NeqOperator, - AstNotEqualsOperatorNodeLeft_NumberLiteral, - AstNotEqualsOperatorNodeLeft_OrOperator, - AstNotEqualsOperatorNodeLeft_StringLiteral, - AstNotEqualsOperatorNodeRight, - AstNotEqualsOperatorNodeRight_AndOperator, - AstNotEqualsOperatorNodeRight_BooleanLiteral, - AstNotEqualsOperatorNodeRight_DynamicVariable, - AstNotEqualsOperatorNodeRight_EqOperator, - AstNotEqualsOperatorNodeRight_GtOperator, - AstNotEqualsOperatorNodeRight_GteOperator, - AstNotEqualsOperatorNodeRight_Llm, - AstNotEqualsOperatorNodeRight_LtOperator, - AstNotEqualsOperatorNodeRight_LteOperator, - AstNotEqualsOperatorNodeRight_NeqOperator, - AstNotEqualsOperatorNodeRight_NumberLiteral, - AstNotEqualsOperatorNodeRight_OrOperator, - AstNotEqualsOperatorNodeRight_StringLiteral, - AstNumberNode, - AstOrOperatorNode, - AstOrOperatorNodeChildrenItem, - AstOrOperatorNodeChildrenItem_AndOperator, - AstOrOperatorNodeChildrenItem_BooleanLiteral, - AstOrOperatorNodeChildrenItem_DynamicVariable, - AstOrOperatorNodeChildrenItem_EqOperator, - AstOrOperatorNodeChildrenItem_GtOperator, - AstOrOperatorNodeChildrenItem_GteOperator, - AstOrOperatorNodeChildrenItem_Llm, - AstOrOperatorNodeChildrenItem_LtOperator, - AstOrOperatorNodeChildrenItem_LteOperator, - AstOrOperatorNodeChildrenItem_NeqOperator, - AstOrOperatorNodeChildrenItem_NumberLiteral, - AstOrOperatorNodeChildrenItem_OrOperator, - AstOrOperatorNodeChildrenItem_StringLiteral, - AstStringNode, - AstllmNode, + AstAndOperatorNodeInput, + AstAndOperatorNodeInputChildrenItem, + AstAndOperatorNodeInputChildrenItem_AndOperator, + AstAndOperatorNodeInputChildrenItem_BooleanLiteral, + AstAndOperatorNodeInputChildrenItem_DynamicVariable, + AstAndOperatorNodeInputChildrenItem_EqOperator, + AstAndOperatorNodeInputChildrenItem_GtOperator, + AstAndOperatorNodeInputChildrenItem_GteOperator, + AstAndOperatorNodeInputChildrenItem_Llm, + AstAndOperatorNodeInputChildrenItem_LtOperator, + AstAndOperatorNodeInputChildrenItem_LteOperator, + AstAndOperatorNodeInputChildrenItem_NeqOperator, + AstAndOperatorNodeInputChildrenItem_NumberLiteral, + AstAndOperatorNodeInputChildrenItem_OrOperator, + AstAndOperatorNodeInputChildrenItem_StringLiteral, + AstAndOperatorNodeOutput, + AstAndOperatorNodeOutputChildrenItem, + AstAndOperatorNodeOutputChildrenItem_AndOperator, + AstAndOperatorNodeOutputChildrenItem_BooleanLiteral, + AstAndOperatorNodeOutputChildrenItem_DynamicVariable, + AstAndOperatorNodeOutputChildrenItem_EqOperator, + AstAndOperatorNodeOutputChildrenItem_GtOperator, + AstAndOperatorNodeOutputChildrenItem_GteOperator, + AstAndOperatorNodeOutputChildrenItem_Llm, + AstAndOperatorNodeOutputChildrenItem_LtOperator, + AstAndOperatorNodeOutputChildrenItem_LteOperator, + AstAndOperatorNodeOutputChildrenItem_NeqOperator, + AstAndOperatorNodeOutputChildrenItem_NumberLiteral, + AstAndOperatorNodeOutputChildrenItem_OrOperator, + AstAndOperatorNodeOutputChildrenItem_StringLiteral, + AstBooleanNodeInput, + AstBooleanNodeOutput, + AstDynamicVariableNodeInput, + AstDynamicVariableNodeOutput, + AstEqualsOperatorNodeInput, + AstEqualsOperatorNodeInputLeft, + AstEqualsOperatorNodeInputLeft_AndOperator, + AstEqualsOperatorNodeInputLeft_BooleanLiteral, + AstEqualsOperatorNodeInputLeft_DynamicVariable, + AstEqualsOperatorNodeInputLeft_EqOperator, + AstEqualsOperatorNodeInputLeft_GtOperator, + AstEqualsOperatorNodeInputLeft_GteOperator, + AstEqualsOperatorNodeInputLeft_Llm, + AstEqualsOperatorNodeInputLeft_LtOperator, + AstEqualsOperatorNodeInputLeft_LteOperator, + AstEqualsOperatorNodeInputLeft_NeqOperator, + AstEqualsOperatorNodeInputLeft_NumberLiteral, + AstEqualsOperatorNodeInputLeft_OrOperator, + AstEqualsOperatorNodeInputLeft_StringLiteral, + AstEqualsOperatorNodeInputRight, + AstEqualsOperatorNodeInputRight_AndOperator, + AstEqualsOperatorNodeInputRight_BooleanLiteral, + AstEqualsOperatorNodeInputRight_DynamicVariable, + AstEqualsOperatorNodeInputRight_EqOperator, + AstEqualsOperatorNodeInputRight_GtOperator, + AstEqualsOperatorNodeInputRight_GteOperator, + AstEqualsOperatorNodeInputRight_Llm, + AstEqualsOperatorNodeInputRight_LtOperator, + AstEqualsOperatorNodeInputRight_LteOperator, + AstEqualsOperatorNodeInputRight_NeqOperator, + AstEqualsOperatorNodeInputRight_NumberLiteral, + AstEqualsOperatorNodeInputRight_OrOperator, + AstEqualsOperatorNodeInputRight_StringLiteral, + AstEqualsOperatorNodeOutput, + AstEqualsOperatorNodeOutputLeft, + AstEqualsOperatorNodeOutputLeft_AndOperator, + AstEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstEqualsOperatorNodeOutputLeft_DynamicVariable, + AstEqualsOperatorNodeOutputLeft_EqOperator, + AstEqualsOperatorNodeOutputLeft_GtOperator, + AstEqualsOperatorNodeOutputLeft_GteOperator, + AstEqualsOperatorNodeOutputLeft_Llm, + AstEqualsOperatorNodeOutputLeft_LtOperator, + AstEqualsOperatorNodeOutputLeft_LteOperator, + AstEqualsOperatorNodeOutputLeft_NeqOperator, + AstEqualsOperatorNodeOutputLeft_NumberLiteral, + AstEqualsOperatorNodeOutputLeft_OrOperator, + AstEqualsOperatorNodeOutputLeft_StringLiteral, + AstEqualsOperatorNodeOutputRight, + AstEqualsOperatorNodeOutputRight_AndOperator, + AstEqualsOperatorNodeOutputRight_BooleanLiteral, + AstEqualsOperatorNodeOutputRight_DynamicVariable, + AstEqualsOperatorNodeOutputRight_EqOperator, + AstEqualsOperatorNodeOutputRight_GtOperator, + AstEqualsOperatorNodeOutputRight_GteOperator, + AstEqualsOperatorNodeOutputRight_Llm, + AstEqualsOperatorNodeOutputRight_LtOperator, + AstEqualsOperatorNodeOutputRight_LteOperator, + AstEqualsOperatorNodeOutputRight_NeqOperator, + AstEqualsOperatorNodeOutputRight_NumberLiteral, + AstEqualsOperatorNodeOutputRight_OrOperator, + AstEqualsOperatorNodeOutputRight_StringLiteral, + AstGreaterThanOperatorNodeInput, + AstGreaterThanOperatorNodeInputLeft, + AstGreaterThanOperatorNodeInputLeft_AndOperator, + AstGreaterThanOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOperatorNodeInputLeft_EqOperator, + AstGreaterThanOperatorNodeInputLeft_GtOperator, + AstGreaterThanOperatorNodeInputLeft_GteOperator, + AstGreaterThanOperatorNodeInputLeft_Llm, + AstGreaterThanOperatorNodeInputLeft_LtOperator, + AstGreaterThanOperatorNodeInputLeft_LteOperator, + AstGreaterThanOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOperatorNodeInputLeft_OrOperator, + AstGreaterThanOperatorNodeInputLeft_StringLiteral, + AstGreaterThanOperatorNodeInputRight, + AstGreaterThanOperatorNodeInputRight_AndOperator, + AstGreaterThanOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOperatorNodeInputRight_EqOperator, + AstGreaterThanOperatorNodeInputRight_GtOperator, + AstGreaterThanOperatorNodeInputRight_GteOperator, + AstGreaterThanOperatorNodeInputRight_Llm, + AstGreaterThanOperatorNodeInputRight_LtOperator, + AstGreaterThanOperatorNodeInputRight_LteOperator, + AstGreaterThanOperatorNodeInputRight_NeqOperator, + AstGreaterThanOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOperatorNodeInputRight_OrOperator, + AstGreaterThanOperatorNodeInputRight_StringLiteral, + AstGreaterThanOperatorNodeOutput, + AstGreaterThanOperatorNodeOutputLeft, + AstGreaterThanOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOperatorNodeOutputLeft_Llm, + AstGreaterThanOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOperatorNodeOutputLeft_StringLiteral, + AstGreaterThanOperatorNodeOutputRight, + AstGreaterThanOperatorNodeOutputRight_AndOperator, + AstGreaterThanOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOperatorNodeOutputRight_EqOperator, + AstGreaterThanOperatorNodeOutputRight_GtOperator, + AstGreaterThanOperatorNodeOutputRight_GteOperator, + AstGreaterThanOperatorNodeOutputRight_Llm, + AstGreaterThanOperatorNodeOutputRight_LtOperator, + AstGreaterThanOperatorNodeOutputRight_LteOperator, + AstGreaterThanOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOperatorNodeOutputRight_OrOperator, + AstGreaterThanOperatorNodeOutputRight_StringLiteral, + AstGreaterThanOrEqualsOperatorNodeInput, + AstGreaterThanOrEqualsOperatorNodeInputLeft, + AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight, + AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral, + AstGreaterThanOrEqualsOperatorNodeOutput, + AstGreaterThanOrEqualsOperatorNodeOutputLeft, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight, + AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral, + AstLessThanOperatorNodeInput, + AstLessThanOperatorNodeInputLeft, + AstLessThanOperatorNodeInputLeft_AndOperator, + AstLessThanOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOperatorNodeInputLeft_DynamicVariable, + AstLessThanOperatorNodeInputLeft_EqOperator, + AstLessThanOperatorNodeInputLeft_GtOperator, + AstLessThanOperatorNodeInputLeft_GteOperator, + AstLessThanOperatorNodeInputLeft_Llm, + AstLessThanOperatorNodeInputLeft_LtOperator, + AstLessThanOperatorNodeInputLeft_LteOperator, + AstLessThanOperatorNodeInputLeft_NeqOperator, + AstLessThanOperatorNodeInputLeft_NumberLiteral, + AstLessThanOperatorNodeInputLeft_OrOperator, + AstLessThanOperatorNodeInputLeft_StringLiteral, + AstLessThanOperatorNodeInputRight, + AstLessThanOperatorNodeInputRight_AndOperator, + AstLessThanOperatorNodeInputRight_BooleanLiteral, + AstLessThanOperatorNodeInputRight_DynamicVariable, + AstLessThanOperatorNodeInputRight_EqOperator, + AstLessThanOperatorNodeInputRight_GtOperator, + AstLessThanOperatorNodeInputRight_GteOperator, + AstLessThanOperatorNodeInputRight_Llm, + AstLessThanOperatorNodeInputRight_LtOperator, + AstLessThanOperatorNodeInputRight_LteOperator, + AstLessThanOperatorNodeInputRight_NeqOperator, + AstLessThanOperatorNodeInputRight_NumberLiteral, + AstLessThanOperatorNodeInputRight_OrOperator, + AstLessThanOperatorNodeInputRight_StringLiteral, + AstLessThanOperatorNodeOutput, + AstLessThanOperatorNodeOutputLeft, + AstLessThanOperatorNodeOutputLeft_AndOperator, + AstLessThanOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOperatorNodeOutputLeft_EqOperator, + AstLessThanOperatorNodeOutputLeft_GtOperator, + AstLessThanOperatorNodeOutputLeft_GteOperator, + AstLessThanOperatorNodeOutputLeft_Llm, + AstLessThanOperatorNodeOutputLeft_LtOperator, + AstLessThanOperatorNodeOutputLeft_LteOperator, + AstLessThanOperatorNodeOutputLeft_NeqOperator, + AstLessThanOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOperatorNodeOutputLeft_OrOperator, + AstLessThanOperatorNodeOutputLeft_StringLiteral, + AstLessThanOperatorNodeOutputRight, + AstLessThanOperatorNodeOutputRight_AndOperator, + AstLessThanOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOperatorNodeOutputRight_DynamicVariable, + AstLessThanOperatorNodeOutputRight_EqOperator, + AstLessThanOperatorNodeOutputRight_GtOperator, + AstLessThanOperatorNodeOutputRight_GteOperator, + AstLessThanOperatorNodeOutputRight_Llm, + AstLessThanOperatorNodeOutputRight_LtOperator, + AstLessThanOperatorNodeOutputRight_LteOperator, + AstLessThanOperatorNodeOutputRight_NeqOperator, + AstLessThanOperatorNodeOutputRight_NumberLiteral, + AstLessThanOperatorNodeOutputRight_OrOperator, + AstLessThanOperatorNodeOutputRight_StringLiteral, + AstLessThanOrEqualsOperatorNodeInput, + AstLessThanOrEqualsOperatorNodeInputLeft, + AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_Llm, + AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral, + AstLessThanOrEqualsOperatorNodeInputRight, + AstLessThanOrEqualsOperatorNodeInputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_Llm, + AstLessThanOrEqualsOperatorNodeInputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral, + AstLessThanOrEqualsOperatorNodeOutput, + AstLessThanOrEqualsOperatorNodeOutputLeft, + AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_Llm, + AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight, + AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_Llm, + AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral, + AstNotEqualsOperatorNodeInput, + AstNotEqualsOperatorNodeInputLeft, + AstNotEqualsOperatorNodeInputLeft_AndOperator, + AstNotEqualsOperatorNodeInputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeInputLeft_DynamicVariable, + AstNotEqualsOperatorNodeInputLeft_EqOperator, + AstNotEqualsOperatorNodeInputLeft_GtOperator, + AstNotEqualsOperatorNodeInputLeft_GteOperator, + AstNotEqualsOperatorNodeInputLeft_Llm, + AstNotEqualsOperatorNodeInputLeft_LtOperator, + AstNotEqualsOperatorNodeInputLeft_LteOperator, + AstNotEqualsOperatorNodeInputLeft_NeqOperator, + AstNotEqualsOperatorNodeInputLeft_NumberLiteral, + AstNotEqualsOperatorNodeInputLeft_OrOperator, + AstNotEqualsOperatorNodeInputLeft_StringLiteral, + AstNotEqualsOperatorNodeInputRight, + AstNotEqualsOperatorNodeInputRight_AndOperator, + AstNotEqualsOperatorNodeInputRight_BooleanLiteral, + AstNotEqualsOperatorNodeInputRight_DynamicVariable, + AstNotEqualsOperatorNodeInputRight_EqOperator, + AstNotEqualsOperatorNodeInputRight_GtOperator, + AstNotEqualsOperatorNodeInputRight_GteOperator, + AstNotEqualsOperatorNodeInputRight_Llm, + AstNotEqualsOperatorNodeInputRight_LtOperator, + AstNotEqualsOperatorNodeInputRight_LteOperator, + AstNotEqualsOperatorNodeInputRight_NeqOperator, + AstNotEqualsOperatorNodeInputRight_NumberLiteral, + AstNotEqualsOperatorNodeInputRight_OrOperator, + AstNotEqualsOperatorNodeInputRight_StringLiteral, + AstNotEqualsOperatorNodeOutput, + AstNotEqualsOperatorNodeOutputLeft, + AstNotEqualsOperatorNodeOutputLeft_AndOperator, + AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeOutputLeft_DynamicVariable, + AstNotEqualsOperatorNodeOutputLeft_EqOperator, + AstNotEqualsOperatorNodeOutputLeft_GtOperator, + AstNotEqualsOperatorNodeOutputLeft_GteOperator, + AstNotEqualsOperatorNodeOutputLeft_Llm, + AstNotEqualsOperatorNodeOutputLeft_LtOperator, + AstNotEqualsOperatorNodeOutputLeft_LteOperator, + AstNotEqualsOperatorNodeOutputLeft_NeqOperator, + AstNotEqualsOperatorNodeOutputLeft_NumberLiteral, + AstNotEqualsOperatorNodeOutputLeft_OrOperator, + AstNotEqualsOperatorNodeOutputLeft_StringLiteral, + AstNotEqualsOperatorNodeOutputRight, + AstNotEqualsOperatorNodeOutputRight_AndOperator, + AstNotEqualsOperatorNodeOutputRight_BooleanLiteral, + AstNotEqualsOperatorNodeOutputRight_DynamicVariable, + AstNotEqualsOperatorNodeOutputRight_EqOperator, + AstNotEqualsOperatorNodeOutputRight_GtOperator, + AstNotEqualsOperatorNodeOutputRight_GteOperator, + AstNotEqualsOperatorNodeOutputRight_Llm, + AstNotEqualsOperatorNodeOutputRight_LtOperator, + AstNotEqualsOperatorNodeOutputRight_LteOperator, + AstNotEqualsOperatorNodeOutputRight_NeqOperator, + AstNotEqualsOperatorNodeOutputRight_NumberLiteral, + AstNotEqualsOperatorNodeOutputRight_OrOperator, + AstNotEqualsOperatorNodeOutputRight_StringLiteral, + AstNumberNodeInput, + AstNumberNodeOutput, + AstOrOperatorNodeInput, + AstOrOperatorNodeInputChildrenItem, + AstOrOperatorNodeInputChildrenItem_AndOperator, + AstOrOperatorNodeInputChildrenItem_BooleanLiteral, + AstOrOperatorNodeInputChildrenItem_DynamicVariable, + AstOrOperatorNodeInputChildrenItem_EqOperator, + AstOrOperatorNodeInputChildrenItem_GtOperator, + AstOrOperatorNodeInputChildrenItem_GteOperator, + AstOrOperatorNodeInputChildrenItem_Llm, + AstOrOperatorNodeInputChildrenItem_LtOperator, + AstOrOperatorNodeInputChildrenItem_LteOperator, + AstOrOperatorNodeInputChildrenItem_NeqOperator, + AstOrOperatorNodeInputChildrenItem_NumberLiteral, + AstOrOperatorNodeInputChildrenItem_OrOperator, + AstOrOperatorNodeInputChildrenItem_StringLiteral, + AstOrOperatorNodeOutput, + AstOrOperatorNodeOutputChildrenItem, + AstOrOperatorNodeOutputChildrenItem_AndOperator, + AstOrOperatorNodeOutputChildrenItem_BooleanLiteral, + AstOrOperatorNodeOutputChildrenItem_DynamicVariable, + AstOrOperatorNodeOutputChildrenItem_EqOperator, + AstOrOperatorNodeOutputChildrenItem_GtOperator, + AstOrOperatorNodeOutputChildrenItem_GteOperator, + AstOrOperatorNodeOutputChildrenItem_Llm, + AstOrOperatorNodeOutputChildrenItem_LtOperator, + AstOrOperatorNodeOutputChildrenItem_LteOperator, + AstOrOperatorNodeOutputChildrenItem_NeqOperator, + AstOrOperatorNodeOutputChildrenItem_NumberLiteral, + AstOrOperatorNodeOutputChildrenItem_OrOperator, + AstOrOperatorNodeOutputChildrenItem_StringLiteral, + AstStringNodeInput, + AstStringNodeOutput, + AstllmNodeInput, + AstllmNodeOutput, + AsyncConversationMetadata, + AsyncConversationMetadataDeliveryStatus, AttachedTestModel, AudioNativeCreateProjectResponseModel, AudioNativeEditContentResponseModel, @@ -279,6 +500,9 @@ AuthConnectionLocator, AuthSettings, AuthorizationMethod, + BackupLlmDefault, + BackupLlmDisabled, + BackupLlmOverride, BadRequestErrorBody, BanReasonType, BatchCallDetailedResponse, @@ -290,7 +514,8 @@ BreakdownTypes, BuiltInToolsInput, BuiltInToolsOutput, - BuiltInToolsWorkflowOverride, + BuiltInToolsWorkflowOverrideInput, + BuiltInToolsWorkflowOverrideOutput, CaptionStyleCharacterAnimationModel, CaptionStyleCharacterAnimationModelEnterType, CaptionStyleCharacterAnimationModelExitType, @@ -366,6 +591,9 @@ ConversationHistoryEvaluationCriteriaResultCommonModel, ConversationHistoryFeedbackCommonModel, ConversationHistoryMetadataCommonModel, + ConversationHistoryMetadataCommonModelInitiationTrigger, + ConversationHistoryMetadataCommonModelInitiationTrigger_Default, + ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk, ConversationHistoryMetadataCommonModelPhoneCall, ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, ConversationHistoryMetadataCommonModelPhoneCall_Twilio, @@ -432,7 +660,8 @@ ConversationTokenPurpose, ConversationTurnMetrics, ConversationalConfig, - ConversationalConfigApiModelWorkflowOverride, + ConversationalConfigApiModelWorkflowOverrideInput, + ConversationalConfigApiModelWorkflowOverrideOutput, ConvertChapterResponseModel, ConvertProjectResponseModel, CreateAgentResponseModel, @@ -450,6 +679,7 @@ DashboardCriteriaChartModel, DashboardDataCollectionChartModel, DataCollectionResultCommonModel, + DefaultConversationInitiationTrigger, DeleteChapterRequest, DeleteChapterResponseModel, DeleteDubbingResponseModel, @@ -705,7 +935,8 @@ PodcastProjectResponseModel, PodcastTextSource, PodcastUrlSource, - Position, + PositionInput, + PositionOutput, PostAgentAvatarResponseModel, PostWorkspaceSecretResponseModel, PrivacyConfig, @@ -715,12 +946,14 @@ ProjectExtendedResponse, ProjectExtendedResponseModelAccessLevel, ProjectExtendedResponseModelApplyTextNormalization, + ProjectExtendedResponseModelAspectRatio, ProjectExtendedResponseModelFiction, ProjectExtendedResponseModelQualityPreset, ProjectExtendedResponseModelSourceType, ProjectExtendedResponseModelTargetAudience, ProjectResponse, ProjectResponseModelAccessLevel, + ProjectResponseModelAspectRatio, ProjectResponseModelFiction, ProjectResponseModelSourceType, ProjectResponseModelTargetAudience, @@ -730,12 +963,20 @@ ProjectState, PromptAgent, PromptAgentApiModelInput, + PromptAgentApiModelInputBackupLlmConfig, + PromptAgentApiModelInputBackupLlmConfig_Default, + PromptAgentApiModelInputBackupLlmConfig_Disabled, + PromptAgentApiModelInputBackupLlmConfig_Override, PromptAgentApiModelInputToolsItem, PromptAgentApiModelInputToolsItem_Client, PromptAgentApiModelInputToolsItem_Mcp, PromptAgentApiModelInputToolsItem_System, PromptAgentApiModelInputToolsItem_Webhook, PromptAgentApiModelOutput, + PromptAgentApiModelOutputBackupLlmConfig, + PromptAgentApiModelOutputBackupLlmConfig_Default, + PromptAgentApiModelOutputBackupLlmConfig_Disabled, + PromptAgentApiModelOutputBackupLlmConfig_Override, PromptAgentApiModelOutputToolsItem, PromptAgentApiModelOutputToolsItem_Client, PromptAgentApiModelOutputToolsItem_Mcp, @@ -743,12 +984,20 @@ PromptAgentApiModelOutputToolsItem_Webhook, PromptAgentApiModelOverride, PromptAgentApiModelOverrideConfig, - PromptAgentApiModelWorkflowOverride, - PromptAgentApiModelWorkflowOverrideToolsItem, - PromptAgentApiModelWorkflowOverrideToolsItem_Client, - PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, - PromptAgentApiModelWorkflowOverrideToolsItem_System, - PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + PromptAgentApiModelWorkflowOverrideInput, + PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig, + PromptAgentApiModelWorkflowOverrideInputToolsItem, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideInputToolsItem_System, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook, + PromptAgentApiModelWorkflowOverrideOutput, + PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig, + PromptAgentApiModelWorkflowOverrideOutputToolsItem, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook, PromptAgentDbModel, PromptEvaluationCriteria, PronunciationDictionaryAliasRuleRequestModel, @@ -793,6 +1042,7 @@ SafetyRule, SaveVoicePreviewRequest, SecretDependencyType, + SectionSource, SegmentCreateResponse, SegmentDeleteResponse, SegmentDubResponse, @@ -882,6 +1132,7 @@ TextToSpeechStreamRequest, TextToSpeechStreamWithTimestampsRequest, TextToSpeechWithTimestampsRequest, + TimeRange, TokenResponseModel, Tool, ToolAnnotations, @@ -914,7 +1165,8 @@ TtsConversationalConfigOutput, TtsConversationalConfigOverride, TtsConversationalConfigOverrideConfig, - TtsConversationalConfigWorkflowOverride, + TtsConversationalConfigWorkflowOverrideInput, + TtsConversationalConfigWorkflowOverrideOutput, TtsConversationalModel, TtsModelFamily, TtsOptimizeStreamingLatency, @@ -924,6 +1176,8 @@ TurnMode, TwilioOutboundCallResponse, TxtExportOptions, + UnitTestCommonModel, + UnitTestCommonModelDynamicVariablesValue, UnitTestCommonModelType, UnitTestRunResponseModel, UnitTestSummaryResponseModel, @@ -973,6 +1227,7 @@ VoiceVerificationResponse, VoicemailDetectionToolConfig, WebhookAuthMethodType, + WebhookEventType, WebhookToolApiSchemaConfigInput, WebhookToolApiSchemaConfigInputMethod, WebhookToolApiSchemaConfigInputRequestHeadersValue, @@ -984,6 +1239,18 @@ WebhookUsageType, WebsocketTtsClientMessageMulti, WebsocketTtsServerMessageMulti, + WhatsAppBusinessAccount, + WhatsAppBusinessAccountChangesItem, + WhatsAppBusinessAccountChangesItem_Calls, + WhatsAppBusinessAccountChangesItem_Messages, + WhatsAppCall, + WhatsAppCallDirection, + WhatsAppCalls, + WhatsAppChangeCalls, + WhatsAppChangeMessages, + WhatsAppEventRequest, + WhatsAppMetadata, + WhatsAppSession, WidgetConfig, WidgetConfigInputAvatar, WidgetConfigInputAvatar_Image, @@ -1005,43 +1272,79 @@ WidgetPlacement, WidgetStyles, WidgetTextContents, - WorkflowEdgeModel, - WorkflowEdgeModelBackwardCondition, - WorkflowEdgeModelBackwardCondition_Expression, - WorkflowEdgeModelBackwardCondition_Llm, - WorkflowEdgeModelBackwardCondition_Result, - WorkflowEdgeModelBackwardCondition_Unconditional, - WorkflowEdgeModelForwardCondition, - WorkflowEdgeModelForwardCondition_Expression, - WorkflowEdgeModelForwardCondition_Llm, - WorkflowEdgeModelForwardCondition_Result, - WorkflowEdgeModelForwardCondition_Unconditional, - WorkflowEndNodeModel, - WorkflowExpressionConditionModel, - WorkflowExpressionConditionModelExpression, - WorkflowExpressionConditionModelExpression_AndOperator, - WorkflowExpressionConditionModelExpression_BooleanLiteral, - WorkflowExpressionConditionModelExpression_DynamicVariable, - WorkflowExpressionConditionModelExpression_EqOperator, - WorkflowExpressionConditionModelExpression_GtOperator, - WorkflowExpressionConditionModelExpression_GteOperator, - WorkflowExpressionConditionModelExpression_Llm, - WorkflowExpressionConditionModelExpression_LtOperator, - WorkflowExpressionConditionModelExpression_LteOperator, - WorkflowExpressionConditionModelExpression_NeqOperator, - WorkflowExpressionConditionModelExpression_NumberLiteral, - WorkflowExpressionConditionModelExpression_OrOperator, - WorkflowExpressionConditionModelExpression_StringLiteral, + WorkflowEdgeModelInput, + WorkflowEdgeModelInputBackwardCondition, + WorkflowEdgeModelInputBackwardCondition_Expression, + WorkflowEdgeModelInputBackwardCondition_Llm, + WorkflowEdgeModelInputBackwardCondition_Result, + WorkflowEdgeModelInputBackwardCondition_Unconditional, + WorkflowEdgeModelInputForwardCondition, + WorkflowEdgeModelInputForwardCondition_Expression, + WorkflowEdgeModelInputForwardCondition_Llm, + WorkflowEdgeModelInputForwardCondition_Result, + WorkflowEdgeModelInputForwardCondition_Unconditional, + WorkflowEdgeModelOutput, + WorkflowEdgeModelOutputBackwardCondition, + WorkflowEdgeModelOutputBackwardCondition_Expression, + WorkflowEdgeModelOutputBackwardCondition_Llm, + WorkflowEdgeModelOutputBackwardCondition_Result, + WorkflowEdgeModelOutputBackwardCondition_Unconditional, + WorkflowEdgeModelOutputForwardCondition, + WorkflowEdgeModelOutputForwardCondition_Expression, + WorkflowEdgeModelOutputForwardCondition_Llm, + WorkflowEdgeModelOutputForwardCondition_Result, + WorkflowEdgeModelOutputForwardCondition_Unconditional, + WorkflowEndNodeModelInput, + WorkflowEndNodeModelOutput, + WorkflowExpressionConditionModelInput, + WorkflowExpressionConditionModelInputExpression, + WorkflowExpressionConditionModelInputExpression_AndOperator, + WorkflowExpressionConditionModelInputExpression_BooleanLiteral, + WorkflowExpressionConditionModelInputExpression_DynamicVariable, + WorkflowExpressionConditionModelInputExpression_EqOperator, + WorkflowExpressionConditionModelInputExpression_GtOperator, + WorkflowExpressionConditionModelInputExpression_GteOperator, + WorkflowExpressionConditionModelInputExpression_Llm, + WorkflowExpressionConditionModelInputExpression_LtOperator, + WorkflowExpressionConditionModelInputExpression_LteOperator, + WorkflowExpressionConditionModelInputExpression_NeqOperator, + WorkflowExpressionConditionModelInputExpression_NumberLiteral, + WorkflowExpressionConditionModelInputExpression_OrOperator, + WorkflowExpressionConditionModelInputExpression_StringLiteral, + WorkflowExpressionConditionModelOutput, + WorkflowExpressionConditionModelOutputExpression, + WorkflowExpressionConditionModelOutputExpression_AndOperator, + WorkflowExpressionConditionModelOutputExpression_BooleanLiteral, + WorkflowExpressionConditionModelOutputExpression_DynamicVariable, + WorkflowExpressionConditionModelOutputExpression_EqOperator, + WorkflowExpressionConditionModelOutputExpression_GtOperator, + WorkflowExpressionConditionModelOutputExpression_GteOperator, + WorkflowExpressionConditionModelOutputExpression_Llm, + WorkflowExpressionConditionModelOutputExpression_LtOperator, + WorkflowExpressionConditionModelOutputExpression_LteOperator, + WorkflowExpressionConditionModelOutputExpression_NeqOperator, + WorkflowExpressionConditionModelOutputExpression_NumberLiteral, + WorkflowExpressionConditionModelOutputExpression_OrOperator, + WorkflowExpressionConditionModelOutputExpression_StringLiteral, WorkflowFeaturesUsageCommonModel, - WorkflowLlmConditionModel, - WorkflowOverrideAgentNodeModel, - WorkflowPhoneNumberNodeModel, - WorkflowPhoneNumberNodeModelTransferDestination, - WorkflowPhoneNumberNodeModelTransferDestination_Phone, - WorkflowPhoneNumberNodeModelTransferDestination_SipUri, - WorkflowResultConditionModel, - WorkflowStandaloneAgentNodeModel, - WorkflowStartNodeModel, + WorkflowLlmConditionModelInput, + WorkflowLlmConditionModelOutput, + WorkflowOverrideAgentNodeModelInput, + WorkflowOverrideAgentNodeModelOutput, + WorkflowPhoneNumberNodeModelInput, + WorkflowPhoneNumberNodeModelInputTransferDestination, + WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelOutput, + WorkflowPhoneNumberNodeModelOutputTransferDestination, + WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + WorkflowResultConditionModelInput, + WorkflowResultConditionModelOutput, + WorkflowStandaloneAgentNodeModelInput, + WorkflowStandaloneAgentNodeModelOutput, + WorkflowStartNodeModelInput, + WorkflowStartNodeModelOutput, WorkflowToolEdgeStepModel, WorkflowToolLocator, WorkflowToolMaxIterationsExceededStepModel, @@ -1049,7 +1352,8 @@ WorkflowToolNestedToolsStepModelInputResultsItem, WorkflowToolNestedToolsStepModelOutput, WorkflowToolNestedToolsStepModelOutputResultsItem, - WorkflowToolNodeModel, + WorkflowToolNodeModelInput, + WorkflowToolNodeModelOutput, WorkflowToolResponseModelInput, WorkflowToolResponseModelInputStepsItem, WorkflowToolResponseModelInputStepsItem_Edge, @@ -1060,7 +1364,8 @@ WorkflowToolResponseModelOutputStepsItem_Edge, WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, WorkflowToolResponseModelOutputStepsItem_NestedTools, - WorkflowUnconditionalModel, + WorkflowUnconditionalModelInput, + WorkflowUnconditionalModelOutput, WorkspaceApiKeyListResponseModel, WorkspaceApiKeyResponseModel, WorkspaceApiKeyResponseModelPermissionsItem, @@ -1073,6 +1378,7 @@ WorkspaceWebhookListResponseModel, WorkspaceWebhookResponseModel, WorkspaceWebhookUsageResponseModel, + ZendeskConversationInitiationTrigger, ) from .errors import ( BadRequestError, @@ -1203,9 +1509,11 @@ "Age": ".types", "AgentCallLimits": ".types", "AgentConfig": ".types", - "AgentConfigApiModelWorkflowOverride": ".types", - "AgentConfigOverride": ".types", + "AgentConfigApiModelWorkflowOverrideInput": ".types", + "AgentConfigApiModelWorkflowOverrideOutput": ".types", "AgentConfigOverrideConfig": ".types", + "AgentConfigOverrideInput": ".types", + "AgentConfigOverrideOutput": ".types", "AgentFailureResponseExample": ".types", "AgentMetadata": ".types", "AgentMetadataResponseModel": ".types", @@ -1225,6 +1533,14 @@ "AgentWorkflowRequestModelNodesValue_StandaloneAgent": ".types", "AgentWorkflowRequestModelNodesValue_Start": ".types", "AgentWorkflowRequestModelNodesValue_Tool": ".types", + "AgentWorkflowResponseModel": ".types", + "AgentWorkflowResponseModelNodesValue": ".types", + "AgentWorkflowResponseModelNodesValue_End": ".types", + "AgentWorkflowResponseModelNodesValue_OverrideAgent": ".types", + "AgentWorkflowResponseModelNodesValue_PhoneNumber": ".types", + "AgentWorkflowResponseModelNodesValue_StandaloneAgent": ".types", + "AgentWorkflowResponseModelNodesValue_Start": ".types", + "AgentWorkflowResponseModelNodesValue_Tool": ".types", "AgentWorkspaceOverridesInput": ".types", "AgentWorkspaceOverridesOutput": ".types", "Alignment": ".types", @@ -1238,215 +1554,426 @@ "AsrInputFormat": ".types", "AsrProvider": ".types", "AsrQuality": ".types", - "AstAndOperatorNode": ".types", - "AstAndOperatorNodeChildrenItem": ".types", - "AstAndOperatorNodeChildrenItem_AndOperator": ".types", - "AstAndOperatorNodeChildrenItem_BooleanLiteral": ".types", - "AstAndOperatorNodeChildrenItem_DynamicVariable": ".types", - "AstAndOperatorNodeChildrenItem_EqOperator": ".types", - "AstAndOperatorNodeChildrenItem_GtOperator": ".types", - "AstAndOperatorNodeChildrenItem_GteOperator": ".types", - "AstAndOperatorNodeChildrenItem_Llm": ".types", - "AstAndOperatorNodeChildrenItem_LtOperator": ".types", - "AstAndOperatorNodeChildrenItem_LteOperator": ".types", - "AstAndOperatorNodeChildrenItem_NeqOperator": ".types", - "AstAndOperatorNodeChildrenItem_NumberLiteral": ".types", - "AstAndOperatorNodeChildrenItem_OrOperator": ".types", - "AstAndOperatorNodeChildrenItem_StringLiteral": ".types", - "AstBooleanNode": ".types", - "AstDynamicVariableNode": ".types", - "AstEqualsOperatorNode": ".types", - "AstEqualsOperatorNodeLeft": ".types", - "AstEqualsOperatorNodeLeft_AndOperator": ".types", - "AstEqualsOperatorNodeLeft_BooleanLiteral": ".types", - "AstEqualsOperatorNodeLeft_DynamicVariable": ".types", - "AstEqualsOperatorNodeLeft_EqOperator": ".types", - "AstEqualsOperatorNodeLeft_GtOperator": ".types", - "AstEqualsOperatorNodeLeft_GteOperator": ".types", - "AstEqualsOperatorNodeLeft_Llm": ".types", - "AstEqualsOperatorNodeLeft_LtOperator": ".types", - "AstEqualsOperatorNodeLeft_LteOperator": ".types", - "AstEqualsOperatorNodeLeft_NeqOperator": ".types", - "AstEqualsOperatorNodeLeft_NumberLiteral": ".types", - "AstEqualsOperatorNodeLeft_OrOperator": ".types", - "AstEqualsOperatorNodeLeft_StringLiteral": ".types", - "AstEqualsOperatorNodeRight": ".types", - "AstEqualsOperatorNodeRight_AndOperator": ".types", - "AstEqualsOperatorNodeRight_BooleanLiteral": ".types", - "AstEqualsOperatorNodeRight_DynamicVariable": ".types", - "AstEqualsOperatorNodeRight_EqOperator": ".types", - "AstEqualsOperatorNodeRight_GtOperator": ".types", - "AstEqualsOperatorNodeRight_GteOperator": ".types", - "AstEqualsOperatorNodeRight_Llm": ".types", - "AstEqualsOperatorNodeRight_LtOperator": ".types", - "AstEqualsOperatorNodeRight_LteOperator": ".types", - "AstEqualsOperatorNodeRight_NeqOperator": ".types", - "AstEqualsOperatorNodeRight_NumberLiteral": ".types", - "AstEqualsOperatorNodeRight_OrOperator": ".types", - "AstEqualsOperatorNodeRight_StringLiteral": ".types", - "AstGreaterThanOperatorNode": ".types", - "AstGreaterThanOperatorNodeLeft": ".types", - "AstGreaterThanOperatorNodeLeft_AndOperator": ".types", - "AstGreaterThanOperatorNodeLeft_BooleanLiteral": ".types", - "AstGreaterThanOperatorNodeLeft_DynamicVariable": ".types", - "AstGreaterThanOperatorNodeLeft_EqOperator": ".types", - "AstGreaterThanOperatorNodeLeft_GtOperator": ".types", - "AstGreaterThanOperatorNodeLeft_GteOperator": ".types", - "AstGreaterThanOperatorNodeLeft_Llm": ".types", - "AstGreaterThanOperatorNodeLeft_LtOperator": ".types", - "AstGreaterThanOperatorNodeLeft_LteOperator": ".types", - "AstGreaterThanOperatorNodeLeft_NeqOperator": ".types", - "AstGreaterThanOperatorNodeLeft_NumberLiteral": ".types", - "AstGreaterThanOperatorNodeLeft_OrOperator": ".types", - "AstGreaterThanOperatorNodeLeft_StringLiteral": ".types", - "AstGreaterThanOperatorNodeRight": ".types", - "AstGreaterThanOperatorNodeRight_AndOperator": ".types", - "AstGreaterThanOperatorNodeRight_BooleanLiteral": ".types", - "AstGreaterThanOperatorNodeRight_DynamicVariable": ".types", - "AstGreaterThanOperatorNodeRight_EqOperator": ".types", - "AstGreaterThanOperatorNodeRight_GtOperator": ".types", - "AstGreaterThanOperatorNodeRight_GteOperator": ".types", - "AstGreaterThanOperatorNodeRight_Llm": ".types", - "AstGreaterThanOperatorNodeRight_LtOperator": ".types", - "AstGreaterThanOperatorNodeRight_LteOperator": ".types", - "AstGreaterThanOperatorNodeRight_NeqOperator": ".types", - "AstGreaterThanOperatorNodeRight_NumberLiteral": ".types", - "AstGreaterThanOperatorNodeRight_OrOperator": ".types", - "AstGreaterThanOperatorNodeRight_StringLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNode": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_Llm": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_Llm": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator": ".types", - "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral": ".types", - "AstLessThanOperatorNode": ".types", - "AstLessThanOperatorNodeLeft": ".types", - "AstLessThanOperatorNodeLeft_AndOperator": ".types", - "AstLessThanOperatorNodeLeft_BooleanLiteral": ".types", - "AstLessThanOperatorNodeLeft_DynamicVariable": ".types", - "AstLessThanOperatorNodeLeft_EqOperator": ".types", - "AstLessThanOperatorNodeLeft_GtOperator": ".types", - "AstLessThanOperatorNodeLeft_GteOperator": ".types", - "AstLessThanOperatorNodeLeft_Llm": ".types", - "AstLessThanOperatorNodeLeft_LtOperator": ".types", - "AstLessThanOperatorNodeLeft_LteOperator": ".types", - "AstLessThanOperatorNodeLeft_NeqOperator": ".types", - "AstLessThanOperatorNodeLeft_NumberLiteral": ".types", - "AstLessThanOperatorNodeLeft_OrOperator": ".types", - "AstLessThanOperatorNodeLeft_StringLiteral": ".types", - "AstLessThanOperatorNodeRight": ".types", - "AstLessThanOperatorNodeRight_AndOperator": ".types", - "AstLessThanOperatorNodeRight_BooleanLiteral": ".types", - "AstLessThanOperatorNodeRight_DynamicVariable": ".types", - "AstLessThanOperatorNodeRight_EqOperator": ".types", - "AstLessThanOperatorNodeRight_GtOperator": ".types", - "AstLessThanOperatorNodeRight_GteOperator": ".types", - "AstLessThanOperatorNodeRight_Llm": ".types", - "AstLessThanOperatorNodeRight_LtOperator": ".types", - "AstLessThanOperatorNodeRight_LteOperator": ".types", - "AstLessThanOperatorNodeRight_NeqOperator": ".types", - "AstLessThanOperatorNodeRight_NumberLiteral": ".types", - "AstLessThanOperatorNodeRight_OrOperator": ".types", - "AstLessThanOperatorNodeRight_StringLiteral": ".types", - "AstLessThanOrEqualsOperatorNode": ".types", - "AstLessThanOrEqualsOperatorNodeLeft": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_AndOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_EqOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_GtOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_GteOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_Llm": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_LtOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_LteOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_OrOperator": ".types", - "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral": ".types", - "AstLessThanOrEqualsOperatorNodeRight": ".types", - "AstLessThanOrEqualsOperatorNodeRight_AndOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral": ".types", - "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable": ".types", - "AstLessThanOrEqualsOperatorNodeRight_EqOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_GtOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_GteOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_Llm": ".types", - "AstLessThanOrEqualsOperatorNodeRight_LtOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_LteOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_NeqOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral": ".types", - "AstLessThanOrEqualsOperatorNodeRight_OrOperator": ".types", - "AstLessThanOrEqualsOperatorNodeRight_StringLiteral": ".types", - "AstNotEqualsOperatorNode": ".types", - "AstNotEqualsOperatorNodeLeft": ".types", - "AstNotEqualsOperatorNodeLeft_AndOperator": ".types", - "AstNotEqualsOperatorNodeLeft_BooleanLiteral": ".types", - "AstNotEqualsOperatorNodeLeft_DynamicVariable": ".types", - "AstNotEqualsOperatorNodeLeft_EqOperator": ".types", - "AstNotEqualsOperatorNodeLeft_GtOperator": ".types", - "AstNotEqualsOperatorNodeLeft_GteOperator": ".types", - "AstNotEqualsOperatorNodeLeft_Llm": ".types", - "AstNotEqualsOperatorNodeLeft_LtOperator": ".types", - "AstNotEqualsOperatorNodeLeft_LteOperator": ".types", - "AstNotEqualsOperatorNodeLeft_NeqOperator": ".types", - "AstNotEqualsOperatorNodeLeft_NumberLiteral": ".types", - "AstNotEqualsOperatorNodeLeft_OrOperator": ".types", - "AstNotEqualsOperatorNodeLeft_StringLiteral": ".types", - "AstNotEqualsOperatorNodeRight": ".types", - "AstNotEqualsOperatorNodeRight_AndOperator": ".types", - "AstNotEqualsOperatorNodeRight_BooleanLiteral": ".types", - "AstNotEqualsOperatorNodeRight_DynamicVariable": ".types", - "AstNotEqualsOperatorNodeRight_EqOperator": ".types", - "AstNotEqualsOperatorNodeRight_GtOperator": ".types", - "AstNotEqualsOperatorNodeRight_GteOperator": ".types", - "AstNotEqualsOperatorNodeRight_Llm": ".types", - "AstNotEqualsOperatorNodeRight_LtOperator": ".types", - "AstNotEqualsOperatorNodeRight_LteOperator": ".types", - "AstNotEqualsOperatorNodeRight_NeqOperator": ".types", - "AstNotEqualsOperatorNodeRight_NumberLiteral": ".types", - "AstNotEqualsOperatorNodeRight_OrOperator": ".types", - "AstNotEqualsOperatorNodeRight_StringLiteral": ".types", - "AstNumberNode": ".types", - "AstOrOperatorNode": ".types", - "AstOrOperatorNodeChildrenItem": ".types", - "AstOrOperatorNodeChildrenItem_AndOperator": ".types", - "AstOrOperatorNodeChildrenItem_BooleanLiteral": ".types", - "AstOrOperatorNodeChildrenItem_DynamicVariable": ".types", - "AstOrOperatorNodeChildrenItem_EqOperator": ".types", - "AstOrOperatorNodeChildrenItem_GtOperator": ".types", - "AstOrOperatorNodeChildrenItem_GteOperator": ".types", - "AstOrOperatorNodeChildrenItem_Llm": ".types", - "AstOrOperatorNodeChildrenItem_LtOperator": ".types", - "AstOrOperatorNodeChildrenItem_LteOperator": ".types", - "AstOrOperatorNodeChildrenItem_NeqOperator": ".types", - "AstOrOperatorNodeChildrenItem_NumberLiteral": ".types", - "AstOrOperatorNodeChildrenItem_OrOperator": ".types", - "AstOrOperatorNodeChildrenItem_StringLiteral": ".types", - "AstStringNode": ".types", - "AstllmNode": ".types", + "AstAndOperatorNodeInput": ".types", + "AstAndOperatorNodeInputChildrenItem": ".types", + "AstAndOperatorNodeInputChildrenItem_AndOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_BooleanLiteral": ".types", + "AstAndOperatorNodeInputChildrenItem_DynamicVariable": ".types", + "AstAndOperatorNodeInputChildrenItem_EqOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_GtOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_GteOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_Llm": ".types", + "AstAndOperatorNodeInputChildrenItem_LtOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_LteOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_NeqOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_NumberLiteral": ".types", + "AstAndOperatorNodeInputChildrenItem_OrOperator": ".types", + "AstAndOperatorNodeInputChildrenItem_StringLiteral": ".types", + "AstAndOperatorNodeOutput": ".types", + "AstAndOperatorNodeOutputChildrenItem": ".types", + "AstAndOperatorNodeOutputChildrenItem_AndOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_BooleanLiteral": ".types", + "AstAndOperatorNodeOutputChildrenItem_DynamicVariable": ".types", + "AstAndOperatorNodeOutputChildrenItem_EqOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_GtOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_GteOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_Llm": ".types", + "AstAndOperatorNodeOutputChildrenItem_LtOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_LteOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_NeqOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_NumberLiteral": ".types", + "AstAndOperatorNodeOutputChildrenItem_OrOperator": ".types", + "AstAndOperatorNodeOutputChildrenItem_StringLiteral": ".types", + "AstBooleanNodeInput": ".types", + "AstBooleanNodeOutput": ".types", + "AstDynamicVariableNodeInput": ".types", + "AstDynamicVariableNodeOutput": ".types", + "AstEqualsOperatorNodeInput": ".types", + "AstEqualsOperatorNodeInputLeft": ".types", + "AstEqualsOperatorNodeInputLeft_AndOperator": ".types", + "AstEqualsOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstEqualsOperatorNodeInputLeft_DynamicVariable": ".types", + "AstEqualsOperatorNodeInputLeft_EqOperator": ".types", + "AstEqualsOperatorNodeInputLeft_GtOperator": ".types", + "AstEqualsOperatorNodeInputLeft_GteOperator": ".types", + "AstEqualsOperatorNodeInputLeft_Llm": ".types", + "AstEqualsOperatorNodeInputLeft_LtOperator": ".types", + "AstEqualsOperatorNodeInputLeft_LteOperator": ".types", + "AstEqualsOperatorNodeInputLeft_NeqOperator": ".types", + "AstEqualsOperatorNodeInputLeft_NumberLiteral": ".types", + "AstEqualsOperatorNodeInputLeft_OrOperator": ".types", + "AstEqualsOperatorNodeInputLeft_StringLiteral": ".types", + "AstEqualsOperatorNodeInputRight": ".types", + "AstEqualsOperatorNodeInputRight_AndOperator": ".types", + "AstEqualsOperatorNodeInputRight_BooleanLiteral": ".types", + "AstEqualsOperatorNodeInputRight_DynamicVariable": ".types", + "AstEqualsOperatorNodeInputRight_EqOperator": ".types", + "AstEqualsOperatorNodeInputRight_GtOperator": ".types", + "AstEqualsOperatorNodeInputRight_GteOperator": ".types", + "AstEqualsOperatorNodeInputRight_Llm": ".types", + "AstEqualsOperatorNodeInputRight_LtOperator": ".types", + "AstEqualsOperatorNodeInputRight_LteOperator": ".types", + "AstEqualsOperatorNodeInputRight_NeqOperator": ".types", + "AstEqualsOperatorNodeInputRight_NumberLiteral": ".types", + "AstEqualsOperatorNodeInputRight_OrOperator": ".types", + "AstEqualsOperatorNodeInputRight_StringLiteral": ".types", + "AstEqualsOperatorNodeOutput": ".types", + "AstEqualsOperatorNodeOutputLeft": ".types", + "AstEqualsOperatorNodeOutputLeft_AndOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstEqualsOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstEqualsOperatorNodeOutputLeft_EqOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_GtOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_GteOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_Llm": ".types", + "AstEqualsOperatorNodeOutputLeft_LtOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_LteOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_NeqOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstEqualsOperatorNodeOutputLeft_OrOperator": ".types", + "AstEqualsOperatorNodeOutputLeft_StringLiteral": ".types", + "AstEqualsOperatorNodeOutputRight": ".types", + "AstEqualsOperatorNodeOutputRight_AndOperator": ".types", + "AstEqualsOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstEqualsOperatorNodeOutputRight_DynamicVariable": ".types", + "AstEqualsOperatorNodeOutputRight_EqOperator": ".types", + "AstEqualsOperatorNodeOutputRight_GtOperator": ".types", + "AstEqualsOperatorNodeOutputRight_GteOperator": ".types", + "AstEqualsOperatorNodeOutputRight_Llm": ".types", + "AstEqualsOperatorNodeOutputRight_LtOperator": ".types", + "AstEqualsOperatorNodeOutputRight_LteOperator": ".types", + "AstEqualsOperatorNodeOutputRight_NeqOperator": ".types", + "AstEqualsOperatorNodeOutputRight_NumberLiteral": ".types", + "AstEqualsOperatorNodeOutputRight_OrOperator": ".types", + "AstEqualsOperatorNodeOutputRight_StringLiteral": ".types", + "AstGreaterThanOperatorNodeInput": ".types", + "AstGreaterThanOperatorNodeInputLeft": ".types", + "AstGreaterThanOperatorNodeInputLeft_AndOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeInputLeft_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeInputLeft_EqOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_GtOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_GteOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_Llm": ".types", + "AstGreaterThanOperatorNodeInputLeft_LtOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_LteOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_NeqOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeInputLeft_OrOperator": ".types", + "AstGreaterThanOperatorNodeInputLeft_StringLiteral": ".types", + "AstGreaterThanOperatorNodeInputRight": ".types", + "AstGreaterThanOperatorNodeInputRight_AndOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeInputRight_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeInputRight_EqOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_GtOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_GteOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_Llm": ".types", + "AstGreaterThanOperatorNodeInputRight_LtOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_LteOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_NeqOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeInputRight_OrOperator": ".types", + "AstGreaterThanOperatorNodeInputRight_StringLiteral": ".types", + "AstGreaterThanOperatorNodeOutput": ".types", + "AstGreaterThanOperatorNodeOutputLeft": ".types", + "AstGreaterThanOperatorNodeOutputLeft_AndOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeOutputLeft_EqOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_GtOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_GteOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_Llm": ".types", + "AstGreaterThanOperatorNodeOutputLeft_LtOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_LteOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_NeqOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeOutputLeft_OrOperator": ".types", + "AstGreaterThanOperatorNodeOutputLeft_StringLiteral": ".types", + "AstGreaterThanOperatorNodeOutputRight": ".types", + "AstGreaterThanOperatorNodeOutputRight_AndOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstGreaterThanOperatorNodeOutputRight_DynamicVariable": ".types", + "AstGreaterThanOperatorNodeOutputRight_EqOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_GtOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_GteOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_Llm": ".types", + "AstGreaterThanOperatorNodeOutputRight_LtOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_LteOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_NeqOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_NumberLiteral": ".types", + "AstGreaterThanOperatorNodeOutputRight_OrOperator": ".types", + "AstGreaterThanOperatorNodeOutputRight_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInput": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutput": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator": ".types", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral": ".types", + "AstLessThanOperatorNodeInput": ".types", + "AstLessThanOperatorNodeInputLeft": ".types", + "AstLessThanOperatorNodeInputLeft_AndOperator": ".types", + "AstLessThanOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstLessThanOperatorNodeInputLeft_DynamicVariable": ".types", + "AstLessThanOperatorNodeInputLeft_EqOperator": ".types", + "AstLessThanOperatorNodeInputLeft_GtOperator": ".types", + "AstLessThanOperatorNodeInputLeft_GteOperator": ".types", + "AstLessThanOperatorNodeInputLeft_Llm": ".types", + "AstLessThanOperatorNodeInputLeft_LtOperator": ".types", + "AstLessThanOperatorNodeInputLeft_LteOperator": ".types", + "AstLessThanOperatorNodeInputLeft_NeqOperator": ".types", + "AstLessThanOperatorNodeInputLeft_NumberLiteral": ".types", + "AstLessThanOperatorNodeInputLeft_OrOperator": ".types", + "AstLessThanOperatorNodeInputLeft_StringLiteral": ".types", + "AstLessThanOperatorNodeInputRight": ".types", + "AstLessThanOperatorNodeInputRight_AndOperator": ".types", + "AstLessThanOperatorNodeInputRight_BooleanLiteral": ".types", + "AstLessThanOperatorNodeInputRight_DynamicVariable": ".types", + "AstLessThanOperatorNodeInputRight_EqOperator": ".types", + "AstLessThanOperatorNodeInputRight_GtOperator": ".types", + "AstLessThanOperatorNodeInputRight_GteOperator": ".types", + "AstLessThanOperatorNodeInputRight_Llm": ".types", + "AstLessThanOperatorNodeInputRight_LtOperator": ".types", + "AstLessThanOperatorNodeInputRight_LteOperator": ".types", + "AstLessThanOperatorNodeInputRight_NeqOperator": ".types", + "AstLessThanOperatorNodeInputRight_NumberLiteral": ".types", + "AstLessThanOperatorNodeInputRight_OrOperator": ".types", + "AstLessThanOperatorNodeInputRight_StringLiteral": ".types", + "AstLessThanOperatorNodeOutput": ".types", + "AstLessThanOperatorNodeOutputLeft": ".types", + "AstLessThanOperatorNodeOutputLeft_AndOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstLessThanOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstLessThanOperatorNodeOutputLeft_EqOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_GtOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_GteOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_Llm": ".types", + "AstLessThanOperatorNodeOutputLeft_LtOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_LteOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_NeqOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstLessThanOperatorNodeOutputLeft_OrOperator": ".types", + "AstLessThanOperatorNodeOutputLeft_StringLiteral": ".types", + "AstLessThanOperatorNodeOutputRight": ".types", + "AstLessThanOperatorNodeOutputRight_AndOperator": ".types", + "AstLessThanOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstLessThanOperatorNodeOutputRight_DynamicVariable": ".types", + "AstLessThanOperatorNodeOutputRight_EqOperator": ".types", + "AstLessThanOperatorNodeOutputRight_GtOperator": ".types", + "AstLessThanOperatorNodeOutputRight_GteOperator": ".types", + "AstLessThanOperatorNodeOutputRight_Llm": ".types", + "AstLessThanOperatorNodeOutputRight_LtOperator": ".types", + "AstLessThanOperatorNodeOutputRight_LteOperator": ".types", + "AstLessThanOperatorNodeOutputRight_NeqOperator": ".types", + "AstLessThanOperatorNodeOutputRight_NumberLiteral": ".types", + "AstLessThanOperatorNodeOutputRight_OrOperator": ".types", + "AstLessThanOperatorNodeOutputRight_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInput": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutput": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_Llm": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator": ".types", + "AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral": ".types", + "AstNotEqualsOperatorNodeInput": ".types", + "AstNotEqualsOperatorNodeInputLeft": ".types", + "AstNotEqualsOperatorNodeInputLeft_AndOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeInputLeft_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeInputLeft_EqOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_GtOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_GteOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_Llm": ".types", + "AstNotEqualsOperatorNodeInputLeft_LtOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_LteOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_NeqOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeInputLeft_OrOperator": ".types", + "AstNotEqualsOperatorNodeInputLeft_StringLiteral": ".types", + "AstNotEqualsOperatorNodeInputRight": ".types", + "AstNotEqualsOperatorNodeInputRight_AndOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeInputRight_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeInputRight_EqOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_GtOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_GteOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_Llm": ".types", + "AstNotEqualsOperatorNodeInputRight_LtOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_LteOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_NeqOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeInputRight_OrOperator": ".types", + "AstNotEqualsOperatorNodeInputRight_StringLiteral": ".types", + "AstNotEqualsOperatorNodeOutput": ".types", + "AstNotEqualsOperatorNodeOutputLeft": ".types", + "AstNotEqualsOperatorNodeOutputLeft_AndOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeOutputLeft_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeOutputLeft_EqOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_GtOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_GteOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_Llm": ".types", + "AstNotEqualsOperatorNodeOutputLeft_LtOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_LteOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_NeqOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeOutputLeft_OrOperator": ".types", + "AstNotEqualsOperatorNodeOutputLeft_StringLiteral": ".types", + "AstNotEqualsOperatorNodeOutputRight": ".types", + "AstNotEqualsOperatorNodeOutputRight_AndOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_BooleanLiteral": ".types", + "AstNotEqualsOperatorNodeOutputRight_DynamicVariable": ".types", + "AstNotEqualsOperatorNodeOutputRight_EqOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_GtOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_GteOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_Llm": ".types", + "AstNotEqualsOperatorNodeOutputRight_LtOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_LteOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_NeqOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_NumberLiteral": ".types", + "AstNotEqualsOperatorNodeOutputRight_OrOperator": ".types", + "AstNotEqualsOperatorNodeOutputRight_StringLiteral": ".types", + "AstNumberNodeInput": ".types", + "AstNumberNodeOutput": ".types", + "AstOrOperatorNodeInput": ".types", + "AstOrOperatorNodeInputChildrenItem": ".types", + "AstOrOperatorNodeInputChildrenItem_AndOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_BooleanLiteral": ".types", + "AstOrOperatorNodeInputChildrenItem_DynamicVariable": ".types", + "AstOrOperatorNodeInputChildrenItem_EqOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_GtOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_GteOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_Llm": ".types", + "AstOrOperatorNodeInputChildrenItem_LtOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_LteOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_NeqOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_NumberLiteral": ".types", + "AstOrOperatorNodeInputChildrenItem_OrOperator": ".types", + "AstOrOperatorNodeInputChildrenItem_StringLiteral": ".types", + "AstOrOperatorNodeOutput": ".types", + "AstOrOperatorNodeOutputChildrenItem": ".types", + "AstOrOperatorNodeOutputChildrenItem_AndOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_BooleanLiteral": ".types", + "AstOrOperatorNodeOutputChildrenItem_DynamicVariable": ".types", + "AstOrOperatorNodeOutputChildrenItem_EqOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_GtOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_GteOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_Llm": ".types", + "AstOrOperatorNodeOutputChildrenItem_LtOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_LteOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_NeqOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_NumberLiteral": ".types", + "AstOrOperatorNodeOutputChildrenItem_OrOperator": ".types", + "AstOrOperatorNodeOutputChildrenItem_StringLiteral": ".types", + "AstStringNodeInput": ".types", + "AstStringNodeOutput": ".types", + "AstllmNodeInput": ".types", + "AstllmNodeOutput": ".types", + "AsyncConversationMetadata": ".types", + "AsyncConversationMetadataDeliveryStatus": ".types", "AsyncElevenLabs": ".client", "AttachedTestModel": ".types", "AudioIsolationConvertRequestFileFormat": ".audio_isolation", @@ -1462,6 +1989,9 @@ "AuthConnectionLocator": ".types", "AuthSettings": ".types", "AuthorizationMethod": ".types", + "BackupLlmDefault": ".types", + "BackupLlmDisabled": ".types", + "BackupLlmOverride": ".types", "BadRequestError": ".errors", "BadRequestErrorBody": ".types", "BanReasonType": ".types", @@ -1494,7 +2024,8 @@ "BreakdownTypes": ".types", "BuiltInToolsInput": ".types", "BuiltInToolsOutput": ".types", - "BuiltInToolsWorkflowOverride": ".types", + "BuiltInToolsWorkflowOverrideInput": ".types", + "BuiltInToolsWorkflowOverrideOutput": ".types", "CaptionStyleCharacterAnimationModel": ".types", "CaptionStyleCharacterAnimationModelEnterType": ".types", "CaptionStyleCharacterAnimationModelExitType": ".types", @@ -1570,6 +2101,9 @@ "ConversationHistoryEvaluationCriteriaResultCommonModel": ".types", "ConversationHistoryFeedbackCommonModel": ".types", "ConversationHistoryMetadataCommonModel": ".types", + "ConversationHistoryMetadataCommonModelInitiationTrigger": ".types", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Default": ".types", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk": ".types", "ConversationHistoryMetadataCommonModelPhoneCall": ".types", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking": ".types", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio": ".types", @@ -1636,7 +2170,8 @@ "ConversationTokenPurpose": ".types", "ConversationTurnMetrics": ".types", "ConversationalConfig": ".types", - "ConversationalConfigApiModelWorkflowOverride": ".types", + "ConversationalConfigApiModelWorkflowOverrideInput": ".types", + "ConversationalConfigApiModelWorkflowOverrideOutput": ".types", "ConvertChapterResponseModel": ".types", "ConvertProjectResponseModel": ".types", "CreateAgentResponseModel": ".types", @@ -1654,6 +2189,7 @@ "DashboardCriteriaChartModel": ".types", "DashboardDataCollectionChartModel": ".types", "DataCollectionResultCommonModel": ".types", + "DefaultConversationInitiationTrigger": ".types", "DeleteChapterRequest": ".types", "DeleteChapterResponseModel": ".types", "DeleteDubbingResponseModel": ".types", @@ -1922,7 +2458,8 @@ "PodcastProjectResponseModel": ".types", "PodcastTextSource": ".types", "PodcastUrlSource": ".types", - "Position": ".types", + "PositionInput": ".types", + "PositionOutput": ".types", "PostAgentAvatarResponseModel": ".types", "PostWorkspaceSecretResponseModel": ".types", "PrivacyConfig": ".types", @@ -1932,12 +2469,14 @@ "ProjectExtendedResponse": ".types", "ProjectExtendedResponseModelAccessLevel": ".types", "ProjectExtendedResponseModelApplyTextNormalization": ".types", + "ProjectExtendedResponseModelAspectRatio": ".types", "ProjectExtendedResponseModelFiction": ".types", "ProjectExtendedResponseModelQualityPreset": ".types", "ProjectExtendedResponseModelSourceType": ".types", "ProjectExtendedResponseModelTargetAudience": ".types", "ProjectResponse": ".types", "ProjectResponseModelAccessLevel": ".types", + "ProjectResponseModelAspectRatio": ".types", "ProjectResponseModelFiction": ".types", "ProjectResponseModelSourceType": ".types", "ProjectResponseModelTargetAudience": ".types", @@ -1947,12 +2486,20 @@ "ProjectState": ".types", "PromptAgent": ".types", "PromptAgentApiModelInput": ".types", + "PromptAgentApiModelInputBackupLlmConfig": ".types", + "PromptAgentApiModelInputBackupLlmConfig_Default": ".types", + "PromptAgentApiModelInputBackupLlmConfig_Disabled": ".types", + "PromptAgentApiModelInputBackupLlmConfig_Override": ".types", "PromptAgentApiModelInputToolsItem": ".types", "PromptAgentApiModelInputToolsItem_Client": ".types", "PromptAgentApiModelInputToolsItem_Mcp": ".types", "PromptAgentApiModelInputToolsItem_System": ".types", "PromptAgentApiModelInputToolsItem_Webhook": ".types", "PromptAgentApiModelOutput": ".types", + "PromptAgentApiModelOutputBackupLlmConfig": ".types", + "PromptAgentApiModelOutputBackupLlmConfig_Default": ".types", + "PromptAgentApiModelOutputBackupLlmConfig_Disabled": ".types", + "PromptAgentApiModelOutputBackupLlmConfig_Override": ".types", "PromptAgentApiModelOutputToolsItem": ".types", "PromptAgentApiModelOutputToolsItem_Client": ".types", "PromptAgentApiModelOutputToolsItem_Mcp": ".types", @@ -1960,12 +2507,20 @@ "PromptAgentApiModelOutputToolsItem_Webhook": ".types", "PromptAgentApiModelOverride": ".types", "PromptAgentApiModelOverrideConfig": ".types", - "PromptAgentApiModelWorkflowOverride": ".types", - "PromptAgentApiModelWorkflowOverrideToolsItem": ".types", - "PromptAgentApiModelWorkflowOverrideToolsItem_Client": ".types", - "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp": ".types", - "PromptAgentApiModelWorkflowOverrideToolsItem_System": ".types", - "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook": ".types", + "PromptAgentApiModelWorkflowOverrideInput": ".types", + "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_System": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook": ".types", + "PromptAgentApiModelWorkflowOverrideOutput": ".types", + "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook": ".types", "PromptAgentDbModel": ".types", "PromptEvaluationCriteria": ".types", "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess": ".pronunciation_dictionaries", @@ -2014,6 +2569,7 @@ "SafetyRule": ".types", "SaveVoicePreviewRequest": ".types", "SecretDependencyType": ".types", + "SectionSource": ".types", "SegmentCreateResponse": ".types", "SegmentDeleteResponse": ".types", "SegmentDubResponse": ".types", @@ -2123,6 +2679,7 @@ "TextToVoiceCreatePreviewsRequestOutputFormat": ".text_to_voice", "TextToVoiceDesignRequestOutputFormat": ".text_to_voice", "TextToVoiceRemixRequestOutputFormat": ".text_to_voice", + "TimeRange": ".types", "TokenResponseModel": ".types", "TooEarlyError": ".errors", "Tool": ".types", @@ -2156,7 +2713,8 @@ "TtsConversationalConfigOutput": ".types", "TtsConversationalConfigOverride": ".types", "TtsConversationalConfigOverrideConfig": ".types", - "TtsConversationalConfigWorkflowOverride": ".types", + "TtsConversationalConfigWorkflowOverrideInput": ".types", + "TtsConversationalConfigWorkflowOverrideOutput": ".types", "TtsConversationalModel": ".types", "TtsModelFamily": ".types", "TtsOptimizeStreamingLatency": ".types", @@ -2167,6 +2725,8 @@ "TwilioOutboundCallResponse": ".types", "TxtExportOptions": ".types", "UnauthorizedError": ".errors", + "UnitTestCommonModel": ".types", + "UnitTestCommonModelDynamicVariablesValue": ".types", "UnitTestCommonModelType": ".types", "UnitTestRunResponseModel": ".types", "UnitTestSummaryResponseModel": ".types", @@ -2219,6 +2779,7 @@ "VoicemailDetectionToolConfig": ".types", "VoicesGetSharedRequestCategory": ".voices", "WebhookAuthMethodType": ".types", + "WebhookEventType": ".types", "WebhookToolApiSchemaConfigInput": ".types", "WebhookToolApiSchemaConfigInputMethod": ".types", "WebhookToolApiSchemaConfigInputRequestHeadersValue": ".types", @@ -2230,6 +2791,18 @@ "WebhookUsageType": ".types", "WebsocketTtsClientMessageMulti": ".types", "WebsocketTtsServerMessageMulti": ".types", + "WhatsAppBusinessAccount": ".types", + "WhatsAppBusinessAccountChangesItem": ".types", + "WhatsAppBusinessAccountChangesItem_Calls": ".types", + "WhatsAppBusinessAccountChangesItem_Messages": ".types", + "WhatsAppCall": ".types", + "WhatsAppCallDirection": ".types", + "WhatsAppCalls": ".types", + "WhatsAppChangeCalls": ".types", + "WhatsAppChangeMessages": ".types", + "WhatsAppEventRequest": ".types", + "WhatsAppMetadata": ".types", + "WhatsAppSession": ".types", "WidgetConfig": ".types", "WidgetConfigInputAvatar": ".types", "WidgetConfigInputAvatar_Image": ".types", @@ -2251,43 +2824,79 @@ "WidgetPlacement": ".types", "WidgetStyles": ".types", "WidgetTextContents": ".types", - "WorkflowEdgeModel": ".types", - "WorkflowEdgeModelBackwardCondition": ".types", - "WorkflowEdgeModelBackwardCondition_Expression": ".types", - "WorkflowEdgeModelBackwardCondition_Llm": ".types", - "WorkflowEdgeModelBackwardCondition_Result": ".types", - "WorkflowEdgeModelBackwardCondition_Unconditional": ".types", - "WorkflowEdgeModelForwardCondition": ".types", - "WorkflowEdgeModelForwardCondition_Expression": ".types", - "WorkflowEdgeModelForwardCondition_Llm": ".types", - "WorkflowEdgeModelForwardCondition_Result": ".types", - "WorkflowEdgeModelForwardCondition_Unconditional": ".types", - "WorkflowEndNodeModel": ".types", - "WorkflowExpressionConditionModel": ".types", - "WorkflowExpressionConditionModelExpression": ".types", - "WorkflowExpressionConditionModelExpression_AndOperator": ".types", - "WorkflowExpressionConditionModelExpression_BooleanLiteral": ".types", - "WorkflowExpressionConditionModelExpression_DynamicVariable": ".types", - "WorkflowExpressionConditionModelExpression_EqOperator": ".types", - "WorkflowExpressionConditionModelExpression_GtOperator": ".types", - "WorkflowExpressionConditionModelExpression_GteOperator": ".types", - "WorkflowExpressionConditionModelExpression_Llm": ".types", - "WorkflowExpressionConditionModelExpression_LtOperator": ".types", - "WorkflowExpressionConditionModelExpression_LteOperator": ".types", - "WorkflowExpressionConditionModelExpression_NeqOperator": ".types", - "WorkflowExpressionConditionModelExpression_NumberLiteral": ".types", - "WorkflowExpressionConditionModelExpression_OrOperator": ".types", - "WorkflowExpressionConditionModelExpression_StringLiteral": ".types", + "WorkflowEdgeModelInput": ".types", + "WorkflowEdgeModelInputBackwardCondition": ".types", + "WorkflowEdgeModelInputBackwardCondition_Expression": ".types", + "WorkflowEdgeModelInputBackwardCondition_Llm": ".types", + "WorkflowEdgeModelInputBackwardCondition_Result": ".types", + "WorkflowEdgeModelInputBackwardCondition_Unconditional": ".types", + "WorkflowEdgeModelInputForwardCondition": ".types", + "WorkflowEdgeModelInputForwardCondition_Expression": ".types", + "WorkflowEdgeModelInputForwardCondition_Llm": ".types", + "WorkflowEdgeModelInputForwardCondition_Result": ".types", + "WorkflowEdgeModelInputForwardCondition_Unconditional": ".types", + "WorkflowEdgeModelOutput": ".types", + "WorkflowEdgeModelOutputBackwardCondition": ".types", + "WorkflowEdgeModelOutputBackwardCondition_Expression": ".types", + "WorkflowEdgeModelOutputBackwardCondition_Llm": ".types", + "WorkflowEdgeModelOutputBackwardCondition_Result": ".types", + "WorkflowEdgeModelOutputBackwardCondition_Unconditional": ".types", + "WorkflowEdgeModelOutputForwardCondition": ".types", + "WorkflowEdgeModelOutputForwardCondition_Expression": ".types", + "WorkflowEdgeModelOutputForwardCondition_Llm": ".types", + "WorkflowEdgeModelOutputForwardCondition_Result": ".types", + "WorkflowEdgeModelOutputForwardCondition_Unconditional": ".types", + "WorkflowEndNodeModelInput": ".types", + "WorkflowEndNodeModelOutput": ".types", + "WorkflowExpressionConditionModelInput": ".types", + "WorkflowExpressionConditionModelInputExpression": ".types", + "WorkflowExpressionConditionModelInputExpression_AndOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_BooleanLiteral": ".types", + "WorkflowExpressionConditionModelInputExpression_DynamicVariable": ".types", + "WorkflowExpressionConditionModelInputExpression_EqOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_GtOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_GteOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_Llm": ".types", + "WorkflowExpressionConditionModelInputExpression_LtOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_LteOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_NeqOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_NumberLiteral": ".types", + "WorkflowExpressionConditionModelInputExpression_OrOperator": ".types", + "WorkflowExpressionConditionModelInputExpression_StringLiteral": ".types", + "WorkflowExpressionConditionModelOutput": ".types", + "WorkflowExpressionConditionModelOutputExpression": ".types", + "WorkflowExpressionConditionModelOutputExpression_AndOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_BooleanLiteral": ".types", + "WorkflowExpressionConditionModelOutputExpression_DynamicVariable": ".types", + "WorkflowExpressionConditionModelOutputExpression_EqOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_GtOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_GteOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_Llm": ".types", + "WorkflowExpressionConditionModelOutputExpression_LtOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_LteOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_NeqOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_NumberLiteral": ".types", + "WorkflowExpressionConditionModelOutputExpression_OrOperator": ".types", + "WorkflowExpressionConditionModelOutputExpression_StringLiteral": ".types", "WorkflowFeaturesUsageCommonModel": ".types", - "WorkflowLlmConditionModel": ".types", - "WorkflowOverrideAgentNodeModel": ".types", - "WorkflowPhoneNumberNodeModel": ".types", - "WorkflowPhoneNumberNodeModelTransferDestination": ".types", - "WorkflowPhoneNumberNodeModelTransferDestination_Phone": ".types", - "WorkflowPhoneNumberNodeModelTransferDestination_SipUri": ".types", - "WorkflowResultConditionModel": ".types", - "WorkflowStandaloneAgentNodeModel": ".types", - "WorkflowStartNodeModel": ".types", + "WorkflowLlmConditionModelInput": ".types", + "WorkflowLlmConditionModelOutput": ".types", + "WorkflowOverrideAgentNodeModelInput": ".types", + "WorkflowOverrideAgentNodeModelOutput": ".types", + "WorkflowPhoneNumberNodeModelInput": ".types", + "WorkflowPhoneNumberNodeModelInputTransferDestination": ".types", + "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone": ".types", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri": ".types", + "WorkflowPhoneNumberNodeModelOutput": ".types", + "WorkflowPhoneNumberNodeModelOutputTransferDestination": ".types", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone": ".types", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri": ".types", + "WorkflowResultConditionModelInput": ".types", + "WorkflowResultConditionModelOutput": ".types", + "WorkflowStandaloneAgentNodeModelInput": ".types", + "WorkflowStandaloneAgentNodeModelOutput": ".types", + "WorkflowStartNodeModelInput": ".types", + "WorkflowStartNodeModelOutput": ".types", "WorkflowToolEdgeStepModel": ".types", "WorkflowToolLocator": ".types", "WorkflowToolMaxIterationsExceededStepModel": ".types", @@ -2295,7 +2904,8 @@ "WorkflowToolNestedToolsStepModelInputResultsItem": ".types", "WorkflowToolNestedToolsStepModelOutput": ".types", "WorkflowToolNestedToolsStepModelOutputResultsItem": ".types", - "WorkflowToolNodeModel": ".types", + "WorkflowToolNodeModelInput": ".types", + "WorkflowToolNodeModelOutput": ".types", "WorkflowToolResponseModelInput": ".types", "WorkflowToolResponseModelInputStepsItem": ".types", "WorkflowToolResponseModelInputStepsItem_Edge": ".types", @@ -2306,7 +2916,8 @@ "WorkflowToolResponseModelOutputStepsItem_Edge": ".types", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded": ".types", "WorkflowToolResponseModelOutputStepsItem_NestedTools": ".types", - "WorkflowUnconditionalModel": ".types", + "WorkflowUnconditionalModelInput": ".types", + "WorkflowUnconditionalModelOutput": ".types", "WorkspaceApiKeyListResponseModel": ".types", "WorkspaceApiKeyResponseModel": ".types", "WorkspaceApiKeyResponseModelPermissionsItem": ".types", @@ -2319,6 +2930,7 @@ "WorkspaceWebhookListResponseModel": ".types", "WorkspaceWebhookResponseModel": ".types", "WorkspaceWebhookUsageResponseModel": ".types", + "ZendeskConversationInitiationTrigger": ".types", "__version__": ".version", "audio_isolation": ".audio_isolation", "audio_native": ".audio_native", @@ -2390,9 +3002,11 @@ def __dir__(): "Age", "AgentCallLimits", "AgentConfig", - "AgentConfigApiModelWorkflowOverride", - "AgentConfigOverride", + "AgentConfigApiModelWorkflowOverrideInput", + "AgentConfigApiModelWorkflowOverrideOutput", "AgentConfigOverrideConfig", + "AgentConfigOverrideInput", + "AgentConfigOverrideOutput", "AgentFailureResponseExample", "AgentMetadata", "AgentMetadataResponseModel", @@ -2412,6 +3026,14 @@ def __dir__(): "AgentWorkflowRequestModelNodesValue_StandaloneAgent", "AgentWorkflowRequestModelNodesValue_Start", "AgentWorkflowRequestModelNodesValue_Tool", + "AgentWorkflowResponseModel", + "AgentWorkflowResponseModelNodesValue", + "AgentWorkflowResponseModelNodesValue_End", + "AgentWorkflowResponseModelNodesValue_OverrideAgent", + "AgentWorkflowResponseModelNodesValue_PhoneNumber", + "AgentWorkflowResponseModelNodesValue_StandaloneAgent", + "AgentWorkflowResponseModelNodesValue_Start", + "AgentWorkflowResponseModelNodesValue_Tool", "AgentWorkspaceOverridesInput", "AgentWorkspaceOverridesOutput", "Alignment", @@ -2425,215 +3047,426 @@ def __dir__(): "AsrInputFormat", "AsrProvider", "AsrQuality", - "AstAndOperatorNode", - "AstAndOperatorNodeChildrenItem", - "AstAndOperatorNodeChildrenItem_AndOperator", - "AstAndOperatorNodeChildrenItem_BooleanLiteral", - "AstAndOperatorNodeChildrenItem_DynamicVariable", - "AstAndOperatorNodeChildrenItem_EqOperator", - "AstAndOperatorNodeChildrenItem_GtOperator", - "AstAndOperatorNodeChildrenItem_GteOperator", - "AstAndOperatorNodeChildrenItem_Llm", - "AstAndOperatorNodeChildrenItem_LtOperator", - "AstAndOperatorNodeChildrenItem_LteOperator", - "AstAndOperatorNodeChildrenItem_NeqOperator", - "AstAndOperatorNodeChildrenItem_NumberLiteral", - "AstAndOperatorNodeChildrenItem_OrOperator", - "AstAndOperatorNodeChildrenItem_StringLiteral", - "AstBooleanNode", - "AstDynamicVariableNode", - "AstEqualsOperatorNode", - "AstEqualsOperatorNodeLeft", - "AstEqualsOperatorNodeLeft_AndOperator", - "AstEqualsOperatorNodeLeft_BooleanLiteral", - "AstEqualsOperatorNodeLeft_DynamicVariable", - "AstEqualsOperatorNodeLeft_EqOperator", - "AstEqualsOperatorNodeLeft_GtOperator", - "AstEqualsOperatorNodeLeft_GteOperator", - "AstEqualsOperatorNodeLeft_Llm", - "AstEqualsOperatorNodeLeft_LtOperator", - "AstEqualsOperatorNodeLeft_LteOperator", - "AstEqualsOperatorNodeLeft_NeqOperator", - "AstEqualsOperatorNodeLeft_NumberLiteral", - "AstEqualsOperatorNodeLeft_OrOperator", - "AstEqualsOperatorNodeLeft_StringLiteral", - "AstEqualsOperatorNodeRight", - "AstEqualsOperatorNodeRight_AndOperator", - "AstEqualsOperatorNodeRight_BooleanLiteral", - "AstEqualsOperatorNodeRight_DynamicVariable", - "AstEqualsOperatorNodeRight_EqOperator", - "AstEqualsOperatorNodeRight_GtOperator", - "AstEqualsOperatorNodeRight_GteOperator", - "AstEqualsOperatorNodeRight_Llm", - "AstEqualsOperatorNodeRight_LtOperator", - "AstEqualsOperatorNodeRight_LteOperator", - "AstEqualsOperatorNodeRight_NeqOperator", - "AstEqualsOperatorNodeRight_NumberLiteral", - "AstEqualsOperatorNodeRight_OrOperator", - "AstEqualsOperatorNodeRight_StringLiteral", - "AstGreaterThanOperatorNode", - "AstGreaterThanOperatorNodeLeft", - "AstGreaterThanOperatorNodeLeft_AndOperator", - "AstGreaterThanOperatorNodeLeft_BooleanLiteral", - "AstGreaterThanOperatorNodeLeft_DynamicVariable", - "AstGreaterThanOperatorNodeLeft_EqOperator", - "AstGreaterThanOperatorNodeLeft_GtOperator", - "AstGreaterThanOperatorNodeLeft_GteOperator", - "AstGreaterThanOperatorNodeLeft_Llm", - "AstGreaterThanOperatorNodeLeft_LtOperator", - "AstGreaterThanOperatorNodeLeft_LteOperator", - "AstGreaterThanOperatorNodeLeft_NeqOperator", - "AstGreaterThanOperatorNodeLeft_NumberLiteral", - "AstGreaterThanOperatorNodeLeft_OrOperator", - "AstGreaterThanOperatorNodeLeft_StringLiteral", - "AstGreaterThanOperatorNodeRight", - "AstGreaterThanOperatorNodeRight_AndOperator", - "AstGreaterThanOperatorNodeRight_BooleanLiteral", - "AstGreaterThanOperatorNodeRight_DynamicVariable", - "AstGreaterThanOperatorNodeRight_EqOperator", - "AstGreaterThanOperatorNodeRight_GtOperator", - "AstGreaterThanOperatorNodeRight_GteOperator", - "AstGreaterThanOperatorNodeRight_Llm", - "AstGreaterThanOperatorNodeRight_LtOperator", - "AstGreaterThanOperatorNodeRight_LteOperator", - "AstGreaterThanOperatorNodeRight_NeqOperator", - "AstGreaterThanOperatorNodeRight_NumberLiteral", - "AstGreaterThanOperatorNodeRight_OrOperator", - "AstGreaterThanOperatorNodeRight_StringLiteral", - "AstGreaterThanOrEqualsOperatorNode", - "AstGreaterThanOrEqualsOperatorNodeLeft", - "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral", - "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable", - "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_Llm", - "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral", - "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight", - "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable", - "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_Llm", - "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral", - "AstLessThanOperatorNode", - "AstLessThanOperatorNodeLeft", - "AstLessThanOperatorNodeLeft_AndOperator", - "AstLessThanOperatorNodeLeft_BooleanLiteral", - "AstLessThanOperatorNodeLeft_DynamicVariable", - "AstLessThanOperatorNodeLeft_EqOperator", - "AstLessThanOperatorNodeLeft_GtOperator", - "AstLessThanOperatorNodeLeft_GteOperator", - "AstLessThanOperatorNodeLeft_Llm", - "AstLessThanOperatorNodeLeft_LtOperator", - "AstLessThanOperatorNodeLeft_LteOperator", - "AstLessThanOperatorNodeLeft_NeqOperator", - "AstLessThanOperatorNodeLeft_NumberLiteral", - "AstLessThanOperatorNodeLeft_OrOperator", - "AstLessThanOperatorNodeLeft_StringLiteral", - "AstLessThanOperatorNodeRight", - "AstLessThanOperatorNodeRight_AndOperator", - "AstLessThanOperatorNodeRight_BooleanLiteral", - "AstLessThanOperatorNodeRight_DynamicVariable", - "AstLessThanOperatorNodeRight_EqOperator", - "AstLessThanOperatorNodeRight_GtOperator", - "AstLessThanOperatorNodeRight_GteOperator", - "AstLessThanOperatorNodeRight_Llm", - "AstLessThanOperatorNodeRight_LtOperator", - "AstLessThanOperatorNodeRight_LteOperator", - "AstLessThanOperatorNodeRight_NeqOperator", - "AstLessThanOperatorNodeRight_NumberLiteral", - "AstLessThanOperatorNodeRight_OrOperator", - "AstLessThanOperatorNodeRight_StringLiteral", - "AstLessThanOrEqualsOperatorNode", - "AstLessThanOrEqualsOperatorNodeLeft", - "AstLessThanOrEqualsOperatorNodeLeft_AndOperator", - "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral", - "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable", - "AstLessThanOrEqualsOperatorNodeLeft_EqOperator", - "AstLessThanOrEqualsOperatorNodeLeft_GtOperator", - "AstLessThanOrEqualsOperatorNodeLeft_GteOperator", - "AstLessThanOrEqualsOperatorNodeLeft_Llm", - "AstLessThanOrEqualsOperatorNodeLeft_LtOperator", - "AstLessThanOrEqualsOperatorNodeLeft_LteOperator", - "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator", - "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral", - "AstLessThanOrEqualsOperatorNodeLeft_OrOperator", - "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral", - "AstLessThanOrEqualsOperatorNodeRight", - "AstLessThanOrEqualsOperatorNodeRight_AndOperator", - "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral", - "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable", - "AstLessThanOrEqualsOperatorNodeRight_EqOperator", - "AstLessThanOrEqualsOperatorNodeRight_GtOperator", - "AstLessThanOrEqualsOperatorNodeRight_GteOperator", - "AstLessThanOrEqualsOperatorNodeRight_Llm", - "AstLessThanOrEqualsOperatorNodeRight_LtOperator", - "AstLessThanOrEqualsOperatorNodeRight_LteOperator", - "AstLessThanOrEqualsOperatorNodeRight_NeqOperator", - "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral", - "AstLessThanOrEqualsOperatorNodeRight_OrOperator", - "AstLessThanOrEqualsOperatorNodeRight_StringLiteral", - "AstNotEqualsOperatorNode", - "AstNotEqualsOperatorNodeLeft", - "AstNotEqualsOperatorNodeLeft_AndOperator", - "AstNotEqualsOperatorNodeLeft_BooleanLiteral", - "AstNotEqualsOperatorNodeLeft_DynamicVariable", - "AstNotEqualsOperatorNodeLeft_EqOperator", - "AstNotEqualsOperatorNodeLeft_GtOperator", - "AstNotEqualsOperatorNodeLeft_GteOperator", - "AstNotEqualsOperatorNodeLeft_Llm", - "AstNotEqualsOperatorNodeLeft_LtOperator", - "AstNotEqualsOperatorNodeLeft_LteOperator", - "AstNotEqualsOperatorNodeLeft_NeqOperator", - "AstNotEqualsOperatorNodeLeft_NumberLiteral", - "AstNotEqualsOperatorNodeLeft_OrOperator", - "AstNotEqualsOperatorNodeLeft_StringLiteral", - "AstNotEqualsOperatorNodeRight", - "AstNotEqualsOperatorNodeRight_AndOperator", - "AstNotEqualsOperatorNodeRight_BooleanLiteral", - "AstNotEqualsOperatorNodeRight_DynamicVariable", - "AstNotEqualsOperatorNodeRight_EqOperator", - "AstNotEqualsOperatorNodeRight_GtOperator", - "AstNotEqualsOperatorNodeRight_GteOperator", - "AstNotEqualsOperatorNodeRight_Llm", - "AstNotEqualsOperatorNodeRight_LtOperator", - "AstNotEqualsOperatorNodeRight_LteOperator", - "AstNotEqualsOperatorNodeRight_NeqOperator", - "AstNotEqualsOperatorNodeRight_NumberLiteral", - "AstNotEqualsOperatorNodeRight_OrOperator", - "AstNotEqualsOperatorNodeRight_StringLiteral", - "AstNumberNode", - "AstOrOperatorNode", - "AstOrOperatorNodeChildrenItem", - "AstOrOperatorNodeChildrenItem_AndOperator", - "AstOrOperatorNodeChildrenItem_BooleanLiteral", - "AstOrOperatorNodeChildrenItem_DynamicVariable", - "AstOrOperatorNodeChildrenItem_EqOperator", - "AstOrOperatorNodeChildrenItem_GtOperator", - "AstOrOperatorNodeChildrenItem_GteOperator", - "AstOrOperatorNodeChildrenItem_Llm", - "AstOrOperatorNodeChildrenItem_LtOperator", - "AstOrOperatorNodeChildrenItem_LteOperator", - "AstOrOperatorNodeChildrenItem_NeqOperator", - "AstOrOperatorNodeChildrenItem_NumberLiteral", - "AstOrOperatorNodeChildrenItem_OrOperator", - "AstOrOperatorNodeChildrenItem_StringLiteral", - "AstStringNode", - "AstllmNode", + "AstAndOperatorNodeInput", + "AstAndOperatorNodeInputChildrenItem", + "AstAndOperatorNodeInputChildrenItem_AndOperator", + "AstAndOperatorNodeInputChildrenItem_BooleanLiteral", + "AstAndOperatorNodeInputChildrenItem_DynamicVariable", + "AstAndOperatorNodeInputChildrenItem_EqOperator", + "AstAndOperatorNodeInputChildrenItem_GtOperator", + "AstAndOperatorNodeInputChildrenItem_GteOperator", + "AstAndOperatorNodeInputChildrenItem_Llm", + "AstAndOperatorNodeInputChildrenItem_LtOperator", + "AstAndOperatorNodeInputChildrenItem_LteOperator", + "AstAndOperatorNodeInputChildrenItem_NeqOperator", + "AstAndOperatorNodeInputChildrenItem_NumberLiteral", + "AstAndOperatorNodeInputChildrenItem_OrOperator", + "AstAndOperatorNodeInputChildrenItem_StringLiteral", + "AstAndOperatorNodeOutput", + "AstAndOperatorNodeOutputChildrenItem", + "AstAndOperatorNodeOutputChildrenItem_AndOperator", + "AstAndOperatorNodeOutputChildrenItem_BooleanLiteral", + "AstAndOperatorNodeOutputChildrenItem_DynamicVariable", + "AstAndOperatorNodeOutputChildrenItem_EqOperator", + "AstAndOperatorNodeOutputChildrenItem_GtOperator", + "AstAndOperatorNodeOutputChildrenItem_GteOperator", + "AstAndOperatorNodeOutputChildrenItem_Llm", + "AstAndOperatorNodeOutputChildrenItem_LtOperator", + "AstAndOperatorNodeOutputChildrenItem_LteOperator", + "AstAndOperatorNodeOutputChildrenItem_NeqOperator", + "AstAndOperatorNodeOutputChildrenItem_NumberLiteral", + "AstAndOperatorNodeOutputChildrenItem_OrOperator", + "AstAndOperatorNodeOutputChildrenItem_StringLiteral", + "AstBooleanNodeInput", + "AstBooleanNodeOutput", + "AstDynamicVariableNodeInput", + "AstDynamicVariableNodeOutput", + "AstEqualsOperatorNodeInput", + "AstEqualsOperatorNodeInputLeft", + "AstEqualsOperatorNodeInputLeft_AndOperator", + "AstEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstEqualsOperatorNodeInputLeft_DynamicVariable", + "AstEqualsOperatorNodeInputLeft_EqOperator", + "AstEqualsOperatorNodeInputLeft_GtOperator", + "AstEqualsOperatorNodeInputLeft_GteOperator", + "AstEqualsOperatorNodeInputLeft_Llm", + "AstEqualsOperatorNodeInputLeft_LtOperator", + "AstEqualsOperatorNodeInputLeft_LteOperator", + "AstEqualsOperatorNodeInputLeft_NeqOperator", + "AstEqualsOperatorNodeInputLeft_NumberLiteral", + "AstEqualsOperatorNodeInputLeft_OrOperator", + "AstEqualsOperatorNodeInputLeft_StringLiteral", + "AstEqualsOperatorNodeInputRight", + "AstEqualsOperatorNodeInputRight_AndOperator", + "AstEqualsOperatorNodeInputRight_BooleanLiteral", + "AstEqualsOperatorNodeInputRight_DynamicVariable", + "AstEqualsOperatorNodeInputRight_EqOperator", + "AstEqualsOperatorNodeInputRight_GtOperator", + "AstEqualsOperatorNodeInputRight_GteOperator", + "AstEqualsOperatorNodeInputRight_Llm", + "AstEqualsOperatorNodeInputRight_LtOperator", + "AstEqualsOperatorNodeInputRight_LteOperator", + "AstEqualsOperatorNodeInputRight_NeqOperator", + "AstEqualsOperatorNodeInputRight_NumberLiteral", + "AstEqualsOperatorNodeInputRight_OrOperator", + "AstEqualsOperatorNodeInputRight_StringLiteral", + "AstEqualsOperatorNodeOutput", + "AstEqualsOperatorNodeOutputLeft", + "AstEqualsOperatorNodeOutputLeft_AndOperator", + "AstEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstEqualsOperatorNodeOutputLeft_EqOperator", + "AstEqualsOperatorNodeOutputLeft_GtOperator", + "AstEqualsOperatorNodeOutputLeft_GteOperator", + "AstEqualsOperatorNodeOutputLeft_Llm", + "AstEqualsOperatorNodeOutputLeft_LtOperator", + "AstEqualsOperatorNodeOutputLeft_LteOperator", + "AstEqualsOperatorNodeOutputLeft_NeqOperator", + "AstEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstEqualsOperatorNodeOutputLeft_OrOperator", + "AstEqualsOperatorNodeOutputLeft_StringLiteral", + "AstEqualsOperatorNodeOutputRight", + "AstEqualsOperatorNodeOutputRight_AndOperator", + "AstEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstEqualsOperatorNodeOutputRight_DynamicVariable", + "AstEqualsOperatorNodeOutputRight_EqOperator", + "AstEqualsOperatorNodeOutputRight_GtOperator", + "AstEqualsOperatorNodeOutputRight_GteOperator", + "AstEqualsOperatorNodeOutputRight_Llm", + "AstEqualsOperatorNodeOutputRight_LtOperator", + "AstEqualsOperatorNodeOutputRight_LteOperator", + "AstEqualsOperatorNodeOutputRight_NeqOperator", + "AstEqualsOperatorNodeOutputRight_NumberLiteral", + "AstEqualsOperatorNodeOutputRight_OrOperator", + "AstEqualsOperatorNodeOutputRight_StringLiteral", + "AstGreaterThanOperatorNodeInput", + "AstGreaterThanOperatorNodeInputLeft", + "AstGreaterThanOperatorNodeInputLeft_AndOperator", + "AstGreaterThanOperatorNodeInputLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeInputLeft_DynamicVariable", + "AstGreaterThanOperatorNodeInputLeft_EqOperator", + "AstGreaterThanOperatorNodeInputLeft_GtOperator", + "AstGreaterThanOperatorNodeInputLeft_GteOperator", + "AstGreaterThanOperatorNodeInputLeft_Llm", + "AstGreaterThanOperatorNodeInputLeft_LtOperator", + "AstGreaterThanOperatorNodeInputLeft_LteOperator", + "AstGreaterThanOperatorNodeInputLeft_NeqOperator", + "AstGreaterThanOperatorNodeInputLeft_NumberLiteral", + "AstGreaterThanOperatorNodeInputLeft_OrOperator", + "AstGreaterThanOperatorNodeInputLeft_StringLiteral", + "AstGreaterThanOperatorNodeInputRight", + "AstGreaterThanOperatorNodeInputRight_AndOperator", + "AstGreaterThanOperatorNodeInputRight_BooleanLiteral", + "AstGreaterThanOperatorNodeInputRight_DynamicVariable", + "AstGreaterThanOperatorNodeInputRight_EqOperator", + "AstGreaterThanOperatorNodeInputRight_GtOperator", + "AstGreaterThanOperatorNodeInputRight_GteOperator", + "AstGreaterThanOperatorNodeInputRight_Llm", + "AstGreaterThanOperatorNodeInputRight_LtOperator", + "AstGreaterThanOperatorNodeInputRight_LteOperator", + "AstGreaterThanOperatorNodeInputRight_NeqOperator", + "AstGreaterThanOperatorNodeInputRight_NumberLiteral", + "AstGreaterThanOperatorNodeInputRight_OrOperator", + "AstGreaterThanOperatorNodeInputRight_StringLiteral", + "AstGreaterThanOperatorNodeOutput", + "AstGreaterThanOperatorNodeOutputLeft", + "AstGreaterThanOperatorNodeOutputLeft_AndOperator", + "AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeOutputLeft_DynamicVariable", + "AstGreaterThanOperatorNodeOutputLeft_EqOperator", + "AstGreaterThanOperatorNodeOutputLeft_GtOperator", + "AstGreaterThanOperatorNodeOutputLeft_GteOperator", + "AstGreaterThanOperatorNodeOutputLeft_Llm", + "AstGreaterThanOperatorNodeOutputLeft_LtOperator", + "AstGreaterThanOperatorNodeOutputLeft_LteOperator", + "AstGreaterThanOperatorNodeOutputLeft_NeqOperator", + "AstGreaterThanOperatorNodeOutputLeft_NumberLiteral", + "AstGreaterThanOperatorNodeOutputLeft_OrOperator", + "AstGreaterThanOperatorNodeOutputLeft_StringLiteral", + "AstGreaterThanOperatorNodeOutputRight", + "AstGreaterThanOperatorNodeOutputRight_AndOperator", + "AstGreaterThanOperatorNodeOutputRight_BooleanLiteral", + "AstGreaterThanOperatorNodeOutputRight_DynamicVariable", + "AstGreaterThanOperatorNodeOutputRight_EqOperator", + "AstGreaterThanOperatorNodeOutputRight_GtOperator", + "AstGreaterThanOperatorNodeOutputRight_GteOperator", + "AstGreaterThanOperatorNodeOutputRight_Llm", + "AstGreaterThanOperatorNodeOutputRight_LtOperator", + "AstGreaterThanOperatorNodeOutputRight_LteOperator", + "AstGreaterThanOperatorNodeOutputRight_NeqOperator", + "AstGreaterThanOperatorNodeOutputRight_NumberLiteral", + "AstGreaterThanOperatorNodeOutputRight_OrOperator", + "AstGreaterThanOperatorNodeOutputRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeInput", + "AstGreaterThanOrEqualsOperatorNodeInputLeft", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight", + "AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutput", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral", + "AstLessThanOperatorNodeInput", + "AstLessThanOperatorNodeInputLeft", + "AstLessThanOperatorNodeInputLeft_AndOperator", + "AstLessThanOperatorNodeInputLeft_BooleanLiteral", + "AstLessThanOperatorNodeInputLeft_DynamicVariable", + "AstLessThanOperatorNodeInputLeft_EqOperator", + "AstLessThanOperatorNodeInputLeft_GtOperator", + "AstLessThanOperatorNodeInputLeft_GteOperator", + "AstLessThanOperatorNodeInputLeft_Llm", + "AstLessThanOperatorNodeInputLeft_LtOperator", + "AstLessThanOperatorNodeInputLeft_LteOperator", + "AstLessThanOperatorNodeInputLeft_NeqOperator", + "AstLessThanOperatorNodeInputLeft_NumberLiteral", + "AstLessThanOperatorNodeInputLeft_OrOperator", + "AstLessThanOperatorNodeInputLeft_StringLiteral", + "AstLessThanOperatorNodeInputRight", + "AstLessThanOperatorNodeInputRight_AndOperator", + "AstLessThanOperatorNodeInputRight_BooleanLiteral", + "AstLessThanOperatorNodeInputRight_DynamicVariable", + "AstLessThanOperatorNodeInputRight_EqOperator", + "AstLessThanOperatorNodeInputRight_GtOperator", + "AstLessThanOperatorNodeInputRight_GteOperator", + "AstLessThanOperatorNodeInputRight_Llm", + "AstLessThanOperatorNodeInputRight_LtOperator", + "AstLessThanOperatorNodeInputRight_LteOperator", + "AstLessThanOperatorNodeInputRight_NeqOperator", + "AstLessThanOperatorNodeInputRight_NumberLiteral", + "AstLessThanOperatorNodeInputRight_OrOperator", + "AstLessThanOperatorNodeInputRight_StringLiteral", + "AstLessThanOperatorNodeOutput", + "AstLessThanOperatorNodeOutputLeft", + "AstLessThanOperatorNodeOutputLeft_AndOperator", + "AstLessThanOperatorNodeOutputLeft_BooleanLiteral", + "AstLessThanOperatorNodeOutputLeft_DynamicVariable", + "AstLessThanOperatorNodeOutputLeft_EqOperator", + "AstLessThanOperatorNodeOutputLeft_GtOperator", + "AstLessThanOperatorNodeOutputLeft_GteOperator", + "AstLessThanOperatorNodeOutputLeft_Llm", + "AstLessThanOperatorNodeOutputLeft_LtOperator", + "AstLessThanOperatorNodeOutputLeft_LteOperator", + "AstLessThanOperatorNodeOutputLeft_NeqOperator", + "AstLessThanOperatorNodeOutputLeft_NumberLiteral", + "AstLessThanOperatorNodeOutputLeft_OrOperator", + "AstLessThanOperatorNodeOutputLeft_StringLiteral", + "AstLessThanOperatorNodeOutputRight", + "AstLessThanOperatorNodeOutputRight_AndOperator", + "AstLessThanOperatorNodeOutputRight_BooleanLiteral", + "AstLessThanOperatorNodeOutputRight_DynamicVariable", + "AstLessThanOperatorNodeOutputRight_EqOperator", + "AstLessThanOperatorNodeOutputRight_GtOperator", + "AstLessThanOperatorNodeOutputRight_GteOperator", + "AstLessThanOperatorNodeOutputRight_Llm", + "AstLessThanOperatorNodeOutputRight_LtOperator", + "AstLessThanOperatorNodeOutputRight_LteOperator", + "AstLessThanOperatorNodeOutputRight_NeqOperator", + "AstLessThanOperatorNodeOutputRight_NumberLiteral", + "AstLessThanOperatorNodeOutputRight_OrOperator", + "AstLessThanOperatorNodeOutputRight_StringLiteral", + "AstLessThanOrEqualsOperatorNodeInput", + "AstLessThanOrEqualsOperatorNodeInputLeft", + "AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_Llm", + "AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight", + "AstLessThanOrEqualsOperatorNodeInputRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeInputRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_Llm", + "AstLessThanOrEqualsOperatorNodeInputRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral", + "AstLessThanOrEqualsOperatorNodeOutput", + "AstLessThanOrEqualsOperatorNodeOutputLeft", + "AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_Llm", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight", + "AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_Llm", + "AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral", + "AstNotEqualsOperatorNodeInput", + "AstNotEqualsOperatorNodeInputLeft", + "AstNotEqualsOperatorNodeInputLeft_AndOperator", + "AstNotEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeInputLeft_DynamicVariable", + "AstNotEqualsOperatorNodeInputLeft_EqOperator", + "AstNotEqualsOperatorNodeInputLeft_GtOperator", + "AstNotEqualsOperatorNodeInputLeft_GteOperator", + "AstNotEqualsOperatorNodeInputLeft_Llm", + "AstNotEqualsOperatorNodeInputLeft_LtOperator", + "AstNotEqualsOperatorNodeInputLeft_LteOperator", + "AstNotEqualsOperatorNodeInputLeft_NeqOperator", + "AstNotEqualsOperatorNodeInputLeft_NumberLiteral", + "AstNotEqualsOperatorNodeInputLeft_OrOperator", + "AstNotEqualsOperatorNodeInputLeft_StringLiteral", + "AstNotEqualsOperatorNodeInputRight", + "AstNotEqualsOperatorNodeInputRight_AndOperator", + "AstNotEqualsOperatorNodeInputRight_BooleanLiteral", + "AstNotEqualsOperatorNodeInputRight_DynamicVariable", + "AstNotEqualsOperatorNodeInputRight_EqOperator", + "AstNotEqualsOperatorNodeInputRight_GtOperator", + "AstNotEqualsOperatorNodeInputRight_GteOperator", + "AstNotEqualsOperatorNodeInputRight_Llm", + "AstNotEqualsOperatorNodeInputRight_LtOperator", + "AstNotEqualsOperatorNodeInputRight_LteOperator", + "AstNotEqualsOperatorNodeInputRight_NeqOperator", + "AstNotEqualsOperatorNodeInputRight_NumberLiteral", + "AstNotEqualsOperatorNodeInputRight_OrOperator", + "AstNotEqualsOperatorNodeInputRight_StringLiteral", + "AstNotEqualsOperatorNodeOutput", + "AstNotEqualsOperatorNodeOutputLeft", + "AstNotEqualsOperatorNodeOutputLeft_AndOperator", + "AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstNotEqualsOperatorNodeOutputLeft_EqOperator", + "AstNotEqualsOperatorNodeOutputLeft_GtOperator", + "AstNotEqualsOperatorNodeOutputLeft_GteOperator", + "AstNotEqualsOperatorNodeOutputLeft_Llm", + "AstNotEqualsOperatorNodeOutputLeft_LtOperator", + "AstNotEqualsOperatorNodeOutputLeft_LteOperator", + "AstNotEqualsOperatorNodeOutputLeft_NeqOperator", + "AstNotEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstNotEqualsOperatorNodeOutputLeft_OrOperator", + "AstNotEqualsOperatorNodeOutputLeft_StringLiteral", + "AstNotEqualsOperatorNodeOutputRight", + "AstNotEqualsOperatorNodeOutputRight_AndOperator", + "AstNotEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstNotEqualsOperatorNodeOutputRight_DynamicVariable", + "AstNotEqualsOperatorNodeOutputRight_EqOperator", + "AstNotEqualsOperatorNodeOutputRight_GtOperator", + "AstNotEqualsOperatorNodeOutputRight_GteOperator", + "AstNotEqualsOperatorNodeOutputRight_Llm", + "AstNotEqualsOperatorNodeOutputRight_LtOperator", + "AstNotEqualsOperatorNodeOutputRight_LteOperator", + "AstNotEqualsOperatorNodeOutputRight_NeqOperator", + "AstNotEqualsOperatorNodeOutputRight_NumberLiteral", + "AstNotEqualsOperatorNodeOutputRight_OrOperator", + "AstNotEqualsOperatorNodeOutputRight_StringLiteral", + "AstNumberNodeInput", + "AstNumberNodeOutput", + "AstOrOperatorNodeInput", + "AstOrOperatorNodeInputChildrenItem", + "AstOrOperatorNodeInputChildrenItem_AndOperator", + "AstOrOperatorNodeInputChildrenItem_BooleanLiteral", + "AstOrOperatorNodeInputChildrenItem_DynamicVariable", + "AstOrOperatorNodeInputChildrenItem_EqOperator", + "AstOrOperatorNodeInputChildrenItem_GtOperator", + "AstOrOperatorNodeInputChildrenItem_GteOperator", + "AstOrOperatorNodeInputChildrenItem_Llm", + "AstOrOperatorNodeInputChildrenItem_LtOperator", + "AstOrOperatorNodeInputChildrenItem_LteOperator", + "AstOrOperatorNodeInputChildrenItem_NeqOperator", + "AstOrOperatorNodeInputChildrenItem_NumberLiteral", + "AstOrOperatorNodeInputChildrenItem_OrOperator", + "AstOrOperatorNodeInputChildrenItem_StringLiteral", + "AstOrOperatorNodeOutput", + "AstOrOperatorNodeOutputChildrenItem", + "AstOrOperatorNodeOutputChildrenItem_AndOperator", + "AstOrOperatorNodeOutputChildrenItem_BooleanLiteral", + "AstOrOperatorNodeOutputChildrenItem_DynamicVariable", + "AstOrOperatorNodeOutputChildrenItem_EqOperator", + "AstOrOperatorNodeOutputChildrenItem_GtOperator", + "AstOrOperatorNodeOutputChildrenItem_GteOperator", + "AstOrOperatorNodeOutputChildrenItem_Llm", + "AstOrOperatorNodeOutputChildrenItem_LtOperator", + "AstOrOperatorNodeOutputChildrenItem_LteOperator", + "AstOrOperatorNodeOutputChildrenItem_NeqOperator", + "AstOrOperatorNodeOutputChildrenItem_NumberLiteral", + "AstOrOperatorNodeOutputChildrenItem_OrOperator", + "AstOrOperatorNodeOutputChildrenItem_StringLiteral", + "AstStringNodeInput", + "AstStringNodeOutput", + "AstllmNodeInput", + "AstllmNodeOutput", + "AsyncConversationMetadata", + "AsyncConversationMetadataDeliveryStatus", "AsyncElevenLabs", "AttachedTestModel", "AudioIsolationConvertRequestFileFormat", @@ -2649,6 +3482,9 @@ def __dir__(): "AuthConnectionLocator", "AuthSettings", "AuthorizationMethod", + "BackupLlmDefault", + "BackupLlmDisabled", + "BackupLlmOverride", "BadRequestError", "BadRequestErrorBody", "BanReasonType", @@ -2681,7 +3517,8 @@ def __dir__(): "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", - "BuiltInToolsWorkflowOverride", + "BuiltInToolsWorkflowOverrideInput", + "BuiltInToolsWorkflowOverrideOutput", "CaptionStyleCharacterAnimationModel", "CaptionStyleCharacterAnimationModelEnterType", "CaptionStyleCharacterAnimationModelExitType", @@ -2757,6 +3594,9 @@ def __dir__(): "ConversationHistoryEvaluationCriteriaResultCommonModel", "ConversationHistoryFeedbackCommonModel", "ConversationHistoryMetadataCommonModel", + "ConversationHistoryMetadataCommonModelInitiationTrigger", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Default", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk", "ConversationHistoryMetadataCommonModelPhoneCall", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio", @@ -2823,7 +3663,8 @@ def __dir__(): "ConversationTokenPurpose", "ConversationTurnMetrics", "ConversationalConfig", - "ConversationalConfigApiModelWorkflowOverride", + "ConversationalConfigApiModelWorkflowOverrideInput", + "ConversationalConfigApiModelWorkflowOverrideOutput", "ConvertChapterResponseModel", "ConvertProjectResponseModel", "CreateAgentResponseModel", @@ -2841,6 +3682,7 @@ def __dir__(): "DashboardCriteriaChartModel", "DashboardDataCollectionChartModel", "DataCollectionResultCommonModel", + "DefaultConversationInitiationTrigger", "DeleteChapterRequest", "DeleteChapterResponseModel", "DeleteDubbingResponseModel", @@ -3109,7 +3951,8 @@ def __dir__(): "PodcastProjectResponseModel", "PodcastTextSource", "PodcastUrlSource", - "Position", + "PositionInput", + "PositionOutput", "PostAgentAvatarResponseModel", "PostWorkspaceSecretResponseModel", "PrivacyConfig", @@ -3119,12 +3962,14 @@ def __dir__(): "ProjectExtendedResponse", "ProjectExtendedResponseModelAccessLevel", "ProjectExtendedResponseModelApplyTextNormalization", + "ProjectExtendedResponseModelAspectRatio", "ProjectExtendedResponseModelFiction", "ProjectExtendedResponseModelQualityPreset", "ProjectExtendedResponseModelSourceType", "ProjectExtendedResponseModelTargetAudience", "ProjectResponse", "ProjectResponseModelAccessLevel", + "ProjectResponseModelAspectRatio", "ProjectResponseModelFiction", "ProjectResponseModelSourceType", "ProjectResponseModelTargetAudience", @@ -3134,12 +3979,20 @@ def __dir__(): "ProjectState", "PromptAgent", "PromptAgentApiModelInput", + "PromptAgentApiModelInputBackupLlmConfig", + "PromptAgentApiModelInputBackupLlmConfig_Default", + "PromptAgentApiModelInputBackupLlmConfig_Disabled", + "PromptAgentApiModelInputBackupLlmConfig_Override", "PromptAgentApiModelInputToolsItem", "PromptAgentApiModelInputToolsItem_Client", "PromptAgentApiModelInputToolsItem_Mcp", "PromptAgentApiModelInputToolsItem_System", "PromptAgentApiModelInputToolsItem_Webhook", "PromptAgentApiModelOutput", + "PromptAgentApiModelOutputBackupLlmConfig", + "PromptAgentApiModelOutputBackupLlmConfig_Default", + "PromptAgentApiModelOutputBackupLlmConfig_Disabled", + "PromptAgentApiModelOutputBackupLlmConfig_Override", "PromptAgentApiModelOutputToolsItem", "PromptAgentApiModelOutputToolsItem_Client", "PromptAgentApiModelOutputToolsItem_Mcp", @@ -3147,12 +4000,20 @@ def __dir__(): "PromptAgentApiModelOutputToolsItem_Webhook", "PromptAgentApiModelOverride", "PromptAgentApiModelOverrideConfig", - "PromptAgentApiModelWorkflowOverride", - "PromptAgentApiModelWorkflowOverrideToolsItem", - "PromptAgentApiModelWorkflowOverrideToolsItem_Client", - "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp", - "PromptAgentApiModelWorkflowOverrideToolsItem_System", - "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook", + "PromptAgentApiModelWorkflowOverrideInput", + "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig", + "PromptAgentApiModelWorkflowOverrideInputToolsItem", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_System", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook", + "PromptAgentApiModelWorkflowOverrideOutput", + "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook", "PromptAgentDbModel", "PromptEvaluationCriteria", "PronunciationDictionariesCreateFromFileRequestWorkspaceAccess", @@ -3201,6 +4062,7 @@ def __dir__(): "SafetyRule", "SaveVoicePreviewRequest", "SecretDependencyType", + "SectionSource", "SegmentCreateResponse", "SegmentDeleteResponse", "SegmentDubResponse", @@ -3310,6 +4172,7 @@ def __dir__(): "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", "TextToVoiceRemixRequestOutputFormat", + "TimeRange", "TokenResponseModel", "TooEarlyError", "Tool", @@ -3343,7 +4206,8 @@ def __dir__(): "TtsConversationalConfigOutput", "TtsConversationalConfigOverride", "TtsConversationalConfigOverrideConfig", - "TtsConversationalConfigWorkflowOverride", + "TtsConversationalConfigWorkflowOverrideInput", + "TtsConversationalConfigWorkflowOverrideOutput", "TtsConversationalModel", "TtsModelFamily", "TtsOptimizeStreamingLatency", @@ -3354,6 +4218,8 @@ def __dir__(): "TwilioOutboundCallResponse", "TxtExportOptions", "UnauthorizedError", + "UnitTestCommonModel", + "UnitTestCommonModelDynamicVariablesValue", "UnitTestCommonModelType", "UnitTestRunResponseModel", "UnitTestSummaryResponseModel", @@ -3406,6 +4272,7 @@ def __dir__(): "VoicemailDetectionToolConfig", "VoicesGetSharedRequestCategory", "WebhookAuthMethodType", + "WebhookEventType", "WebhookToolApiSchemaConfigInput", "WebhookToolApiSchemaConfigInputMethod", "WebhookToolApiSchemaConfigInputRequestHeadersValue", @@ -3417,6 +4284,18 @@ def __dir__(): "WebhookUsageType", "WebsocketTtsClientMessageMulti", "WebsocketTtsServerMessageMulti", + "WhatsAppBusinessAccount", + "WhatsAppBusinessAccountChangesItem", + "WhatsAppBusinessAccountChangesItem_Calls", + "WhatsAppBusinessAccountChangesItem_Messages", + "WhatsAppCall", + "WhatsAppCallDirection", + "WhatsAppCalls", + "WhatsAppChangeCalls", + "WhatsAppChangeMessages", + "WhatsAppEventRequest", + "WhatsAppMetadata", + "WhatsAppSession", "WidgetConfig", "WidgetConfigInputAvatar", "WidgetConfigInputAvatar_Image", @@ -3438,43 +4317,79 @@ def __dir__(): "WidgetPlacement", "WidgetStyles", "WidgetTextContents", - "WorkflowEdgeModel", - "WorkflowEdgeModelBackwardCondition", - "WorkflowEdgeModelBackwardCondition_Expression", - "WorkflowEdgeModelBackwardCondition_Llm", - "WorkflowEdgeModelBackwardCondition_Result", - "WorkflowEdgeModelBackwardCondition_Unconditional", - "WorkflowEdgeModelForwardCondition", - "WorkflowEdgeModelForwardCondition_Expression", - "WorkflowEdgeModelForwardCondition_Llm", - "WorkflowEdgeModelForwardCondition_Result", - "WorkflowEdgeModelForwardCondition_Unconditional", - "WorkflowEndNodeModel", - "WorkflowExpressionConditionModel", - "WorkflowExpressionConditionModelExpression", - "WorkflowExpressionConditionModelExpression_AndOperator", - "WorkflowExpressionConditionModelExpression_BooleanLiteral", - "WorkflowExpressionConditionModelExpression_DynamicVariable", - "WorkflowExpressionConditionModelExpression_EqOperator", - "WorkflowExpressionConditionModelExpression_GtOperator", - "WorkflowExpressionConditionModelExpression_GteOperator", - "WorkflowExpressionConditionModelExpression_Llm", - "WorkflowExpressionConditionModelExpression_LtOperator", - "WorkflowExpressionConditionModelExpression_LteOperator", - "WorkflowExpressionConditionModelExpression_NeqOperator", - "WorkflowExpressionConditionModelExpression_NumberLiteral", - "WorkflowExpressionConditionModelExpression_OrOperator", - "WorkflowExpressionConditionModelExpression_StringLiteral", + "WorkflowEdgeModelInput", + "WorkflowEdgeModelInputBackwardCondition", + "WorkflowEdgeModelInputBackwardCondition_Expression", + "WorkflowEdgeModelInputBackwardCondition_Llm", + "WorkflowEdgeModelInputBackwardCondition_Result", + "WorkflowEdgeModelInputBackwardCondition_Unconditional", + "WorkflowEdgeModelInputForwardCondition", + "WorkflowEdgeModelInputForwardCondition_Expression", + "WorkflowEdgeModelInputForwardCondition_Llm", + "WorkflowEdgeModelInputForwardCondition_Result", + "WorkflowEdgeModelInputForwardCondition_Unconditional", + "WorkflowEdgeModelOutput", + "WorkflowEdgeModelOutputBackwardCondition", + "WorkflowEdgeModelOutputBackwardCondition_Expression", + "WorkflowEdgeModelOutputBackwardCondition_Llm", + "WorkflowEdgeModelOutputBackwardCondition_Result", + "WorkflowEdgeModelOutputBackwardCondition_Unconditional", + "WorkflowEdgeModelOutputForwardCondition", + "WorkflowEdgeModelOutputForwardCondition_Expression", + "WorkflowEdgeModelOutputForwardCondition_Llm", + "WorkflowEdgeModelOutputForwardCondition_Result", + "WorkflowEdgeModelOutputForwardCondition_Unconditional", + "WorkflowEndNodeModelInput", + "WorkflowEndNodeModelOutput", + "WorkflowExpressionConditionModelInput", + "WorkflowExpressionConditionModelInputExpression", + "WorkflowExpressionConditionModelInputExpression_AndOperator", + "WorkflowExpressionConditionModelInputExpression_BooleanLiteral", + "WorkflowExpressionConditionModelInputExpression_DynamicVariable", + "WorkflowExpressionConditionModelInputExpression_EqOperator", + "WorkflowExpressionConditionModelInputExpression_GtOperator", + "WorkflowExpressionConditionModelInputExpression_GteOperator", + "WorkflowExpressionConditionModelInputExpression_Llm", + "WorkflowExpressionConditionModelInputExpression_LtOperator", + "WorkflowExpressionConditionModelInputExpression_LteOperator", + "WorkflowExpressionConditionModelInputExpression_NeqOperator", + "WorkflowExpressionConditionModelInputExpression_NumberLiteral", + "WorkflowExpressionConditionModelInputExpression_OrOperator", + "WorkflowExpressionConditionModelInputExpression_StringLiteral", + "WorkflowExpressionConditionModelOutput", + "WorkflowExpressionConditionModelOutputExpression", + "WorkflowExpressionConditionModelOutputExpression_AndOperator", + "WorkflowExpressionConditionModelOutputExpression_BooleanLiteral", + "WorkflowExpressionConditionModelOutputExpression_DynamicVariable", + "WorkflowExpressionConditionModelOutputExpression_EqOperator", + "WorkflowExpressionConditionModelOutputExpression_GtOperator", + "WorkflowExpressionConditionModelOutputExpression_GteOperator", + "WorkflowExpressionConditionModelOutputExpression_Llm", + "WorkflowExpressionConditionModelOutputExpression_LtOperator", + "WorkflowExpressionConditionModelOutputExpression_LteOperator", + "WorkflowExpressionConditionModelOutputExpression_NeqOperator", + "WorkflowExpressionConditionModelOutputExpression_NumberLiteral", + "WorkflowExpressionConditionModelOutputExpression_OrOperator", + "WorkflowExpressionConditionModelOutputExpression_StringLiteral", "WorkflowFeaturesUsageCommonModel", - "WorkflowLlmConditionModel", - "WorkflowOverrideAgentNodeModel", - "WorkflowPhoneNumberNodeModel", - "WorkflowPhoneNumberNodeModelTransferDestination", - "WorkflowPhoneNumberNodeModelTransferDestination_Phone", - "WorkflowPhoneNumberNodeModelTransferDestination_SipUri", - "WorkflowResultConditionModel", - "WorkflowStandaloneAgentNodeModel", - "WorkflowStartNodeModel", + "WorkflowLlmConditionModelInput", + "WorkflowLlmConditionModelOutput", + "WorkflowOverrideAgentNodeModelInput", + "WorkflowOverrideAgentNodeModelOutput", + "WorkflowPhoneNumberNodeModelInput", + "WorkflowPhoneNumberNodeModelInputTransferDestination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelOutput", + "WorkflowPhoneNumberNodeModelOutputTransferDestination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri", + "WorkflowResultConditionModelInput", + "WorkflowResultConditionModelOutput", + "WorkflowStandaloneAgentNodeModelInput", + "WorkflowStandaloneAgentNodeModelOutput", + "WorkflowStartNodeModelInput", + "WorkflowStartNodeModelOutput", "WorkflowToolEdgeStepModel", "WorkflowToolLocator", "WorkflowToolMaxIterationsExceededStepModel", @@ -3482,7 +4397,8 @@ def __dir__(): "WorkflowToolNestedToolsStepModelInputResultsItem", "WorkflowToolNestedToolsStepModelOutput", "WorkflowToolNestedToolsStepModelOutputResultsItem", - "WorkflowToolNodeModel", + "WorkflowToolNodeModelInput", + "WorkflowToolNodeModelOutput", "WorkflowToolResponseModelInput", "WorkflowToolResponseModelInputStepsItem", "WorkflowToolResponseModelInputStepsItem_Edge", @@ -3493,7 +4409,8 @@ def __dir__(): "WorkflowToolResponseModelOutputStepsItem_Edge", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", "WorkflowToolResponseModelOutputStepsItem_NestedTools", - "WorkflowUnconditionalModel", + "WorkflowUnconditionalModelInput", + "WorkflowUnconditionalModelOutput", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", @@ -3506,6 +4423,7 @@ def __dir__(): "WorkspaceWebhookListResponseModel", "WorkspaceWebhookResponseModel", "WorkspaceWebhookUsageResponseModel", + "ZendeskConversationInitiationTrigger", "__version__", "audio_isolation", "audio_native", diff --git a/src/elevenlabs/audio_isolation/client.py b/src/elevenlabs/audio_isolation/client.py index 3773c0ee..ece1d714 100644 --- a/src/elevenlabs/audio_isolation/client.py +++ b/src/elevenlabs/audio_isolation/client.py @@ -33,6 +33,7 @@ def convert( *, audio: core.File, file_format: typing.Optional[AudioIsolationConvertRequestFileFormat] = OMIT, + preview_b_64: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -46,6 +47,9 @@ def convert( file_format : typing.Optional[AudioIsolationConvertRequestFileFormat] The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + preview_b_64 : typing.Optional[str] + Optional preview image base64 for tracking this generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -54,7 +58,9 @@ def convert( typing.Iterator[bytes] Successful Response """ - with self._raw_client.convert(audio=audio, file_format=file_format, request_options=request_options) as r: + with self._raw_client.convert( + audio=audio, file_format=file_format, preview_b_64=preview_b_64, request_options=request_options + ) as r: yield from r.data def stream( @@ -107,6 +113,7 @@ async def convert( *, audio: core.File, file_format: typing.Optional[AudioIsolationConvertRequestFileFormat] = OMIT, + preview_b_64: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -120,6 +127,9 @@ async def convert( file_format : typing.Optional[AudioIsolationConvertRequestFileFormat] The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + preview_b_64 : typing.Optional[str] + Optional preview image base64 for tracking this generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -128,7 +138,9 @@ async def convert( typing.AsyncIterator[bytes] Successful Response """ - async with self._raw_client.convert(audio=audio, file_format=file_format, request_options=request_options) as r: + async with self._raw_client.convert( + audio=audio, file_format=file_format, preview_b_64=preview_b_64, request_options=request_options + ) as r: async for _chunk in r.data: yield _chunk diff --git a/src/elevenlabs/audio_isolation/raw_client.py b/src/elevenlabs/audio_isolation/raw_client.py index 515f9feb..881bd53d 100644 --- a/src/elevenlabs/audio_isolation/raw_client.py +++ b/src/elevenlabs/audio_isolation/raw_client.py @@ -29,6 +29,7 @@ def convert( *, audio: core.File, file_format: typing.Optional[AudioIsolationConvertRequestFileFormat] = OMIT, + preview_b_64: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -42,6 +43,9 @@ def convert( file_format : typing.Optional[AudioIsolationConvertRequestFileFormat] The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + preview_b_64 : typing.Optional[str] + Optional preview image base64 for tracking this generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -55,6 +59,7 @@ def convert( method="POST", data={ "file_format": file_format, + "preview_b64": preview_b_64, }, files={ "audio": audio, @@ -172,6 +177,7 @@ async def convert( *, audio: core.File, file_format: typing.Optional[AudioIsolationConvertRequestFileFormat] = OMIT, + preview_b_64: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -185,6 +191,9 @@ async def convert( file_format : typing.Optional[AudioIsolationConvertRequestFileFormat] The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + preview_b_64 : typing.Optional[str] + Optional preview image base64 for tracking this generation. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -198,6 +207,7 @@ async def convert( method="POST", data={ "file_format": file_format, + "preview_b64": preview_b_64, }, files={ "audio": audio, diff --git a/src/elevenlabs/audio_native/client.py b/src/elevenlabs/audio_native/client.py index 6e6ffb8d..320144b5 100644 --- a/src/elevenlabs/audio_native/client.py +++ b/src/elevenlabs/audio_native/client.py @@ -46,6 +46,7 @@ def create( file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, + pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioNativeCreateProjectResponseModel: """ @@ -97,6 +98,9 @@ def create( with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + pronunciation_dictionary_locators : typing.Optional[typing.List[str]] + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -130,6 +134,7 @@ def create( file=file, auto_convert=auto_convert, apply_text_normalization=apply_text_normalization, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, request_options=request_options, ) return _response.data @@ -249,6 +254,7 @@ async def create( file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, + pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioNativeCreateProjectResponseModel: """ @@ -300,6 +306,9 @@ async def create( with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + pronunciation_dictionary_locators : typing.Optional[typing.List[str]] + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -341,6 +350,7 @@ async def main() -> None: file=file, auto_convert=auto_convert, apply_text_normalization=apply_text_normalization, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/audio_native/raw_client.py b/src/elevenlabs/audio_native/raw_client.py index f19844b6..1775b80e 100644 --- a/src/elevenlabs/audio_native/raw_client.py +++ b/src/elevenlabs/audio_native/raw_client.py @@ -41,6 +41,7 @@ def create( file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, + pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AudioNativeCreateProjectResponseModel]: """ @@ -92,6 +93,9 @@ def create( with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + pronunciation_dictionary_locators : typing.Optional[typing.List[str]] + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -116,6 +120,7 @@ def create( "model_id": model_id, "auto_convert": auto_convert, "apply_text_normalization": apply_text_normalization, + "pronunciation_dictionary_locators": pronunciation_dictionary_locators, }, files={ **({"file": file} if file is not None else {}), @@ -295,6 +300,7 @@ async def create( file: typing.Optional[core.File] = OMIT, auto_convert: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[AudioNativeCreateRequestApplyTextNormalization] = OMIT, + pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AudioNativeCreateProjectResponseModel]: """ @@ -346,6 +352,9 @@ async def create( with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + pronunciation_dictionary_locators : typing.Optional[typing.List[str]] + A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -370,6 +379,7 @@ async def create( "model_id": model_id, "auto_convert": auto_convert, "apply_text_normalization": apply_text_normalization, + "pronunciation_dictionary_locators": pronunciation_dictionary_locators, }, files={ **({"file": file} if file is not None else {}), diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index afa69350..5535c66e 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -10,6 +10,7 @@ from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel from ...types.agent_sort_by import AgentSortBy +from ...types.agent_workflow_request_model import AgentWorkflowRequestModel from ...types.conversation_simulation_specification import ConversationSimulationSpecification from ...types.conversational_config import ConversationalConfig from ...types.create_agent_response_model import CreateAgentResponseModel @@ -55,7 +56,7 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -71,7 +72,8 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -108,7 +110,13 @@ def create( ) return _response.data - def get(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetAgentResponseModel: + def get( + self, + agent_id: str, + *, + version_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetAgentResponseModel: """ Retrieve config for an agent @@ -117,6 +125,9 @@ def get(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] agent_id : str The id of an agent. This is returned on agent creation. + version_id : typing.Optional[str] + The ID of the agent version to use + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -133,10 +144,11 @@ def get(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.conversational_ai.agents.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + version_id="version_id", ) """ - _response = self._raw_client.get(agent_id, request_options=request_options) + _response = self._raw_client.get(agent_id, version_id=version_id, request_options=request_options) return _response.data def delete(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: @@ -163,7 +175,7 @@ def delete(self, agent_id: str, *, request_options: typing.Optional[RequestOptio api_key="YOUR_API_KEY", ) client.conversational_ai.agents.delete( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) """ _response = self._raw_client.delete(agent_id, request_options=request_options) @@ -175,7 +187,7 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -194,7 +206,8 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -218,7 +231,7 @@ def update( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.update( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) """ _response = self._raw_client.update( @@ -329,7 +342,7 @@ def duplicate( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.duplicate( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) """ _response = self._raw_client.duplicate(agent_id, name=name, request_options=request_options) @@ -381,7 +394,7 @@ def simulate_conversation( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.simulate_conversation( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -445,7 +458,7 @@ def simulate_conversation_stream( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.simulate_conversation_stream( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -502,7 +515,7 @@ def run_tests( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.run_tests( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", tests=[ SingleTestRunRequestModel( test_id="test_id", @@ -573,7 +586,7 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -589,7 +602,8 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -635,7 +649,11 @@ async def main() -> None: return _response.data async def get( - self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + agent_id: str, + *, + version_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> GetAgentResponseModel: """ Retrieve config for an agent @@ -645,6 +663,9 @@ async def get( agent_id : str The id of an agent. This is returned on agent creation. + version_id : typing.Optional[str] + The ID of the agent version to use + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -666,13 +687,14 @@ async def get( async def main() -> None: await client.conversational_ai.agents.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + version_id="version_id", ) asyncio.run(main()) """ - _response = await self._raw_client.get(agent_id, request_options=request_options) + _response = await self._raw_client.get(agent_id, version_id=version_id, request_options=request_options) return _response.data async def delete(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: @@ -704,7 +726,7 @@ async def delete(self, agent_id: str, *, request_options: typing.Optional[Reques async def main() -> None: await client.conversational_ai.agents.delete( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) @@ -719,7 +741,7 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -738,7 +760,8 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -767,7 +790,7 @@ async def update( async def main() -> None: await client.conversational_ai.agents.update( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) @@ -894,7 +917,7 @@ async def duplicate( async def main() -> None: await client.conversational_ai.agents.duplicate( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) @@ -954,7 +977,7 @@ async def simulate_conversation( async def main() -> None: await client.conversational_ai.agents.simulate_conversation( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -1026,7 +1049,7 @@ async def simulate_conversation_stream( async def main() -> None: await client.conversational_ai.agents.simulate_conversation_stream( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", simulation_specification=ConversationSimulationSpecification( simulated_user_config=AgentConfig( first_message="Hello, how can I help you today?", @@ -1091,7 +1114,7 @@ async def run_tests( async def main() -> None: await client.conversational_ai.agents.run_tests( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", tests=[ SingleTestRunRequestModel( test_id="test_id", diff --git a/src/elevenlabs/conversational_ai/agents/link/client.py b/src/elevenlabs/conversational_ai/agents/link/client.py index 284f56b9..58cb2c56 100644 --- a/src/elevenlabs/conversational_ai/agents/link/client.py +++ b/src/elevenlabs/conversational_ai/agents/link/client.py @@ -50,7 +50,7 @@ def get( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.link.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) """ _response = self._raw_client.get(agent_id, request_options=request_options) @@ -104,7 +104,7 @@ async def get( async def main() -> None: await client.conversational_ai.agents.link.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index cd649e1f..7be38754 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -15,6 +15,7 @@ from ...types.agent_platform_settings_request_model import AgentPlatformSettingsRequestModel from ...types.agent_simulated_chat_test_response_model import AgentSimulatedChatTestResponseModel from ...types.agent_sort_by import AgentSortBy +from ...types.agent_workflow_request_model import AgentWorkflowRequestModel from ...types.conversation_simulation_specification import ConversationSimulationSpecification from ...types.conversational_config import ConversationalConfig from ...types.create_agent_response_model import CreateAgentResponseModel @@ -39,7 +40,7 @@ def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -55,7 +56,8 @@ def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -81,7 +83,9 @@ def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=AgentWorkflowRequestModel, direction="write" + ), "name": name, "tags": tags, }, @@ -118,7 +122,11 @@ def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def get( - self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + agent_id: str, + *, + version_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetAgentResponseModel]: """ Retrieve config for an agent @@ -128,6 +136,9 @@ def get( agent_id : str The id of an agent. This is returned on agent creation. + version_id : typing.Optional[str] + The ID of the agent version to use + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -139,6 +150,9 @@ def get( _response = self._client_wrapper.httpx_client.request( f"v1/convai/agents/{jsonable_encoder(agent_id)}", method="GET", + params={ + "version_id": version_id, + }, request_options=request_options, ) try: @@ -213,7 +227,7 @@ def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -232,7 +246,8 @@ def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -258,7 +273,9 @@ def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=AgentWorkflowRequestModel, direction="write" + ), "name": name, "tags": tags, }, @@ -671,7 +688,7 @@ async def create( *, conversation_config: ConversationalConfig, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -687,7 +704,8 @@ async def create( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -713,7 +731,9 @@ async def create( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=AgentWorkflowRequestModel, direction="write" + ), "name": name, "tags": tags, }, @@ -750,7 +770,11 @@ async def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def get( - self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, + agent_id: str, + *, + version_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetAgentResponseModel]: """ Retrieve config for an agent @@ -760,6 +784,9 @@ async def get( agent_id : str The id of an agent. This is returned on agent creation. + version_id : typing.Optional[str] + The ID of the agent version to use + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -771,6 +798,9 @@ async def get( _response = await self._client_wrapper.httpx_client.request( f"v1/convai/agents/{jsonable_encoder(agent_id)}", method="GET", + params={ + "version_id": version_id, + }, request_options=request_options, ) try: @@ -847,7 +877,7 @@ async def update( *, conversation_config: typing.Optional[ConversationalConfig] = OMIT, platform_settings: typing.Optional[AgentPlatformSettingsRequestModel] = OMIT, - workflow: typing.Optional[typing.Optional[typing.Any]] = OMIT, + workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT, name: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -866,7 +896,8 @@ async def update( platform_settings : typing.Optional[AgentPlatformSettingsRequestModel] Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. - workflow : typing.Optional[typing.Optional[typing.Any]] + workflow : typing.Optional[AgentWorkflowRequestModel] + Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. name : typing.Optional[str] A name to make the agent easier to find @@ -892,7 +923,9 @@ async def update( "platform_settings": convert_and_respect_annotation_metadata( object_=platform_settings, annotation=AgentPlatformSettingsRequestModel, direction="write" ), - "workflow": workflow, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=AgentWorkflowRequestModel, direction="write" + ), "name": name, "tags": tags, }, diff --git a/src/elevenlabs/conversational_ai/agents/widget/avatar/client.py b/src/elevenlabs/conversational_ai/agents/widget/avatar/client.py index 239f14f2..576afab5 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/avatar/client.py +++ b/src/elevenlabs/conversational_ai/agents/widget/avatar/client.py @@ -57,7 +57,7 @@ def create( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.widget.avatar.create( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) """ _response = self._raw_client.create(agent_id, avatar_file=avatar_file, request_options=request_options) @@ -114,7 +114,7 @@ async def create( async def main() -> None: await client.conversational_ai.agents.widget.avatar.create( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", ) diff --git a/src/elevenlabs/conversational_ai/agents/widget/client.py b/src/elevenlabs/conversational_ai/agents/widget/client.py index 3ef8190d..9520df39 100644 --- a/src/elevenlabs/conversational_ai/agents/widget/client.py +++ b/src/elevenlabs/conversational_ai/agents/widget/client.py @@ -64,7 +64,7 @@ def get( api_key="YOUR_API_KEY", ) client.conversational_ai.agents.widget.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", conversation_signature="conversation_signature", ) """ @@ -138,7 +138,7 @@ async def get( async def main() -> None: await client.conversational_ai.agents.widget.get( - agent_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", conversation_signature="conversation_signature", ) diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 379e9039..2d58cd04 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.17.0", + "User-Agent": "elevenlabs/v2.18.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.17.0", + "X-Fern-SDK-Version": "v2.18.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 6ddc182b..201d425b 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -115,10 +115,10 @@ def list( def create( self, *, - file: typing.Optional[core.File] = OMIT, - csv_file: typing.Optional[core.File] = OMIT, - foreground_audio_file: typing.Optional[core.File] = OMIT, - background_audio_file: typing.Optional[core.File] = OMIT, + file: core.File, + csv_file: core.File, + foreground_audio_file: core.File, + background_audio_file: core.File, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -142,16 +142,16 @@ def create( Parameters ---------- - file : typing.Optional[core.File] + file : core.File See core.File for more documentation - csv_file : typing.Optional[core.File] + csv_file : core.File See core.File for more documentation - foreground_audio_file : typing.Optional[core.File] + foreground_audio_file : core.File See core.File for more documentation - background_audio_file : typing.Optional[core.File] + background_audio_file : core.File See core.File for more documentation name : typing.Optional[str] @@ -433,10 +433,10 @@ async def main() -> None: async def create( self, *, - file: typing.Optional[core.File] = OMIT, - csv_file: typing.Optional[core.File] = OMIT, - foreground_audio_file: typing.Optional[core.File] = OMIT, - background_audio_file: typing.Optional[core.File] = OMIT, + file: core.File, + csv_file: core.File, + foreground_audio_file: core.File, + background_audio_file: core.File, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -460,16 +460,16 @@ async def create( Parameters ---------- - file : typing.Optional[core.File] + file : core.File See core.File for more documentation - csv_file : typing.Optional[core.File] + csv_file : core.File See core.File for more documentation - foreground_audio_file : typing.Optional[core.File] + foreground_audio_file : core.File See core.File for more documentation - background_audio_file : typing.Optional[core.File] + background_audio_file : core.File See core.File for more documentation name : typing.Optional[str] diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index 8ec00b48..2cd8b336 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -113,10 +113,10 @@ def list( def create( self, *, - file: typing.Optional[core.File] = OMIT, - csv_file: typing.Optional[core.File] = OMIT, - foreground_audio_file: typing.Optional[core.File] = OMIT, - background_audio_file: typing.Optional[core.File] = OMIT, + file: core.File, + csv_file: core.File, + foreground_audio_file: core.File, + background_audio_file: core.File, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -140,16 +140,16 @@ def create( Parameters ---------- - file : typing.Optional[core.File] + file : core.File See core.File for more documentation - csv_file : typing.Optional[core.File] + csv_file : core.File See core.File for more documentation - foreground_audio_file : typing.Optional[core.File] + foreground_audio_file : core.File See core.File for more documentation - background_audio_file : typing.Optional[core.File] + background_audio_file : core.File See core.File for more documentation name : typing.Optional[str] @@ -230,10 +230,10 @@ def create( "csv_fps": csv_fps, }, files={ - **({"file": file} if file is not None else {}), - **({"csv_file": csv_file} if csv_file is not None else {}), - **({"foreground_audio_file": foreground_audio_file} if foreground_audio_file is not None else {}), - **({"background_audio_file": background_audio_file} if background_audio_file is not None else {}), + "file": file, + "csv_file": csv_file, + "foreground_audio_file": foreground_audio_file, + "background_audio_file": background_audio_file, }, request_options=request_options, omit=OMIT, @@ -454,10 +454,10 @@ async def list( async def create( self, *, - file: typing.Optional[core.File] = OMIT, - csv_file: typing.Optional[core.File] = OMIT, - foreground_audio_file: typing.Optional[core.File] = OMIT, - background_audio_file: typing.Optional[core.File] = OMIT, + file: core.File, + csv_file: core.File, + foreground_audio_file: core.File, + background_audio_file: core.File, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -481,16 +481,16 @@ async def create( Parameters ---------- - file : typing.Optional[core.File] + file : core.File See core.File for more documentation - csv_file : typing.Optional[core.File] + csv_file : core.File See core.File for more documentation - foreground_audio_file : typing.Optional[core.File] + foreground_audio_file : core.File See core.File for more documentation - background_audio_file : typing.Optional[core.File] + background_audio_file : core.File See core.File for more documentation name : typing.Optional[str] @@ -571,10 +571,10 @@ async def create( "csv_fps": csv_fps, }, files={ - **({"file": file} if file is not None else {}), - **({"csv_file": csv_file} if csv_file is not None else {}), - **({"foreground_audio_file": foreground_audio_file} if foreground_audio_file is not None else {}), - **({"background_audio_file": background_audio_file} if background_audio_file is not None else {}), + "file": file, + "csv_file": csv_file, + "foreground_audio_file": foreground_audio_file, + "background_audio_file": background_audio_file, }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index be0c490e..2d1391d6 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -47,6 +47,7 @@ def compose( seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -67,7 +68,7 @@ def compose( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -81,6 +82,9 @@ def compose( respect_sections_durations : typing.Optional[bool] Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -108,6 +112,7 @@ def compose( seed=seed, force_instrumental=force_instrumental, respect_sections_durations=respect_sections_durations, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: yield from r.data @@ -123,6 +128,7 @@ def compose_detailed( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -143,7 +149,7 @@ def compose_detailed( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -154,6 +160,9 @@ def compose_detailed( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -180,6 +189,7 @@ def compose_detailed( model_id=model_id, seed=seed, force_instrumental=force_instrumental, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: yield from r.data @@ -195,6 +205,7 @@ def stream( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -215,7 +226,7 @@ def stream( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -226,6 +237,9 @@ def stream( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -252,6 +266,7 @@ def stream( model_id=model_id, seed=seed, force_instrumental=force_instrumental, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: yield from r.data @@ -294,6 +309,7 @@ async def compose( seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -314,7 +330,7 @@ async def compose( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -328,6 +344,9 @@ async def compose( respect_sections_durations : typing.Optional[bool] Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -363,6 +382,7 @@ async def main() -> None: seed=seed, force_instrumental=force_instrumental, respect_sections_durations=respect_sections_durations, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: async for _chunk in r.data: @@ -379,6 +399,7 @@ async def compose_detailed( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -399,7 +420,7 @@ async def compose_detailed( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -410,6 +431,9 @@ async def compose_detailed( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -444,6 +468,7 @@ async def main() -> None: model_id=model_id, seed=seed, force_instrumental=force_instrumental, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: async for _chunk in r.data: @@ -460,6 +485,7 @@ async def stream( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -480,7 +506,7 @@ async def stream( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -491,6 +517,9 @@ async def stream( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -525,6 +554,7 @@ async def main() -> None: model_id=model_id, seed=seed, force_instrumental=force_instrumental, + store_for_inpainting=store_for_inpainting, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/music/composition_plan/client.py b/src/elevenlabs/music/composition_plan/client.py index e04b6360..a28d3f82 100644 --- a/src/elevenlabs/music/composition_plan/client.py +++ b/src/elevenlabs/music/composition_plan/client.py @@ -44,7 +44,7 @@ def create( A simple text prompt to compose a plan from. music_length_ms : typing.Optional[int] - The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan : typing.Optional[MusicPrompt] An optional composition plan to use as a source for the new composition plan. @@ -114,7 +114,7 @@ async def create( A simple text prompt to compose a plan from. music_length_ms : typing.Optional[int] - The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan : typing.Optional[MusicPrompt] An optional composition plan to use as a source for the new composition plan. diff --git a/src/elevenlabs/music/composition_plan/raw_client.py b/src/elevenlabs/music/composition_plan/raw_client.py index 81831942..a03d007b 100644 --- a/src/elevenlabs/music/composition_plan/raw_client.py +++ b/src/elevenlabs/music/composition_plan/raw_client.py @@ -39,7 +39,7 @@ def create( A simple text prompt to compose a plan from. music_length_ms : typing.Optional[int] - The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan : typing.Optional[MusicPrompt] An optional composition plan to use as a source for the new composition plan. @@ -121,7 +121,7 @@ async def create( A simple text prompt to compose a plan from. music_length_ms : typing.Optional[int] - The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan : typing.Optional[MusicPrompt] An optional composition plan to use as a source for the new composition plan. diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index f7281161..1e5475df 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -38,6 +38,7 @@ def compose( seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -58,7 +59,7 @@ def compose( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -72,6 +73,9 @@ def compose( respect_sections_durations : typing.Optional[bool] Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -99,6 +103,7 @@ def compose( "seed": seed, "force_instrumental": force_instrumental, "respect_sections_durations": respect_sections_durations, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", @@ -147,6 +152,7 @@ def compose_detailed( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -167,7 +173,7 @@ def compose_detailed( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -178,6 +184,9 @@ def compose_detailed( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -204,6 +213,7 @@ def compose_detailed( "model_id": model_id, "seed": seed, "force_instrumental": force_instrumental, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", @@ -252,6 +262,7 @@ def stream( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -272,7 +283,7 @@ def stream( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -283,6 +294,9 @@ def stream( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -309,6 +323,7 @@ def stream( "model_id": model_id, "seed": seed, "force_instrumental": force_instrumental, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", @@ -363,6 +378,7 @@ async def compose( seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -383,7 +399,7 @@ async def compose( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -397,6 +413,9 @@ async def compose( respect_sections_durations : typing.Optional[bool] Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -424,6 +443,7 @@ async def compose( "seed": seed, "force_instrumental": force_instrumental, "respect_sections_durations": respect_sections_durations, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", @@ -473,6 +493,7 @@ async def compose_detailed( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -493,7 +514,7 @@ async def compose_detailed( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -504,6 +525,9 @@ async def compose_detailed( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -530,6 +554,7 @@ async def compose_detailed( "model_id": model_id, "seed": seed, "force_instrumental": force_instrumental, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", @@ -579,6 +604,7 @@ async def stream( model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, + store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -599,7 +625,7 @@ async def stream( A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. music_length_ms : typing.Optional[int] - The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. + The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. @@ -610,6 +636,9 @@ async def stream( force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + store_for_inpainting : typing.Optional[bool] + Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -636,6 +665,7 @@ async def stream( "model_id": model_id, "seed": seed, "force_instrumental": force_instrumental, + "store_for_inpainting": store_for_inpainting, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py b/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py index cbf22684..718cadbc 100644 --- a/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py +++ b/src/elevenlabs/music/types/music_compose_detailed_request_output_format.py @@ -5,6 +5,7 @@ MusicComposeDetailedRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/music/types/music_compose_request_output_format.py b/src/elevenlabs/music/types/music_compose_request_output_format.py index d78ef8b7..3fe776d1 100644 --- a/src/elevenlabs/music/types/music_compose_request_output_format.py +++ b/src/elevenlabs/music/types/music_compose_request_output_format.py @@ -5,6 +5,7 @@ MusicComposeRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/music/types/music_stream_request_output_format.py b/src/elevenlabs/music/types/music_stream_request_output_format.py index 6c251ab5..5467e90a 100644 --- a/src/elevenlabs/music/types/music_stream_request_output_format.py +++ b/src/elevenlabs/music/types/music_stream_request_output_format.py @@ -5,6 +5,7 @@ MusicStreamRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index 279045be..9850a32b 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -51,7 +51,7 @@ def create_from_file( self, *, name: str, - file: typing.Optional[core.File] = OMIT, + file: core.File, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -64,7 +64,7 @@ def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : typing.Optional[core.File] + file : core.File See core.File for more documentation description : typing.Optional[str] @@ -371,7 +371,7 @@ async def create_from_file( self, *, name: str, - file: typing.Optional[core.File] = OMIT, + file: core.File, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -384,7 +384,7 @@ async def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : typing.Optional[core.File] + file : core.File See core.File for more documentation description : typing.Optional[str] diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py index b6edd429..5fbb8435 100644 --- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py @@ -42,7 +42,7 @@ def create_from_file( self, *, name: str, - file: typing.Optional[core.File] = OMIT, + file: core.File, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -55,7 +55,7 @@ def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : typing.Optional[core.File] + file : core.File See core.File for more documentation description : typing.Optional[str] @@ -81,7 +81,7 @@ def create_from_file( "workspace_access": workspace_access, }, files={ - **({"file": file} if file is not None else {}), + "file": file, }, request_options=request_options, omit=OMIT, @@ -454,7 +454,7 @@ async def create_from_file( self, *, name: str, - file: typing.Optional[core.File] = OMIT, + file: core.File, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -467,7 +467,7 @@ async def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : typing.Optional[core.File] + file : core.File See core.File for more documentation description : typing.Optional[str] @@ -493,7 +493,7 @@ async def create_from_file( "workspace_access": workspace_access, }, files={ - **({"file": file} if file is not None else {}), + "file": file, }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/speech_to_speech/types/speech_to_speech_convert_request_output_format.py b/src/elevenlabs/speech_to_speech/types/speech_to_speech_convert_request_output_format.py index 731fb0bc..70dc758f 100644 --- a/src/elevenlabs/speech_to_speech/types/speech_to_speech_convert_request_output_format.py +++ b/src/elevenlabs/speech_to_speech/types/speech_to_speech_convert_request_output_format.py @@ -5,6 +5,7 @@ SpeechToSpeechConvertRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/speech_to_speech/types/speech_to_speech_stream_request_output_format.py b/src/elevenlabs/speech_to_speech/types/speech_to_speech_stream_request_output_format.py index d33152de..c8da31f8 100644 --- a/src/elevenlabs/speech_to_speech/types/speech_to_speech_stream_request_output_format.py +++ b/src/elevenlabs/speech_to_speech/types/speech_to_speech_stream_request_output_format.py @@ -5,6 +5,7 @@ SpeechToSpeechStreamRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index 7f06d38e..10f5bf26 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -41,8 +41,8 @@ def convert( self, *, model_id: str, + file: core.File, enable_logging: typing.Optional[bool] = None, - file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -68,12 +68,12 @@ def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. + file : core.File + See core.File for more documentation + enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. - file : typing.Optional[core.File] - See core.File for more documentation - language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -141,8 +141,8 @@ def convert( """ _response = self._raw_client.convert( model_id=model_id, - enable_logging=enable_logging, file=file, + enable_logging=enable_logging, language_code=language_code, tag_audio_events=tag_audio_events, num_speakers=num_speakers, @@ -192,8 +192,8 @@ async def convert( self, *, model_id: str, + file: core.File, enable_logging: typing.Optional[bool] = None, - file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -219,12 +219,12 @@ async def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. + file : core.File + See core.File for more documentation + enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. - file : typing.Optional[core.File] - See core.File for more documentation - language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -300,8 +300,8 @@ async def main() -> None: """ _response = await self._raw_client.convert( model_id=model_id, - enable_logging=enable_logging, file=file, + enable_logging=enable_logging, language_code=language_code, tag_audio_events=tag_audio_events, num_speakers=num_speakers, diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 99dc7b89..4dda86f3 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -31,8 +31,8 @@ def convert( self, *, model_id: str, + file: core.File, enable_logging: typing.Optional[bool] = None, - file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -58,12 +58,12 @@ def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. + file : core.File + See core.File for more documentation + enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. - file : typing.Optional[core.File] - See core.File for more documentation - language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -141,7 +141,7 @@ def convert( "webhook_metadata": webhook_metadata, }, files={ - **({"file": file} if file is not None else {}), + "file": file, **( {"additional_formats": (None, json.dumps(jsonable_encoder(additional_formats)), "application/json")} if additional_formats is not OMIT @@ -187,8 +187,8 @@ async def convert( self, *, model_id: str, + file: core.File, enable_logging: typing.Optional[bool] = None, - file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -214,12 +214,12 @@ async def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. + file : core.File + See core.File for more documentation + enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. - file : typing.Optional[core.File] - See core.File for more documentation - language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -297,7 +297,7 @@ async def convert( "webhook_metadata": webhook_metadata, }, files={ - **({"file": file} if file is not None else {}), + "file": file, **( {"additional_formats": (None, json.dumps(jsonable_encoder(additional_formats)), "application/json")} if additional_formats is not OMIT diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index a5e5ca29..73a03d70 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -78,11 +78,11 @@ def create( self, *, name: str, + from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -114,6 +114,9 @@ def create( name : str The name of the Studio project, used for identification only. + from_document : core.File + See core.File for more documentation + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -126,9 +129,6 @@ def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -281,11 +281,11 @@ def create( """ _response = self._raw_client.create( name=name, + from_document=from_document, default_title_voice_id=default_title_voice_id, default_paragraph_voice_id=default_paragraph_voice_id, default_model_id=default_model_id, from_url=from_url, - from_document=from_document, from_content_json=from_content_json, quality_preset=quality_preset, title=title, @@ -586,11 +586,11 @@ async def create( self, *, name: str, + from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -622,6 +622,9 @@ async def create( name : str The name of the Studio project, used for identification only. + from_document : core.File + See core.File for more documentation + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -634,9 +637,6 @@ async def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -797,11 +797,11 @@ async def main() -> None: """ _response = await self._raw_client.create( name=name, + from_document=from_document, default_title_voice_id=default_title_voice_id, default_paragraph_voice_id=default_paragraph_voice_id, default_model_id=default_model_id, from_url=from_url, - from_document=from_document, from_content_json=from_content_json, quality_preset=quality_preset, title=title, diff --git a/src/elevenlabs/studio/projects/content/client.py b/src/elevenlabs/studio/projects/content/client.py index 4625abb7..fef908e3 100644 --- a/src/elevenlabs/studio/projects/content/client.py +++ b/src/elevenlabs/studio/projects/content/client.py @@ -31,8 +31,8 @@ def update( self, project_id: str, *, + from_document: core.File, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -45,12 +45,12 @@ def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + from_document : core.File + See core.File for more documentation + from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -83,8 +83,8 @@ def update( """ _response = self._raw_client.update( project_id, - from_url=from_url, from_document=from_document, + from_url=from_url, from_content_json=from_content_json, auto_convert=auto_convert, request_options=request_options, @@ -111,8 +111,8 @@ async def update( self, project_id: str, *, + from_document: core.File, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -125,12 +125,12 @@ async def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + from_document : core.File + See core.File for more documentation + from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -171,8 +171,8 @@ async def main() -> None: """ _response = await self._raw_client.update( project_id, - from_url=from_url, from_document=from_document, + from_url=from_url, from_content_json=from_content_json, auto_convert=auto_convert, request_options=request_options, diff --git a/src/elevenlabs/studio/projects/content/raw_client.py b/src/elevenlabs/studio/projects/content/raw_client.py index ae369538..88812365 100644 --- a/src/elevenlabs/studio/projects/content/raw_client.py +++ b/src/elevenlabs/studio/projects/content/raw_client.py @@ -26,8 +26,8 @@ def update( self, project_id: str, *, + from_document: core.File, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -40,12 +40,12 @@ def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + from_document : core.File + See core.File for more documentation + from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -74,7 +74,7 @@ def update( "auto_convert": auto_convert, }, files={ - **({"from_document": from_document} if from_document is not None else {}), + "from_document": from_document, }, request_options=request_options, omit=OMIT, @@ -115,8 +115,8 @@ async def update( self, project_id: str, *, + from_document: core.File, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -129,12 +129,12 @@ async def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + from_document : core.File + See core.File for more documentation + from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -163,7 +163,7 @@ async def update( "auto_convert": auto_convert, }, files={ - **({"from_document": from_document} if from_document is not None else {}), + "from_document": from_document, }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py index d9c6e791..891676d6 100644 --- a/src/elevenlabs/studio/projects/raw_client.py +++ b/src/elevenlabs/studio/projects/raw_client.py @@ -80,11 +80,11 @@ def create( self, *, name: str, + from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -116,6 +116,9 @@ def create( name : str The name of the Studio project, used for identification only. + from_document : core.File + See core.File for more documentation + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -128,9 +131,6 @@ def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -302,7 +302,7 @@ def create( "source_type": source_type, }, files={ - **({"from_document": from_document} if from_document is not None else {}), + "from_document": from_document, }, request_options=request_options, omit=OMIT, @@ -644,11 +644,11 @@ async def create( self, *, name: str, + from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, - from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -680,6 +680,9 @@ async def create( name : str The name of the Studio project, used for identification only. + from_document : core.File + See core.File for more documentation + default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -692,9 +695,6 @@ async def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. - from_document : typing.Optional[core.File] - See core.File for more documentation - from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -866,7 +866,7 @@ async def create( "source_type": source_type, }, files={ - **({"from_document": from_document} if from_document is not None else {}), + "from_document": from_document, }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_request_output_format.py b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_request_output_format.py index 398a8f79..e926ebeb 100644 --- a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_request_output_format.py +++ b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_request_output_format.py @@ -5,6 +5,7 @@ TextToDialogueConvertRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_request_output_format.py b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_request_output_format.py index a4c23e31..963955c9 100644 --- a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_request_output_format.py +++ b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_request_output_format.py @@ -5,6 +5,7 @@ TextToDialogueStreamRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_sound_effects/types/text_to_sound_effects_convert_request_output_format.py b/src/elevenlabs/text_to_sound_effects/types/text_to_sound_effects_convert_request_output_format.py index 0b2427ea..b85c957e 100644 --- a/src/elevenlabs/text_to_sound_effects/types/text_to_sound_effects_convert_request_output_format.py +++ b/src/elevenlabs/text_to_sound_effects/types/text_to_sound_effects_convert_request_output_format.py @@ -5,6 +5,7 @@ TextToSoundEffectsConvertRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_speech/client.py b/src/elevenlabs/text_to_speech/client.py index f6162ce9..bdf04b18 100644 --- a/src/elevenlabs/text_to_speech/client.py +++ b/src/elevenlabs/text_to_speech/client.py @@ -67,7 +67,6 @@ def convert( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -133,9 +132,6 @@ def convert( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -176,7 +172,6 @@ def convert( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -203,7 +198,6 @@ def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: """ @@ -269,9 +263,6 @@ def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -313,7 +304,6 @@ def convert_with_timestamps( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) return _response.data @@ -340,7 +330,6 @@ def stream( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -406,9 +395,6 @@ def stream( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -449,7 +435,6 @@ def stream( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -476,7 +461,6 @@ def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[StreamingAudioChunkWithTimestampsResponse]: """ @@ -542,9 +526,6 @@ def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -587,7 +568,6 @@ def stream_with_timestamps( use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: yield from r.data @@ -630,7 +610,6 @@ async def convert( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -696,9 +675,6 @@ async def convert( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -747,7 +723,6 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: @@ -775,7 +750,6 @@ async def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AudioWithTimestampsResponse: """ @@ -841,9 +815,6 @@ async def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -893,7 +864,6 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) return _response.data @@ -920,7 +890,6 @@ async def stream( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -986,9 +955,6 @@ async def stream( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -1037,7 +1003,6 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: @@ -1065,7 +1030,6 @@ async def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]: """ @@ -1131,9 +1095,6 @@ async def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1184,7 +1145,6 @@ async def main() -> None: use_pvc_as_ivc=use_pvc_as_ivc, apply_text_normalization=apply_text_normalization, apply_language_text_normalization=apply_language_text_normalization, - hcaptcha_token=hcaptcha_token, request_options=request_options, ) as r: async for _chunk in r.data: diff --git a/src/elevenlabs/text_to_speech/raw_client.py b/src/elevenlabs/text_to_speech/raw_client.py index a1fd6acb..9bdabad4 100644 --- a/src/elevenlabs/text_to_speech/raw_client.py +++ b/src/elevenlabs/text_to_speech/raw_client.py @@ -66,7 +66,6 @@ def convert( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -132,9 +131,6 @@ def convert( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -171,7 +167,6 @@ def convert( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -230,7 +225,6 @@ def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AudioWithTimestampsResponse]: """ @@ -296,9 +290,6 @@ def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -335,7 +326,6 @@ def convert_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -392,7 +382,6 @@ def stream( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: """ @@ -458,9 +447,6 @@ def stream( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -497,7 +483,6 @@ def stream( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -557,7 +542,6 @@ def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[StreamingAudioChunkWithTimestampsResponse]]]: """ @@ -623,9 +607,6 @@ def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -662,7 +643,6 @@ def stream_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -741,7 +721,6 @@ async def convert( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -807,9 +786,6 @@ async def convert( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -846,7 +822,6 @@ async def convert( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -906,7 +881,6 @@ async def convert_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AudioWithTimestampsResponse]: """ @@ -972,9 +946,6 @@ async def convert_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1011,7 +982,6 @@ async def convert_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -1068,7 +1038,6 @@ async def stream( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: """ @@ -1134,9 +1103,6 @@ async def stream( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -1173,7 +1139,6 @@ async def stream( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", @@ -1234,7 +1199,6 @@ async def stream_with_timestamps( use_pvc_as_ivc: typing.Optional[bool] = OMIT, apply_text_normalization: typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization] = OMIT, apply_language_text_normalization: typing.Optional[bool] = OMIT, - hcaptcha_token: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[StreamingAudioChunkWithTimestampsResponse]]]: """ @@ -1300,9 +1264,6 @@ async def stream_with_timestamps( apply_language_text_normalization : typing.Optional[bool] This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. - hcaptcha_token : typing.Optional[str] - HCaptcha token used to prevent spam, generated on the frontend either automatically or when the client solves the hCapctha challenge. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1339,7 +1300,6 @@ async def stream_with_timestamps( "use_pvc_as_ivc": use_pvc_as_ivc, "apply_text_normalization": apply_text_normalization, "apply_language_text_normalization": apply_language_text_normalization, - "hcaptcha_token": hcaptcha_token, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/text_to_speech/types/text_to_speech_convert_request_output_format.py b/src/elevenlabs/text_to_speech/types/text_to_speech_convert_request_output_format.py index 1876ab8d..abf75438 100644 --- a/src/elevenlabs/text_to_speech/types/text_to_speech_convert_request_output_format.py +++ b/src/elevenlabs/text_to_speech/types/text_to_speech_convert_request_output_format.py @@ -5,6 +5,7 @@ TextToSpeechConvertRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_speech/types/text_to_speech_convert_with_timestamps_request_output_format.py b/src/elevenlabs/text_to_speech/types/text_to_speech_convert_with_timestamps_request_output_format.py index ea4da0e7..3eb4ea8d 100644 --- a/src/elevenlabs/text_to_speech/types/text_to_speech_convert_with_timestamps_request_output_format.py +++ b/src/elevenlabs/text_to_speech/types/text_to_speech_convert_with_timestamps_request_output_format.py @@ -5,6 +5,7 @@ TextToSpeechConvertWithTimestampsRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_speech/types/text_to_speech_stream_request_output_format.py b/src/elevenlabs/text_to_speech/types/text_to_speech_stream_request_output_format.py index 910c0392..84012c3c 100644 --- a/src/elevenlabs/text_to_speech/types/text_to_speech_stream_request_output_format.py +++ b/src/elevenlabs/text_to_speech/types/text_to_speech_stream_request_output_format.py @@ -5,6 +5,7 @@ TextToSpeechStreamRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_speech/types/text_to_speech_stream_with_timestamps_request_output_format.py b/src/elevenlabs/text_to_speech/types/text_to_speech_stream_with_timestamps_request_output_format.py index d040aa8b..f13eac48 100644 --- a/src/elevenlabs/text_to_speech/types/text_to_speech_stream_with_timestamps_request_output_format.py +++ b/src/elevenlabs/text_to_speech/types/text_to_speech_stream_with_timestamps_request_output_format.py @@ -5,6 +5,7 @@ TextToSpeechStreamWithTimestampsRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_voice/types/text_to_voice_create_previews_request_output_format.py b/src/elevenlabs/text_to_voice/types/text_to_voice_create_previews_request_output_format.py index 1f771f94..d07938ad 100644 --- a/src/elevenlabs/text_to_voice/types/text_to_voice_create_previews_request_output_format.py +++ b/src/elevenlabs/text_to_voice/types/text_to_voice_create_previews_request_output_format.py @@ -5,6 +5,7 @@ TextToVoiceCreatePreviewsRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_voice/types/text_to_voice_design_request_output_format.py b/src/elevenlabs/text_to_voice/types/text_to_voice_design_request_output_format.py index 0842f36c..a681b3c2 100644 --- a/src/elevenlabs/text_to_voice/types/text_to_voice_design_request_output_format.py +++ b/src/elevenlabs/text_to_voice/types/text_to_voice_design_request_output_format.py @@ -5,6 +5,7 @@ TextToVoiceDesignRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py b/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py index 825d812b..42756adc 100644 --- a/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py +++ b/src/elevenlabs/text_to_voice/types/text_to_voice_remix_request_output_format.py @@ -5,6 +5,7 @@ TextToVoiceRemixRequestOutputFormat = typing.Union[ typing.Literal[ "mp3_22050_32", + "mp3_24000_48", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", @@ -14,6 +15,7 @@ "pcm_16000", "pcm_22050", "pcm_24000", + "pcm_32000", "pcm_44100", "pcm_48000", "ulaw_8000", diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 76fabbe5..17e44f66 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -25,9 +25,11 @@ from .age import Age from .agent_call_limits import AgentCallLimits from .agent_config import AgentConfig - from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride - from .agent_config_override import AgentConfigOverride + from .agent_config_api_model_workflow_override_input import AgentConfigApiModelWorkflowOverrideInput + from .agent_config_api_model_workflow_override_output import AgentConfigApiModelWorkflowOverrideOutput from .agent_config_override_config import AgentConfigOverrideConfig + from .agent_config_override_input import AgentConfigOverrideInput + from .agent_config_override_output import AgentConfigOverrideOutput from .agent_failure_response_example import AgentFailureResponseExample from .agent_metadata import AgentMetadata from .agent_metadata_response_model import AgentMetadataResponseModel @@ -49,6 +51,16 @@ AgentWorkflowRequestModelNodesValue_Start, AgentWorkflowRequestModelNodesValue_Tool, ) + from .agent_workflow_response_model import AgentWorkflowResponseModel + from .agent_workflow_response_model_nodes_value import ( + AgentWorkflowResponseModelNodesValue, + AgentWorkflowResponseModelNodesValue_End, + AgentWorkflowResponseModelNodesValue_OverrideAgent, + AgentWorkflowResponseModelNodesValue_PhoneNumber, + AgentWorkflowResponseModelNodesValue_StandaloneAgent, + AgentWorkflowResponseModelNodesValue_Start, + AgentWorkflowResponseModelNodesValue_Tool, + ) from .agent_workspace_overrides_input import AgentWorkspaceOverridesInput from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput from .alignment import Alignment @@ -62,243 +74,482 @@ from .asr_input_format import AsrInputFormat from .asr_provider import AsrProvider from .asr_quality import AsrQuality - from .ast_and_operator_node import AstAndOperatorNode - from .ast_and_operator_node_children_item import ( - AstAndOperatorNodeChildrenItem, - AstAndOperatorNodeChildrenItem_AndOperator, - AstAndOperatorNodeChildrenItem_BooleanLiteral, - AstAndOperatorNodeChildrenItem_DynamicVariable, - AstAndOperatorNodeChildrenItem_EqOperator, - AstAndOperatorNodeChildrenItem_GtOperator, - AstAndOperatorNodeChildrenItem_GteOperator, - AstAndOperatorNodeChildrenItem_Llm, - AstAndOperatorNodeChildrenItem_LtOperator, - AstAndOperatorNodeChildrenItem_LteOperator, - AstAndOperatorNodeChildrenItem_NeqOperator, - AstAndOperatorNodeChildrenItem_NumberLiteral, - AstAndOperatorNodeChildrenItem_OrOperator, - AstAndOperatorNodeChildrenItem_StringLiteral, - ) - from .ast_boolean_node import AstBooleanNode - from .ast_dynamic_variable_node import AstDynamicVariableNode - from .ast_equals_operator_node import AstEqualsOperatorNode - from .ast_equals_operator_node_left import ( - AstEqualsOperatorNodeLeft, - AstEqualsOperatorNodeLeft_AndOperator, - AstEqualsOperatorNodeLeft_BooleanLiteral, - AstEqualsOperatorNodeLeft_DynamicVariable, - AstEqualsOperatorNodeLeft_EqOperator, - AstEqualsOperatorNodeLeft_GtOperator, - AstEqualsOperatorNodeLeft_GteOperator, - AstEqualsOperatorNodeLeft_Llm, - AstEqualsOperatorNodeLeft_LtOperator, - AstEqualsOperatorNodeLeft_LteOperator, - AstEqualsOperatorNodeLeft_NeqOperator, - AstEqualsOperatorNodeLeft_NumberLiteral, - AstEqualsOperatorNodeLeft_OrOperator, - AstEqualsOperatorNodeLeft_StringLiteral, - ) - from .ast_equals_operator_node_right import ( - AstEqualsOperatorNodeRight, - AstEqualsOperatorNodeRight_AndOperator, - AstEqualsOperatorNodeRight_BooleanLiteral, - AstEqualsOperatorNodeRight_DynamicVariable, - AstEqualsOperatorNodeRight_EqOperator, - AstEqualsOperatorNodeRight_GtOperator, - AstEqualsOperatorNodeRight_GteOperator, - AstEqualsOperatorNodeRight_Llm, - AstEqualsOperatorNodeRight_LtOperator, - AstEqualsOperatorNodeRight_LteOperator, - AstEqualsOperatorNodeRight_NeqOperator, - AstEqualsOperatorNodeRight_NumberLiteral, - AstEqualsOperatorNodeRight_OrOperator, - AstEqualsOperatorNodeRight_StringLiteral, - ) - from .ast_greater_than_operator_node import AstGreaterThanOperatorNode - from .ast_greater_than_operator_node_left import ( - AstGreaterThanOperatorNodeLeft, - AstGreaterThanOperatorNodeLeft_AndOperator, - AstGreaterThanOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOperatorNodeLeft_DynamicVariable, - AstGreaterThanOperatorNodeLeft_EqOperator, - AstGreaterThanOperatorNodeLeft_GtOperator, - AstGreaterThanOperatorNodeLeft_GteOperator, - AstGreaterThanOperatorNodeLeft_Llm, - AstGreaterThanOperatorNodeLeft_LtOperator, - AstGreaterThanOperatorNodeLeft_LteOperator, - AstGreaterThanOperatorNodeLeft_NeqOperator, - AstGreaterThanOperatorNodeLeft_NumberLiteral, - AstGreaterThanOperatorNodeLeft_OrOperator, - AstGreaterThanOperatorNodeLeft_StringLiteral, - ) - from .ast_greater_than_operator_node_right import ( - AstGreaterThanOperatorNodeRight, - AstGreaterThanOperatorNodeRight_AndOperator, - AstGreaterThanOperatorNodeRight_BooleanLiteral, - AstGreaterThanOperatorNodeRight_DynamicVariable, - AstGreaterThanOperatorNodeRight_EqOperator, - AstGreaterThanOperatorNodeRight_GtOperator, - AstGreaterThanOperatorNodeRight_GteOperator, - AstGreaterThanOperatorNodeRight_Llm, - AstGreaterThanOperatorNodeRight_LtOperator, - AstGreaterThanOperatorNodeRight_LteOperator, - AstGreaterThanOperatorNodeRight_NeqOperator, - AstGreaterThanOperatorNodeRight_NumberLiteral, - AstGreaterThanOperatorNodeRight_OrOperator, - AstGreaterThanOperatorNodeRight_StringLiteral, - ) - from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode - from .ast_greater_than_or_equals_operator_node_left import ( - AstGreaterThanOrEqualsOperatorNodeLeft, - AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_Llm, - AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, - ) - from .ast_greater_than_or_equals_operator_node_right import ( - AstGreaterThanOrEqualsOperatorNodeRight, - AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, - AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_Llm, - AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, - AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, - ) - from .ast_less_than_operator_node import AstLessThanOperatorNode - from .ast_less_than_operator_node_left import ( - AstLessThanOperatorNodeLeft, - AstLessThanOperatorNodeLeft_AndOperator, - AstLessThanOperatorNodeLeft_BooleanLiteral, - AstLessThanOperatorNodeLeft_DynamicVariable, - AstLessThanOperatorNodeLeft_EqOperator, - AstLessThanOperatorNodeLeft_GtOperator, - AstLessThanOperatorNodeLeft_GteOperator, - AstLessThanOperatorNodeLeft_Llm, - AstLessThanOperatorNodeLeft_LtOperator, - AstLessThanOperatorNodeLeft_LteOperator, - AstLessThanOperatorNodeLeft_NeqOperator, - AstLessThanOperatorNodeLeft_NumberLiteral, - AstLessThanOperatorNodeLeft_OrOperator, - AstLessThanOperatorNodeLeft_StringLiteral, - ) - from .ast_less_than_operator_node_right import ( - AstLessThanOperatorNodeRight, - AstLessThanOperatorNodeRight_AndOperator, - AstLessThanOperatorNodeRight_BooleanLiteral, - AstLessThanOperatorNodeRight_DynamicVariable, - AstLessThanOperatorNodeRight_EqOperator, - AstLessThanOperatorNodeRight_GtOperator, - AstLessThanOperatorNodeRight_GteOperator, - AstLessThanOperatorNodeRight_Llm, - AstLessThanOperatorNodeRight_LtOperator, - AstLessThanOperatorNodeRight_LteOperator, - AstLessThanOperatorNodeRight_NeqOperator, - AstLessThanOperatorNodeRight_NumberLiteral, - AstLessThanOperatorNodeRight_OrOperator, - AstLessThanOperatorNodeRight_StringLiteral, - ) - from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode - from .ast_less_than_or_equals_operator_node_left import ( - AstLessThanOrEqualsOperatorNodeLeft, - AstLessThanOrEqualsOperatorNodeLeft_AndOperator, - AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstLessThanOrEqualsOperatorNodeLeft_EqOperator, - AstLessThanOrEqualsOperatorNodeLeft_GtOperator, - AstLessThanOrEqualsOperatorNodeLeft_GteOperator, - AstLessThanOrEqualsOperatorNodeLeft_Llm, - AstLessThanOrEqualsOperatorNodeLeft_LtOperator, - AstLessThanOrEqualsOperatorNodeLeft_LteOperator, - AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, - AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstLessThanOrEqualsOperatorNodeLeft_OrOperator, - AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, - ) - from .ast_less_than_or_equals_operator_node_right import ( - AstLessThanOrEqualsOperatorNodeRight, - AstLessThanOrEqualsOperatorNodeRight_AndOperator, - AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, - AstLessThanOrEqualsOperatorNodeRight_EqOperator, - AstLessThanOrEqualsOperatorNodeRight_GtOperator, - AstLessThanOrEqualsOperatorNodeRight_GteOperator, - AstLessThanOrEqualsOperatorNodeRight_Llm, - AstLessThanOrEqualsOperatorNodeRight_LtOperator, - AstLessThanOrEqualsOperatorNodeRight_LteOperator, - AstLessThanOrEqualsOperatorNodeRight_NeqOperator, - AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, - AstLessThanOrEqualsOperatorNodeRight_OrOperator, - AstLessThanOrEqualsOperatorNodeRight_StringLiteral, - ) - from .ast_not_equals_operator_node import AstNotEqualsOperatorNode - from .ast_not_equals_operator_node_left import ( - AstNotEqualsOperatorNodeLeft, - AstNotEqualsOperatorNodeLeft_AndOperator, - AstNotEqualsOperatorNodeLeft_BooleanLiteral, - AstNotEqualsOperatorNodeLeft_DynamicVariable, - AstNotEqualsOperatorNodeLeft_EqOperator, - AstNotEqualsOperatorNodeLeft_GtOperator, - AstNotEqualsOperatorNodeLeft_GteOperator, - AstNotEqualsOperatorNodeLeft_Llm, - AstNotEqualsOperatorNodeLeft_LtOperator, - AstNotEqualsOperatorNodeLeft_LteOperator, - AstNotEqualsOperatorNodeLeft_NeqOperator, - AstNotEqualsOperatorNodeLeft_NumberLiteral, - AstNotEqualsOperatorNodeLeft_OrOperator, - AstNotEqualsOperatorNodeLeft_StringLiteral, - ) - from .ast_not_equals_operator_node_right import ( - AstNotEqualsOperatorNodeRight, - AstNotEqualsOperatorNodeRight_AndOperator, - AstNotEqualsOperatorNodeRight_BooleanLiteral, - AstNotEqualsOperatorNodeRight_DynamicVariable, - AstNotEqualsOperatorNodeRight_EqOperator, - AstNotEqualsOperatorNodeRight_GtOperator, - AstNotEqualsOperatorNodeRight_GteOperator, - AstNotEqualsOperatorNodeRight_Llm, - AstNotEqualsOperatorNodeRight_LtOperator, - AstNotEqualsOperatorNodeRight_LteOperator, - AstNotEqualsOperatorNodeRight_NeqOperator, - AstNotEqualsOperatorNodeRight_NumberLiteral, - AstNotEqualsOperatorNodeRight_OrOperator, - AstNotEqualsOperatorNodeRight_StringLiteral, - ) - from .ast_number_node import AstNumberNode - from .ast_or_operator_node import AstOrOperatorNode - from .ast_or_operator_node_children_item import ( - AstOrOperatorNodeChildrenItem, - AstOrOperatorNodeChildrenItem_AndOperator, - AstOrOperatorNodeChildrenItem_BooleanLiteral, - AstOrOperatorNodeChildrenItem_DynamicVariable, - AstOrOperatorNodeChildrenItem_EqOperator, - AstOrOperatorNodeChildrenItem_GtOperator, - AstOrOperatorNodeChildrenItem_GteOperator, - AstOrOperatorNodeChildrenItem_Llm, - AstOrOperatorNodeChildrenItem_LtOperator, - AstOrOperatorNodeChildrenItem_LteOperator, - AstOrOperatorNodeChildrenItem_NeqOperator, - AstOrOperatorNodeChildrenItem_NumberLiteral, - AstOrOperatorNodeChildrenItem_OrOperator, - AstOrOperatorNodeChildrenItem_StringLiteral, - ) - from .ast_string_node import AstStringNode - from .astllm_node import AstllmNode + from .ast_and_operator_node_input import AstAndOperatorNodeInput + from .ast_and_operator_node_input_children_item import ( + AstAndOperatorNodeInputChildrenItem, + AstAndOperatorNodeInputChildrenItem_AndOperator, + AstAndOperatorNodeInputChildrenItem_BooleanLiteral, + AstAndOperatorNodeInputChildrenItem_DynamicVariable, + AstAndOperatorNodeInputChildrenItem_EqOperator, + AstAndOperatorNodeInputChildrenItem_GtOperator, + AstAndOperatorNodeInputChildrenItem_GteOperator, + AstAndOperatorNodeInputChildrenItem_Llm, + AstAndOperatorNodeInputChildrenItem_LtOperator, + AstAndOperatorNodeInputChildrenItem_LteOperator, + AstAndOperatorNodeInputChildrenItem_NeqOperator, + AstAndOperatorNodeInputChildrenItem_NumberLiteral, + AstAndOperatorNodeInputChildrenItem_OrOperator, + AstAndOperatorNodeInputChildrenItem_StringLiteral, + ) + from .ast_and_operator_node_output import AstAndOperatorNodeOutput + from .ast_and_operator_node_output_children_item import ( + AstAndOperatorNodeOutputChildrenItem, + AstAndOperatorNodeOutputChildrenItem_AndOperator, + AstAndOperatorNodeOutputChildrenItem_BooleanLiteral, + AstAndOperatorNodeOutputChildrenItem_DynamicVariable, + AstAndOperatorNodeOutputChildrenItem_EqOperator, + AstAndOperatorNodeOutputChildrenItem_GtOperator, + AstAndOperatorNodeOutputChildrenItem_GteOperator, + AstAndOperatorNodeOutputChildrenItem_Llm, + AstAndOperatorNodeOutputChildrenItem_LtOperator, + AstAndOperatorNodeOutputChildrenItem_LteOperator, + AstAndOperatorNodeOutputChildrenItem_NeqOperator, + AstAndOperatorNodeOutputChildrenItem_NumberLiteral, + AstAndOperatorNodeOutputChildrenItem_OrOperator, + AstAndOperatorNodeOutputChildrenItem_StringLiteral, + ) + from .ast_boolean_node_input import AstBooleanNodeInput + from .ast_boolean_node_output import AstBooleanNodeOutput + from .ast_dynamic_variable_node_input import AstDynamicVariableNodeInput + from .ast_dynamic_variable_node_output import AstDynamicVariableNodeOutput + from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput + from .ast_equals_operator_node_input_left import ( + AstEqualsOperatorNodeInputLeft, + AstEqualsOperatorNodeInputLeft_AndOperator, + AstEqualsOperatorNodeInputLeft_BooleanLiteral, + AstEqualsOperatorNodeInputLeft_DynamicVariable, + AstEqualsOperatorNodeInputLeft_EqOperator, + AstEqualsOperatorNodeInputLeft_GtOperator, + AstEqualsOperatorNodeInputLeft_GteOperator, + AstEqualsOperatorNodeInputLeft_Llm, + AstEqualsOperatorNodeInputLeft_LtOperator, + AstEqualsOperatorNodeInputLeft_LteOperator, + AstEqualsOperatorNodeInputLeft_NeqOperator, + AstEqualsOperatorNodeInputLeft_NumberLiteral, + AstEqualsOperatorNodeInputLeft_OrOperator, + AstEqualsOperatorNodeInputLeft_StringLiteral, + ) + from .ast_equals_operator_node_input_right import ( + AstEqualsOperatorNodeInputRight, + AstEqualsOperatorNodeInputRight_AndOperator, + AstEqualsOperatorNodeInputRight_BooleanLiteral, + AstEqualsOperatorNodeInputRight_DynamicVariable, + AstEqualsOperatorNodeInputRight_EqOperator, + AstEqualsOperatorNodeInputRight_GtOperator, + AstEqualsOperatorNodeInputRight_GteOperator, + AstEqualsOperatorNodeInputRight_Llm, + AstEqualsOperatorNodeInputRight_LtOperator, + AstEqualsOperatorNodeInputRight_LteOperator, + AstEqualsOperatorNodeInputRight_NeqOperator, + AstEqualsOperatorNodeInputRight_NumberLiteral, + AstEqualsOperatorNodeInputRight_OrOperator, + AstEqualsOperatorNodeInputRight_StringLiteral, + ) + from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput + from .ast_equals_operator_node_output_left import ( + AstEqualsOperatorNodeOutputLeft, + AstEqualsOperatorNodeOutputLeft_AndOperator, + AstEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstEqualsOperatorNodeOutputLeft_DynamicVariable, + AstEqualsOperatorNodeOutputLeft_EqOperator, + AstEqualsOperatorNodeOutputLeft_GtOperator, + AstEqualsOperatorNodeOutputLeft_GteOperator, + AstEqualsOperatorNodeOutputLeft_Llm, + AstEqualsOperatorNodeOutputLeft_LtOperator, + AstEqualsOperatorNodeOutputLeft_LteOperator, + AstEqualsOperatorNodeOutputLeft_NeqOperator, + AstEqualsOperatorNodeOutputLeft_NumberLiteral, + AstEqualsOperatorNodeOutputLeft_OrOperator, + AstEqualsOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_equals_operator_node_output_right import ( + AstEqualsOperatorNodeOutputRight, + AstEqualsOperatorNodeOutputRight_AndOperator, + AstEqualsOperatorNodeOutputRight_BooleanLiteral, + AstEqualsOperatorNodeOutputRight_DynamicVariable, + AstEqualsOperatorNodeOutputRight_EqOperator, + AstEqualsOperatorNodeOutputRight_GtOperator, + AstEqualsOperatorNodeOutputRight_GteOperator, + AstEqualsOperatorNodeOutputRight_Llm, + AstEqualsOperatorNodeOutputRight_LtOperator, + AstEqualsOperatorNodeOutputRight_LteOperator, + AstEqualsOperatorNodeOutputRight_NeqOperator, + AstEqualsOperatorNodeOutputRight_NumberLiteral, + AstEqualsOperatorNodeOutputRight_OrOperator, + AstEqualsOperatorNodeOutputRight_StringLiteral, + ) + from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput + from .ast_greater_than_operator_node_input_left import ( + AstGreaterThanOperatorNodeInputLeft, + AstGreaterThanOperatorNodeInputLeft_AndOperator, + AstGreaterThanOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOperatorNodeInputLeft_EqOperator, + AstGreaterThanOperatorNodeInputLeft_GtOperator, + AstGreaterThanOperatorNodeInputLeft_GteOperator, + AstGreaterThanOperatorNodeInputLeft_Llm, + AstGreaterThanOperatorNodeInputLeft_LtOperator, + AstGreaterThanOperatorNodeInputLeft_LteOperator, + AstGreaterThanOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOperatorNodeInputLeft_OrOperator, + AstGreaterThanOperatorNodeInputLeft_StringLiteral, + ) + from .ast_greater_than_operator_node_input_right import ( + AstGreaterThanOperatorNodeInputRight, + AstGreaterThanOperatorNodeInputRight_AndOperator, + AstGreaterThanOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOperatorNodeInputRight_EqOperator, + AstGreaterThanOperatorNodeInputRight_GtOperator, + AstGreaterThanOperatorNodeInputRight_GteOperator, + AstGreaterThanOperatorNodeInputRight_Llm, + AstGreaterThanOperatorNodeInputRight_LtOperator, + AstGreaterThanOperatorNodeInputRight_LteOperator, + AstGreaterThanOperatorNodeInputRight_NeqOperator, + AstGreaterThanOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOperatorNodeInputRight_OrOperator, + AstGreaterThanOperatorNodeInputRight_StringLiteral, + ) + from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput + from .ast_greater_than_operator_node_output_left import ( + AstGreaterThanOperatorNodeOutputLeft, + AstGreaterThanOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOperatorNodeOutputLeft_Llm, + AstGreaterThanOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_greater_than_operator_node_output_right import ( + AstGreaterThanOperatorNodeOutputRight, + AstGreaterThanOperatorNodeOutputRight_AndOperator, + AstGreaterThanOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOperatorNodeOutputRight_EqOperator, + AstGreaterThanOperatorNodeOutputRight_GtOperator, + AstGreaterThanOperatorNodeOutputRight_GteOperator, + AstGreaterThanOperatorNodeOutputRight_Llm, + AstGreaterThanOperatorNodeOutputRight_LtOperator, + AstGreaterThanOperatorNodeOutputRight_LteOperator, + AstGreaterThanOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOperatorNodeOutputRight_OrOperator, + AstGreaterThanOperatorNodeOutputRight_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput + from .ast_greater_than_or_equals_operator_node_input_left import ( + AstGreaterThanOrEqualsOperatorNodeInputLeft, + AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node_input_right import ( + AstGreaterThanOrEqualsOperatorNodeInputRight, + AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput + from .ast_greater_than_or_equals_operator_node_output_left import ( + AstGreaterThanOrEqualsOperatorNodeOutputLeft, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_greater_than_or_equals_operator_node_output_right import ( + AstGreaterThanOrEqualsOperatorNodeOutputRight, + AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral, + ) + from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput + from .ast_less_than_operator_node_input_left import ( + AstLessThanOperatorNodeInputLeft, + AstLessThanOperatorNodeInputLeft_AndOperator, + AstLessThanOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOperatorNodeInputLeft_DynamicVariable, + AstLessThanOperatorNodeInputLeft_EqOperator, + AstLessThanOperatorNodeInputLeft_GtOperator, + AstLessThanOperatorNodeInputLeft_GteOperator, + AstLessThanOperatorNodeInputLeft_Llm, + AstLessThanOperatorNodeInputLeft_LtOperator, + AstLessThanOperatorNodeInputLeft_LteOperator, + AstLessThanOperatorNodeInputLeft_NeqOperator, + AstLessThanOperatorNodeInputLeft_NumberLiteral, + AstLessThanOperatorNodeInputLeft_OrOperator, + AstLessThanOperatorNodeInputLeft_StringLiteral, + ) + from .ast_less_than_operator_node_input_right import ( + AstLessThanOperatorNodeInputRight, + AstLessThanOperatorNodeInputRight_AndOperator, + AstLessThanOperatorNodeInputRight_BooleanLiteral, + AstLessThanOperatorNodeInputRight_DynamicVariable, + AstLessThanOperatorNodeInputRight_EqOperator, + AstLessThanOperatorNodeInputRight_GtOperator, + AstLessThanOperatorNodeInputRight_GteOperator, + AstLessThanOperatorNodeInputRight_Llm, + AstLessThanOperatorNodeInputRight_LtOperator, + AstLessThanOperatorNodeInputRight_LteOperator, + AstLessThanOperatorNodeInputRight_NeqOperator, + AstLessThanOperatorNodeInputRight_NumberLiteral, + AstLessThanOperatorNodeInputRight_OrOperator, + AstLessThanOperatorNodeInputRight_StringLiteral, + ) + from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput + from .ast_less_than_operator_node_output_left import ( + AstLessThanOperatorNodeOutputLeft, + AstLessThanOperatorNodeOutputLeft_AndOperator, + AstLessThanOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOperatorNodeOutputLeft_EqOperator, + AstLessThanOperatorNodeOutputLeft_GtOperator, + AstLessThanOperatorNodeOutputLeft_GteOperator, + AstLessThanOperatorNodeOutputLeft_Llm, + AstLessThanOperatorNodeOutputLeft_LtOperator, + AstLessThanOperatorNodeOutputLeft_LteOperator, + AstLessThanOperatorNodeOutputLeft_NeqOperator, + AstLessThanOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOperatorNodeOutputLeft_OrOperator, + AstLessThanOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_less_than_operator_node_output_right import ( + AstLessThanOperatorNodeOutputRight, + AstLessThanOperatorNodeOutputRight_AndOperator, + AstLessThanOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOperatorNodeOutputRight_DynamicVariable, + AstLessThanOperatorNodeOutputRight_EqOperator, + AstLessThanOperatorNodeOutputRight_GtOperator, + AstLessThanOperatorNodeOutputRight_GteOperator, + AstLessThanOperatorNodeOutputRight_Llm, + AstLessThanOperatorNodeOutputRight_LtOperator, + AstLessThanOperatorNodeOutputRight_LteOperator, + AstLessThanOperatorNodeOutputRight_NeqOperator, + AstLessThanOperatorNodeOutputRight_NumberLiteral, + AstLessThanOperatorNodeOutputRight_OrOperator, + AstLessThanOperatorNodeOutputRight_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput + from .ast_less_than_or_equals_operator_node_input_left import ( + AstLessThanOrEqualsOperatorNodeInputLeft, + AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_Llm, + AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node_input_right import ( + AstLessThanOrEqualsOperatorNodeInputRight, + AstLessThanOrEqualsOperatorNodeInputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_Llm, + AstLessThanOrEqualsOperatorNodeInputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput + from .ast_less_than_or_equals_operator_node_output_left import ( + AstLessThanOrEqualsOperatorNodeOutputLeft, + AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_Llm, + AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_less_than_or_equals_operator_node_output_right import ( + AstLessThanOrEqualsOperatorNodeOutputRight, + AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_Llm, + AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral, + ) + from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput + from .ast_not_equals_operator_node_input_left import ( + AstNotEqualsOperatorNodeInputLeft, + AstNotEqualsOperatorNodeInputLeft_AndOperator, + AstNotEqualsOperatorNodeInputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeInputLeft_DynamicVariable, + AstNotEqualsOperatorNodeInputLeft_EqOperator, + AstNotEqualsOperatorNodeInputLeft_GtOperator, + AstNotEqualsOperatorNodeInputLeft_GteOperator, + AstNotEqualsOperatorNodeInputLeft_Llm, + AstNotEqualsOperatorNodeInputLeft_LtOperator, + AstNotEqualsOperatorNodeInputLeft_LteOperator, + AstNotEqualsOperatorNodeInputLeft_NeqOperator, + AstNotEqualsOperatorNodeInputLeft_NumberLiteral, + AstNotEqualsOperatorNodeInputLeft_OrOperator, + AstNotEqualsOperatorNodeInputLeft_StringLiteral, + ) + from .ast_not_equals_operator_node_input_right import ( + AstNotEqualsOperatorNodeInputRight, + AstNotEqualsOperatorNodeInputRight_AndOperator, + AstNotEqualsOperatorNodeInputRight_BooleanLiteral, + AstNotEqualsOperatorNodeInputRight_DynamicVariable, + AstNotEqualsOperatorNodeInputRight_EqOperator, + AstNotEqualsOperatorNodeInputRight_GtOperator, + AstNotEqualsOperatorNodeInputRight_GteOperator, + AstNotEqualsOperatorNodeInputRight_Llm, + AstNotEqualsOperatorNodeInputRight_LtOperator, + AstNotEqualsOperatorNodeInputRight_LteOperator, + AstNotEqualsOperatorNodeInputRight_NeqOperator, + AstNotEqualsOperatorNodeInputRight_NumberLiteral, + AstNotEqualsOperatorNodeInputRight_OrOperator, + AstNotEqualsOperatorNodeInputRight_StringLiteral, + ) + from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput + from .ast_not_equals_operator_node_output_left import ( + AstNotEqualsOperatorNodeOutputLeft, + AstNotEqualsOperatorNodeOutputLeft_AndOperator, + AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeOutputLeft_DynamicVariable, + AstNotEqualsOperatorNodeOutputLeft_EqOperator, + AstNotEqualsOperatorNodeOutputLeft_GtOperator, + AstNotEqualsOperatorNodeOutputLeft_GteOperator, + AstNotEqualsOperatorNodeOutputLeft_Llm, + AstNotEqualsOperatorNodeOutputLeft_LtOperator, + AstNotEqualsOperatorNodeOutputLeft_LteOperator, + AstNotEqualsOperatorNodeOutputLeft_NeqOperator, + AstNotEqualsOperatorNodeOutputLeft_NumberLiteral, + AstNotEqualsOperatorNodeOutputLeft_OrOperator, + AstNotEqualsOperatorNodeOutputLeft_StringLiteral, + ) + from .ast_not_equals_operator_node_output_right import ( + AstNotEqualsOperatorNodeOutputRight, + AstNotEqualsOperatorNodeOutputRight_AndOperator, + AstNotEqualsOperatorNodeOutputRight_BooleanLiteral, + AstNotEqualsOperatorNodeOutputRight_DynamicVariable, + AstNotEqualsOperatorNodeOutputRight_EqOperator, + AstNotEqualsOperatorNodeOutputRight_GtOperator, + AstNotEqualsOperatorNodeOutputRight_GteOperator, + AstNotEqualsOperatorNodeOutputRight_Llm, + AstNotEqualsOperatorNodeOutputRight_LtOperator, + AstNotEqualsOperatorNodeOutputRight_LteOperator, + AstNotEqualsOperatorNodeOutputRight_NeqOperator, + AstNotEqualsOperatorNodeOutputRight_NumberLiteral, + AstNotEqualsOperatorNodeOutputRight_OrOperator, + AstNotEqualsOperatorNodeOutputRight_StringLiteral, + ) + from .ast_number_node_input import AstNumberNodeInput + from .ast_number_node_output import AstNumberNodeOutput + from .ast_or_operator_node_input import AstOrOperatorNodeInput + from .ast_or_operator_node_input_children_item import ( + AstOrOperatorNodeInputChildrenItem, + AstOrOperatorNodeInputChildrenItem_AndOperator, + AstOrOperatorNodeInputChildrenItem_BooleanLiteral, + AstOrOperatorNodeInputChildrenItem_DynamicVariable, + AstOrOperatorNodeInputChildrenItem_EqOperator, + AstOrOperatorNodeInputChildrenItem_GtOperator, + AstOrOperatorNodeInputChildrenItem_GteOperator, + AstOrOperatorNodeInputChildrenItem_Llm, + AstOrOperatorNodeInputChildrenItem_LtOperator, + AstOrOperatorNodeInputChildrenItem_LteOperator, + AstOrOperatorNodeInputChildrenItem_NeqOperator, + AstOrOperatorNodeInputChildrenItem_NumberLiteral, + AstOrOperatorNodeInputChildrenItem_OrOperator, + AstOrOperatorNodeInputChildrenItem_StringLiteral, + ) + from .ast_or_operator_node_output import AstOrOperatorNodeOutput + from .ast_or_operator_node_output_children_item import ( + AstOrOperatorNodeOutputChildrenItem, + AstOrOperatorNodeOutputChildrenItem_AndOperator, + AstOrOperatorNodeOutputChildrenItem_BooleanLiteral, + AstOrOperatorNodeOutputChildrenItem_DynamicVariable, + AstOrOperatorNodeOutputChildrenItem_EqOperator, + AstOrOperatorNodeOutputChildrenItem_GtOperator, + AstOrOperatorNodeOutputChildrenItem_GteOperator, + AstOrOperatorNodeOutputChildrenItem_Llm, + AstOrOperatorNodeOutputChildrenItem_LtOperator, + AstOrOperatorNodeOutputChildrenItem_LteOperator, + AstOrOperatorNodeOutputChildrenItem_NeqOperator, + AstOrOperatorNodeOutputChildrenItem_NumberLiteral, + AstOrOperatorNodeOutputChildrenItem_OrOperator, + AstOrOperatorNodeOutputChildrenItem_StringLiteral, + ) + from .ast_string_node_input import AstStringNodeInput + from .ast_string_node_output import AstStringNodeOutput + from .astllm_node_input import AstllmNodeInput + from .astllm_node_output import AstllmNodeOutput + from .async_conversation_metadata import AsyncConversationMetadata + from .async_conversation_metadata_delivery_status import AsyncConversationMetadataDeliveryStatus from .attached_test_model import AttachedTestModel from .audio_native_create_project_response_model import AudioNativeCreateProjectResponseModel from .audio_native_edit_content_response_model import AudioNativeEditContentResponseModel @@ -310,6 +561,9 @@ from .auth_connection_locator import AuthConnectionLocator from .auth_settings import AuthSettings from .authorization_method import AuthorizationMethod + from .backup_llm_default import BackupLlmDefault + from .backup_llm_disabled import BackupLlmDisabled + from .backup_llm_override import BackupLlmOverride from .bad_request_error_body import BadRequestErrorBody from .ban_reason_type import BanReasonType from .batch_call_detailed_response import BatchCallDetailedResponse @@ -325,7 +579,8 @@ from .breakdown_types import BreakdownTypes from .built_in_tools_input import BuiltInToolsInput from .built_in_tools_output import BuiltInToolsOutput - from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride + from .built_in_tools_workflow_override_input import BuiltInToolsWorkflowOverrideInput + from .built_in_tools_workflow_override_output import BuiltInToolsWorkflowOverrideOutput from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel from .caption_style_character_animation_model_enter_type import CaptionStyleCharacterAnimationModelEnterType from .caption_style_character_animation_model_exit_type import CaptionStyleCharacterAnimationModelExitType @@ -409,6 +664,11 @@ ) from .conversation_history_feedback_common_model import ConversationHistoryFeedbackCommonModel from .conversation_history_metadata_common_model import ConversationHistoryMetadataCommonModel + from .conversation_history_metadata_common_model_initiation_trigger import ( + ConversationHistoryMetadataCommonModelInitiationTrigger, + ConversationHistoryMetadataCommonModelInitiationTrigger_Default, + ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk, + ) from .conversation_history_metadata_common_model_phone_call import ( ConversationHistoryMetadataCommonModelPhoneCall, ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking, @@ -519,7 +779,12 @@ from .conversation_token_purpose import ConversationTokenPurpose from .conversation_turn_metrics import ConversationTurnMetrics from .conversational_config import ConversationalConfig - from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride + from .conversational_config_api_model_workflow_override_input import ( + ConversationalConfigApiModelWorkflowOverrideInput, + ) + from .conversational_config_api_model_workflow_override_output import ( + ConversationalConfigApiModelWorkflowOverrideOutput, + ) from .convert_chapter_response_model import ConvertChapterResponseModel from .convert_project_response_model import ConvertProjectResponseModel from .create_agent_response_model import CreateAgentResponseModel @@ -537,6 +802,7 @@ from .dashboard_criteria_chart_model import DashboardCriteriaChartModel from .dashboard_data_collection_chart_model import DashboardDataCollectionChartModel from .data_collection_result_common_model import DataCollectionResultCommonModel + from .default_conversation_initiation_trigger import DefaultConversationInitiationTrigger from .delete_chapter_request import DeleteChapterRequest from .delete_chapter_response_model import DeleteChapterResponseModel from .delete_dubbing_response_model import DeleteDubbingResponseModel @@ -828,7 +1094,8 @@ from .podcast_project_response_model import PodcastProjectResponseModel from .podcast_text_source import PodcastTextSource from .podcast_url_source import PodcastUrlSource - from .position import Position + from .position_input import PositionInput + from .position_output import PositionOutput from .post_agent_avatar_response_model import PostAgentAvatarResponseModel from .post_workspace_secret_response_model import PostWorkspaceSecretResponseModel from .privacy_config import PrivacyConfig @@ -840,12 +1107,14 @@ from .project_extended_response_model_apply_text_normalization import ( ProjectExtendedResponseModelApplyTextNormalization, ) + from .project_extended_response_model_aspect_ratio import ProjectExtendedResponseModelAspectRatio from .project_extended_response_model_fiction import ProjectExtendedResponseModelFiction from .project_extended_response_model_quality_preset import ProjectExtendedResponseModelQualityPreset from .project_extended_response_model_source_type import ProjectExtendedResponseModelSourceType from .project_extended_response_model_target_audience import ProjectExtendedResponseModelTargetAudience from .project_response import ProjectResponse from .project_response_model_access_level import ProjectResponseModelAccessLevel + from .project_response_model_aspect_ratio import ProjectResponseModelAspectRatio from .project_response_model_fiction import ProjectResponseModelFiction from .project_response_model_source_type import ProjectResponseModelSourceType from .project_response_model_target_audience import ProjectResponseModelTargetAudience @@ -855,6 +1124,12 @@ from .project_state import ProjectState from .prompt_agent import PromptAgent from .prompt_agent_api_model_input import PromptAgentApiModelInput + from .prompt_agent_api_model_input_backup_llm_config import ( + PromptAgentApiModelInputBackupLlmConfig, + PromptAgentApiModelInputBackupLlmConfig_Default, + PromptAgentApiModelInputBackupLlmConfig_Disabled, + PromptAgentApiModelInputBackupLlmConfig_Override, + ) from .prompt_agent_api_model_input_tools_item import ( PromptAgentApiModelInputToolsItem, PromptAgentApiModelInputToolsItem_Client, @@ -863,6 +1138,12 @@ PromptAgentApiModelInputToolsItem_Webhook, ) from .prompt_agent_api_model_output import PromptAgentApiModelOutput + from .prompt_agent_api_model_output_backup_llm_config import ( + PromptAgentApiModelOutputBackupLlmConfig, + PromptAgentApiModelOutputBackupLlmConfig_Default, + PromptAgentApiModelOutputBackupLlmConfig_Disabled, + PromptAgentApiModelOutputBackupLlmConfig_Override, + ) from .prompt_agent_api_model_output_tools_item import ( PromptAgentApiModelOutputToolsItem, PromptAgentApiModelOutputToolsItem_Client, @@ -872,13 +1153,27 @@ ) from .prompt_agent_api_model_override import PromptAgentApiModelOverride from .prompt_agent_api_model_override_config import PromptAgentApiModelOverrideConfig - from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride - from .prompt_agent_api_model_workflow_override_tools_item import ( - PromptAgentApiModelWorkflowOverrideToolsItem, - PromptAgentApiModelWorkflowOverrideToolsItem_Client, - PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, - PromptAgentApiModelWorkflowOverrideToolsItem_System, - PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + from .prompt_agent_api_model_workflow_override_input import PromptAgentApiModelWorkflowOverrideInput + from .prompt_agent_api_model_workflow_override_input_backup_llm_config import ( + PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig, + ) + from .prompt_agent_api_model_workflow_override_input_tools_item import ( + PromptAgentApiModelWorkflowOverrideInputToolsItem, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideInputToolsItem_System, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook, + ) + from .prompt_agent_api_model_workflow_override_output import PromptAgentApiModelWorkflowOverrideOutput + from .prompt_agent_api_model_workflow_override_output_backup_llm_config import ( + PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig, + ) + from .prompt_agent_api_model_workflow_override_output_tools_item import ( + PromptAgentApiModelWorkflowOverrideOutputToolsItem, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook, ) from .prompt_agent_db_model import PromptAgentDbModel from .prompt_evaluation_criteria import PromptEvaluationCriteria @@ -928,6 +1223,7 @@ from .safety_rule import SafetyRule from .save_voice_preview_request import SaveVoicePreviewRequest from .secret_dependency_type import SecretDependencyType + from .section_source import SectionSource from .segment_create_response import SegmentCreateResponse from .segment_delete_response import SegmentDeleteResponse from .segment_dub_response import SegmentDubResponse @@ -1021,6 +1317,7 @@ from .text_to_speech_stream_request import TextToSpeechStreamRequest from .text_to_speech_stream_with_timestamps_request import TextToSpeechStreamWithTimestampsRequest from .text_to_speech_with_timestamps_request import TextToSpeechWithTimestampsRequest + from .time_range import TimeRange from .token_response_model import TokenResponseModel from .tool import Tool from .tool_annotations import ToolAnnotations @@ -1057,7 +1354,8 @@ from .tts_conversational_config_output import TtsConversationalConfigOutput from .tts_conversational_config_override import TtsConversationalConfigOverride from .tts_conversational_config_override_config import TtsConversationalConfigOverrideConfig - from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride + from .tts_conversational_config_workflow_override_input import TtsConversationalConfigWorkflowOverrideInput + from .tts_conversational_config_workflow_override_output import TtsConversationalConfigWorkflowOverrideOutput from .tts_conversational_model import TtsConversationalModel from .tts_model_family import TtsModelFamily from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency @@ -1067,6 +1365,8 @@ from .turn_mode import TurnMode from .twilio_outbound_call_response import TwilioOutboundCallResponse from .txt_export_options import TxtExportOptions + from .unit_test_common_model import UnitTestCommonModel + from .unit_test_common_model_dynamic_variables_value import UnitTestCommonModelDynamicVariablesValue from .unit_test_common_model_type import UnitTestCommonModelType from .unit_test_run_response_model import UnitTestRunResponseModel from .unit_test_summary_response_model import UnitTestSummaryResponseModel @@ -1118,6 +1418,7 @@ from .voice_verification_response import VoiceVerificationResponse from .voicemail_detection_tool_config import VoicemailDetectionToolConfig from .webhook_auth_method_type import WebhookAuthMethodType + from .webhook_event_type import WebhookEventType from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput from .webhook_tool_api_schema_config_input_method import WebhookToolApiSchemaConfigInputMethod from .webhook_tool_api_schema_config_input_request_headers_value import ( @@ -1133,6 +1434,20 @@ from .webhook_usage_type import WebhookUsageType from .websocket_tts_client_message_multi import WebsocketTtsClientMessageMulti from .websocket_tts_server_message_multi import WebsocketTtsServerMessageMulti + from .whats_app_business_account import WhatsAppBusinessAccount + from .whats_app_business_account_changes_item import ( + WhatsAppBusinessAccountChangesItem, + WhatsAppBusinessAccountChangesItem_Calls, + WhatsAppBusinessAccountChangesItem_Messages, + ) + from .whats_app_call import WhatsAppCall + from .whats_app_call_direction import WhatsAppCallDirection + from .whats_app_calls import WhatsAppCalls + from .whats_app_change_calls import WhatsAppChangeCalls + from .whats_app_change_messages import WhatsAppChangeMessages + from .whats_app_event_request import WhatsAppEventRequest + from .whats_app_metadata import WhatsAppMetadata + from .whats_app_session import WhatsAppSession from .widget_config import WidgetConfig from .widget_config_input_avatar import ( WidgetConfigInputAvatar, @@ -1160,51 +1475,95 @@ from .widget_placement import WidgetPlacement from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents - from .workflow_edge_model import WorkflowEdgeModel - from .workflow_edge_model_backward_condition import ( - WorkflowEdgeModelBackwardCondition, - WorkflowEdgeModelBackwardCondition_Expression, - WorkflowEdgeModelBackwardCondition_Llm, - WorkflowEdgeModelBackwardCondition_Result, - WorkflowEdgeModelBackwardCondition_Unconditional, - ) - from .workflow_edge_model_forward_condition import ( - WorkflowEdgeModelForwardCondition, - WorkflowEdgeModelForwardCondition_Expression, - WorkflowEdgeModelForwardCondition_Llm, - WorkflowEdgeModelForwardCondition_Result, - WorkflowEdgeModelForwardCondition_Unconditional, - ) - from .workflow_end_node_model import WorkflowEndNodeModel - from .workflow_expression_condition_model import WorkflowExpressionConditionModel - from .workflow_expression_condition_model_expression import ( - WorkflowExpressionConditionModelExpression, - WorkflowExpressionConditionModelExpression_AndOperator, - WorkflowExpressionConditionModelExpression_BooleanLiteral, - WorkflowExpressionConditionModelExpression_DynamicVariable, - WorkflowExpressionConditionModelExpression_EqOperator, - WorkflowExpressionConditionModelExpression_GtOperator, - WorkflowExpressionConditionModelExpression_GteOperator, - WorkflowExpressionConditionModelExpression_Llm, - WorkflowExpressionConditionModelExpression_LtOperator, - WorkflowExpressionConditionModelExpression_LteOperator, - WorkflowExpressionConditionModelExpression_NeqOperator, - WorkflowExpressionConditionModelExpression_NumberLiteral, - WorkflowExpressionConditionModelExpression_OrOperator, - WorkflowExpressionConditionModelExpression_StringLiteral, + from .workflow_edge_model_input import WorkflowEdgeModelInput + from .workflow_edge_model_input_backward_condition import ( + WorkflowEdgeModelInputBackwardCondition, + WorkflowEdgeModelInputBackwardCondition_Expression, + WorkflowEdgeModelInputBackwardCondition_Llm, + WorkflowEdgeModelInputBackwardCondition_Result, + WorkflowEdgeModelInputBackwardCondition_Unconditional, + ) + from .workflow_edge_model_input_forward_condition import ( + WorkflowEdgeModelInputForwardCondition, + WorkflowEdgeModelInputForwardCondition_Expression, + WorkflowEdgeModelInputForwardCondition_Llm, + WorkflowEdgeModelInputForwardCondition_Result, + WorkflowEdgeModelInputForwardCondition_Unconditional, + ) + from .workflow_edge_model_output import WorkflowEdgeModelOutput + from .workflow_edge_model_output_backward_condition import ( + WorkflowEdgeModelOutputBackwardCondition, + WorkflowEdgeModelOutputBackwardCondition_Expression, + WorkflowEdgeModelOutputBackwardCondition_Llm, + WorkflowEdgeModelOutputBackwardCondition_Result, + WorkflowEdgeModelOutputBackwardCondition_Unconditional, + ) + from .workflow_edge_model_output_forward_condition import ( + WorkflowEdgeModelOutputForwardCondition, + WorkflowEdgeModelOutputForwardCondition_Expression, + WorkflowEdgeModelOutputForwardCondition_Llm, + WorkflowEdgeModelOutputForwardCondition_Result, + WorkflowEdgeModelOutputForwardCondition_Unconditional, + ) + from .workflow_end_node_model_input import WorkflowEndNodeModelInput + from .workflow_end_node_model_output import WorkflowEndNodeModelOutput + from .workflow_expression_condition_model_input import WorkflowExpressionConditionModelInput + from .workflow_expression_condition_model_input_expression import ( + WorkflowExpressionConditionModelInputExpression, + WorkflowExpressionConditionModelInputExpression_AndOperator, + WorkflowExpressionConditionModelInputExpression_BooleanLiteral, + WorkflowExpressionConditionModelInputExpression_DynamicVariable, + WorkflowExpressionConditionModelInputExpression_EqOperator, + WorkflowExpressionConditionModelInputExpression_GtOperator, + WorkflowExpressionConditionModelInputExpression_GteOperator, + WorkflowExpressionConditionModelInputExpression_Llm, + WorkflowExpressionConditionModelInputExpression_LtOperator, + WorkflowExpressionConditionModelInputExpression_LteOperator, + WorkflowExpressionConditionModelInputExpression_NeqOperator, + WorkflowExpressionConditionModelInputExpression_NumberLiteral, + WorkflowExpressionConditionModelInputExpression_OrOperator, + WorkflowExpressionConditionModelInputExpression_StringLiteral, + ) + from .workflow_expression_condition_model_output import WorkflowExpressionConditionModelOutput + from .workflow_expression_condition_model_output_expression import ( + WorkflowExpressionConditionModelOutputExpression, + WorkflowExpressionConditionModelOutputExpression_AndOperator, + WorkflowExpressionConditionModelOutputExpression_BooleanLiteral, + WorkflowExpressionConditionModelOutputExpression_DynamicVariable, + WorkflowExpressionConditionModelOutputExpression_EqOperator, + WorkflowExpressionConditionModelOutputExpression_GtOperator, + WorkflowExpressionConditionModelOutputExpression_GteOperator, + WorkflowExpressionConditionModelOutputExpression_Llm, + WorkflowExpressionConditionModelOutputExpression_LtOperator, + WorkflowExpressionConditionModelOutputExpression_LteOperator, + WorkflowExpressionConditionModelOutputExpression_NeqOperator, + WorkflowExpressionConditionModelOutputExpression_NumberLiteral, + WorkflowExpressionConditionModelOutputExpression_OrOperator, + WorkflowExpressionConditionModelOutputExpression_StringLiteral, ) from .workflow_features_usage_common_model import WorkflowFeaturesUsageCommonModel - from .workflow_llm_condition_model import WorkflowLlmConditionModel - from .workflow_override_agent_node_model import WorkflowOverrideAgentNodeModel - from .workflow_phone_number_node_model import WorkflowPhoneNumberNodeModel - from .workflow_phone_number_node_model_transfer_destination import ( - WorkflowPhoneNumberNodeModelTransferDestination, - WorkflowPhoneNumberNodeModelTransferDestination_Phone, - WorkflowPhoneNumberNodeModelTransferDestination_SipUri, - ) - from .workflow_result_condition_model import WorkflowResultConditionModel - from .workflow_standalone_agent_node_model import WorkflowStandaloneAgentNodeModel - from .workflow_start_node_model import WorkflowStartNodeModel + from .workflow_llm_condition_model_input import WorkflowLlmConditionModelInput + from .workflow_llm_condition_model_output import WorkflowLlmConditionModelOutput + from .workflow_override_agent_node_model_input import WorkflowOverrideAgentNodeModelInput + from .workflow_override_agent_node_model_output import WorkflowOverrideAgentNodeModelOutput + from .workflow_phone_number_node_model_input import WorkflowPhoneNumberNodeModelInput + from .workflow_phone_number_node_model_input_transfer_destination import ( + WorkflowPhoneNumberNodeModelInputTransferDestination, + WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, + ) + from .workflow_phone_number_node_model_output import WorkflowPhoneNumberNodeModelOutput + from .workflow_phone_number_node_model_output_transfer_destination import ( + WorkflowPhoneNumberNodeModelOutputTransferDestination, + WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + ) + from .workflow_result_condition_model_input import WorkflowResultConditionModelInput + from .workflow_result_condition_model_output import WorkflowResultConditionModelOutput + from .workflow_standalone_agent_node_model_input import WorkflowStandaloneAgentNodeModelInput + from .workflow_standalone_agent_node_model_output import WorkflowStandaloneAgentNodeModelOutput + from .workflow_start_node_model_input import WorkflowStartNodeModelInput + from .workflow_start_node_model_output import WorkflowStartNodeModelOutput from .workflow_tool_edge_step_model import WorkflowToolEdgeStepModel from .workflow_tool_locator import WorkflowToolLocator from .workflow_tool_max_iterations_exceeded_step_model import WorkflowToolMaxIterationsExceededStepModel @@ -1216,7 +1575,8 @@ from .workflow_tool_nested_tools_step_model_output_results_item import ( WorkflowToolNestedToolsStepModelOutputResultsItem, ) - from .workflow_tool_node_model import WorkflowToolNodeModel + from .workflow_tool_node_model_input import WorkflowToolNodeModelInput + from .workflow_tool_node_model_output import WorkflowToolNodeModelOutput from .workflow_tool_response_model_input import WorkflowToolResponseModelInput from .workflow_tool_response_model_input_steps_item import ( WorkflowToolResponseModelInputStepsItem, @@ -1231,7 +1591,8 @@ WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded, WorkflowToolResponseModelOutputStepsItem_NestedTools, ) - from .workflow_unconditional_model import WorkflowUnconditionalModel + from .workflow_unconditional_model_input import WorkflowUnconditionalModelInput + from .workflow_unconditional_model_output import WorkflowUnconditionalModelOutput from .workspace_api_key_list_response_model import WorkspaceApiKeyListResponseModel from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel from .workspace_api_key_response_model_permissions_item import WorkspaceApiKeyResponseModelPermissionsItem @@ -1244,6 +1605,7 @@ from .workspace_webhook_list_response_model import WorkspaceWebhookListResponseModel from .workspace_webhook_response_model import WorkspaceWebhookResponseModel from .workspace_webhook_usage_response_model import WorkspaceWebhookUsageResponseModel + from .zendesk_conversation_initiation_trigger import ZendeskConversationInitiationTrigger _dynamic_imports: typing.Dict[str, str] = { "AddChapterResponseModel": ".add_chapter_response_model", "AddKnowledgeBaseResponseModel": ".add_knowledge_base_response_model", @@ -1262,9 +1624,11 @@ "Age": ".age", "AgentCallLimits": ".agent_call_limits", "AgentConfig": ".agent_config", - "AgentConfigApiModelWorkflowOverride": ".agent_config_api_model_workflow_override", - "AgentConfigOverride": ".agent_config_override", + "AgentConfigApiModelWorkflowOverrideInput": ".agent_config_api_model_workflow_override_input", + "AgentConfigApiModelWorkflowOverrideOutput": ".agent_config_api_model_workflow_override_output", "AgentConfigOverrideConfig": ".agent_config_override_config", + "AgentConfigOverrideInput": ".agent_config_override_input", + "AgentConfigOverrideOutput": ".agent_config_override_output", "AgentFailureResponseExample": ".agent_failure_response_example", "AgentMetadata": ".agent_metadata", "AgentMetadataResponseModel": ".agent_metadata_response_model", @@ -1284,6 +1648,14 @@ "AgentWorkflowRequestModelNodesValue_StandaloneAgent": ".agent_workflow_request_model_nodes_value", "AgentWorkflowRequestModelNodesValue_Start": ".agent_workflow_request_model_nodes_value", "AgentWorkflowRequestModelNodesValue_Tool": ".agent_workflow_request_model_nodes_value", + "AgentWorkflowResponseModel": ".agent_workflow_response_model", + "AgentWorkflowResponseModelNodesValue": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_End": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_OverrideAgent": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_PhoneNumber": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_StandaloneAgent": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_Start": ".agent_workflow_response_model_nodes_value", + "AgentWorkflowResponseModelNodesValue_Tool": ".agent_workflow_response_model_nodes_value", "AgentWorkspaceOverridesInput": ".agent_workspace_overrides_input", "AgentWorkspaceOverridesOutput": ".agent_workspace_overrides_output", "Alignment": ".alignment", @@ -1297,215 +1669,426 @@ "AsrInputFormat": ".asr_input_format", "AsrProvider": ".asr_provider", "AsrQuality": ".asr_quality", - "AstAndOperatorNode": ".ast_and_operator_node", - "AstAndOperatorNodeChildrenItem": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_AndOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_BooleanLiteral": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_DynamicVariable": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_EqOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_GtOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_GteOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_Llm": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_LtOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_LteOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_NeqOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_NumberLiteral": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_OrOperator": ".ast_and_operator_node_children_item", - "AstAndOperatorNodeChildrenItem_StringLiteral": ".ast_and_operator_node_children_item", - "AstBooleanNode": ".ast_boolean_node", - "AstDynamicVariableNode": ".ast_dynamic_variable_node", - "AstEqualsOperatorNode": ".ast_equals_operator_node", - "AstEqualsOperatorNodeLeft": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_AndOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_BooleanLiteral": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_DynamicVariable": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_EqOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_GtOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_GteOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_Llm": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_LtOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_LteOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_NeqOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_NumberLiteral": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_OrOperator": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeLeft_StringLiteral": ".ast_equals_operator_node_left", - "AstEqualsOperatorNodeRight": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_AndOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_BooleanLiteral": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_DynamicVariable": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_EqOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_GtOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_GteOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_Llm": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_LtOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_LteOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_NeqOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_NumberLiteral": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_OrOperator": ".ast_equals_operator_node_right", - "AstEqualsOperatorNodeRight_StringLiteral": ".ast_equals_operator_node_right", - "AstGreaterThanOperatorNode": ".ast_greater_than_operator_node", - "AstGreaterThanOperatorNodeLeft": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_AndOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_BooleanLiteral": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_DynamicVariable": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_EqOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_GtOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_GteOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_Llm": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_LtOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_LteOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_NeqOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_NumberLiteral": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_OrOperator": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeLeft_StringLiteral": ".ast_greater_than_operator_node_left", - "AstGreaterThanOperatorNodeRight": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_AndOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_BooleanLiteral": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_DynamicVariable": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_EqOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_GtOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_GteOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_Llm": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_LtOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_LteOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_NeqOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_NumberLiteral": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_OrOperator": ".ast_greater_than_operator_node_right", - "AstGreaterThanOperatorNodeRight_StringLiteral": ".ast_greater_than_operator_node_right", - "AstGreaterThanOrEqualsOperatorNode": ".ast_greater_than_or_equals_operator_node", - "AstGreaterThanOrEqualsOperatorNodeLeft": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_Llm": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral": ".ast_greater_than_or_equals_operator_node_left", - "AstGreaterThanOrEqualsOperatorNodeRight": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_Llm": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator": ".ast_greater_than_or_equals_operator_node_right", - "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral": ".ast_greater_than_or_equals_operator_node_right", - "AstLessThanOperatorNode": ".ast_less_than_operator_node", - "AstLessThanOperatorNodeLeft": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_AndOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_BooleanLiteral": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_DynamicVariable": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_EqOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_GtOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_GteOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_Llm": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_LtOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_LteOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_NeqOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_NumberLiteral": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_OrOperator": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeLeft_StringLiteral": ".ast_less_than_operator_node_left", - "AstLessThanOperatorNodeRight": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_AndOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_BooleanLiteral": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_DynamicVariable": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_EqOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_GtOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_GteOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_Llm": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_LtOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_LteOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_NeqOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_NumberLiteral": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_OrOperator": ".ast_less_than_operator_node_right", - "AstLessThanOperatorNodeRight_StringLiteral": ".ast_less_than_operator_node_right", - "AstLessThanOrEqualsOperatorNode": ".ast_less_than_or_equals_operator_node", - "AstLessThanOrEqualsOperatorNodeLeft": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_AndOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_EqOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_GtOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_GteOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_Llm": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_LtOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_LteOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_OrOperator": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral": ".ast_less_than_or_equals_operator_node_left", - "AstLessThanOrEqualsOperatorNodeRight": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_AndOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_EqOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_GtOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_GteOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_Llm": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_LtOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_LteOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_NeqOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_OrOperator": ".ast_less_than_or_equals_operator_node_right", - "AstLessThanOrEqualsOperatorNodeRight_StringLiteral": ".ast_less_than_or_equals_operator_node_right", - "AstNotEqualsOperatorNode": ".ast_not_equals_operator_node", - "AstNotEqualsOperatorNodeLeft": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_AndOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_BooleanLiteral": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_DynamicVariable": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_EqOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_GtOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_GteOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_Llm": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_LtOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_LteOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_NeqOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_NumberLiteral": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_OrOperator": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeLeft_StringLiteral": ".ast_not_equals_operator_node_left", - "AstNotEqualsOperatorNodeRight": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_AndOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_BooleanLiteral": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_DynamicVariable": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_EqOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_GtOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_GteOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_Llm": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_LtOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_LteOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_NeqOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_NumberLiteral": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_OrOperator": ".ast_not_equals_operator_node_right", - "AstNotEqualsOperatorNodeRight_StringLiteral": ".ast_not_equals_operator_node_right", - "AstNumberNode": ".ast_number_node", - "AstOrOperatorNode": ".ast_or_operator_node", - "AstOrOperatorNodeChildrenItem": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_AndOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_BooleanLiteral": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_DynamicVariable": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_EqOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_GtOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_GteOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_Llm": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_LtOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_LteOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_NeqOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_NumberLiteral": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_OrOperator": ".ast_or_operator_node_children_item", - "AstOrOperatorNodeChildrenItem_StringLiteral": ".ast_or_operator_node_children_item", - "AstStringNode": ".ast_string_node", - "AstllmNode": ".astllm_node", + "AstAndOperatorNodeInput": ".ast_and_operator_node_input", + "AstAndOperatorNodeInputChildrenItem": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_AndOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_BooleanLiteral": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_DynamicVariable": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_EqOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_GtOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_GteOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_Llm": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_LtOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_LteOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_NeqOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_NumberLiteral": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_OrOperator": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeInputChildrenItem_StringLiteral": ".ast_and_operator_node_input_children_item", + "AstAndOperatorNodeOutput": ".ast_and_operator_node_output", + "AstAndOperatorNodeOutputChildrenItem": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_AndOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_BooleanLiteral": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_DynamicVariable": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_EqOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_GtOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_GteOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_Llm": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_LtOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_LteOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_NeqOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_NumberLiteral": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_OrOperator": ".ast_and_operator_node_output_children_item", + "AstAndOperatorNodeOutputChildrenItem_StringLiteral": ".ast_and_operator_node_output_children_item", + "AstBooleanNodeInput": ".ast_boolean_node_input", + "AstBooleanNodeOutput": ".ast_boolean_node_output", + "AstDynamicVariableNodeInput": ".ast_dynamic_variable_node_input", + "AstDynamicVariableNodeOutput": ".ast_dynamic_variable_node_output", + "AstEqualsOperatorNodeInput": ".ast_equals_operator_node_input", + "AstEqualsOperatorNodeInputLeft": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_AndOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_BooleanLiteral": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_DynamicVariable": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_EqOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_GtOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_GteOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_Llm": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_LtOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_LteOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_NeqOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_NumberLiteral": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_OrOperator": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputLeft_StringLiteral": ".ast_equals_operator_node_input_left", + "AstEqualsOperatorNodeInputRight": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_AndOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_BooleanLiteral": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_DynamicVariable": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_EqOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_GtOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_GteOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_Llm": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_LtOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_LteOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_NeqOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_NumberLiteral": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_OrOperator": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeInputRight_StringLiteral": ".ast_equals_operator_node_input_right", + "AstEqualsOperatorNodeOutput": ".ast_equals_operator_node_output", + "AstEqualsOperatorNodeOutputLeft": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_AndOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_BooleanLiteral": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_DynamicVariable": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_EqOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_GtOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_GteOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_Llm": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_LtOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_LteOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_NeqOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_NumberLiteral": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_OrOperator": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputLeft_StringLiteral": ".ast_equals_operator_node_output_left", + "AstEqualsOperatorNodeOutputRight": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_AndOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_BooleanLiteral": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_DynamicVariable": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_EqOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_GtOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_GteOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_Llm": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_LtOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_LteOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_NeqOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_NumberLiteral": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_OrOperator": ".ast_equals_operator_node_output_right", + "AstEqualsOperatorNodeOutputRight_StringLiteral": ".ast_equals_operator_node_output_right", + "AstGreaterThanOperatorNodeInput": ".ast_greater_than_operator_node_input", + "AstGreaterThanOperatorNodeInputLeft": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_AndOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_BooleanLiteral": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_DynamicVariable": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_EqOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_GtOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_GteOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_Llm": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_LtOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_LteOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_NeqOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_NumberLiteral": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_OrOperator": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputLeft_StringLiteral": ".ast_greater_than_operator_node_input_left", + "AstGreaterThanOperatorNodeInputRight": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_AndOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_BooleanLiteral": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_DynamicVariable": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_EqOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_GtOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_GteOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_Llm": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_LtOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_LteOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_NeqOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_NumberLiteral": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_OrOperator": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeInputRight_StringLiteral": ".ast_greater_than_operator_node_input_right", + "AstGreaterThanOperatorNodeOutput": ".ast_greater_than_operator_node_output", + "AstGreaterThanOperatorNodeOutputLeft": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_AndOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_DynamicVariable": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_EqOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_GtOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_GteOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_Llm": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_LtOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_LteOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_NeqOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_NumberLiteral": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_OrOperator": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputLeft_StringLiteral": ".ast_greater_than_operator_node_output_left", + "AstGreaterThanOperatorNodeOutputRight": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_AndOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_BooleanLiteral": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_DynamicVariable": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_EqOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_GtOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_GteOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_Llm": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_LtOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_LteOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_NeqOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_NumberLiteral": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_OrOperator": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOperatorNodeOutputRight_StringLiteral": ".ast_greater_than_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeInput": ".ast_greater_than_or_equals_operator_node_input", + "AstGreaterThanOrEqualsOperatorNodeInputLeft": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral": ".ast_greater_than_or_equals_operator_node_input_left", + "AstGreaterThanOrEqualsOperatorNodeInputRight": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_Llm": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral": ".ast_greater_than_or_equals_operator_node_input_right", + "AstGreaterThanOrEqualsOperatorNodeOutput": ".ast_greater_than_or_equals_operator_node_output", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral": ".ast_greater_than_or_equals_operator_node_output_left", + "AstGreaterThanOrEqualsOperatorNodeOutputRight": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator": ".ast_greater_than_or_equals_operator_node_output_right", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral": ".ast_greater_than_or_equals_operator_node_output_right", + "AstLessThanOperatorNodeInput": ".ast_less_than_operator_node_input", + "AstLessThanOperatorNodeInputLeft": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_AndOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_BooleanLiteral": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_DynamicVariable": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_EqOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_GtOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_GteOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_Llm": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_LtOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_LteOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_NeqOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_NumberLiteral": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_OrOperator": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputLeft_StringLiteral": ".ast_less_than_operator_node_input_left", + "AstLessThanOperatorNodeInputRight": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_AndOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_BooleanLiteral": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_DynamicVariable": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_EqOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_GtOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_GteOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_Llm": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_LtOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_LteOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_NeqOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_NumberLiteral": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_OrOperator": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeInputRight_StringLiteral": ".ast_less_than_operator_node_input_right", + "AstLessThanOperatorNodeOutput": ".ast_less_than_operator_node_output", + "AstLessThanOperatorNodeOutputLeft": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_AndOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_BooleanLiteral": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_DynamicVariable": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_EqOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_GtOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_GteOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_Llm": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_LtOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_LteOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_NeqOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_NumberLiteral": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_OrOperator": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputLeft_StringLiteral": ".ast_less_than_operator_node_output_left", + "AstLessThanOperatorNodeOutputRight": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_AndOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_BooleanLiteral": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_DynamicVariable": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_EqOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_GtOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_GteOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_Llm": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_LtOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_LteOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_NeqOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_NumberLiteral": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_OrOperator": ".ast_less_than_operator_node_output_right", + "AstLessThanOperatorNodeOutputRight_StringLiteral": ".ast_less_than_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeInput": ".ast_less_than_or_equals_operator_node_input", + "AstLessThanOrEqualsOperatorNodeInputLeft": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_Llm": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral": ".ast_less_than_or_equals_operator_node_input_left", + "AstLessThanOrEqualsOperatorNodeInputRight": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_AndOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_EqOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_GtOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_GteOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_Llm": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_LtOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_LteOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_OrOperator": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral": ".ast_less_than_or_equals_operator_node_input_right", + "AstLessThanOrEqualsOperatorNodeOutput": ".ast_less_than_or_equals_operator_node_output", + "AstLessThanOrEqualsOperatorNodeOutputLeft": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_Llm": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral": ".ast_less_than_or_equals_operator_node_output_left", + "AstLessThanOrEqualsOperatorNodeOutputRight": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_Llm": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator": ".ast_less_than_or_equals_operator_node_output_right", + "AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral": ".ast_less_than_or_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeInput": ".ast_not_equals_operator_node_input", + "AstNotEqualsOperatorNodeInputLeft": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_AndOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_BooleanLiteral": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_DynamicVariable": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_EqOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_GtOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_GteOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_Llm": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_LtOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_LteOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_NeqOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_NumberLiteral": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_OrOperator": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputLeft_StringLiteral": ".ast_not_equals_operator_node_input_left", + "AstNotEqualsOperatorNodeInputRight": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_AndOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_BooleanLiteral": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_DynamicVariable": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_EqOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_GtOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_GteOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_Llm": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_LtOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_LteOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_NeqOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_NumberLiteral": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_OrOperator": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeInputRight_StringLiteral": ".ast_not_equals_operator_node_input_right", + "AstNotEqualsOperatorNodeOutput": ".ast_not_equals_operator_node_output", + "AstNotEqualsOperatorNodeOutputLeft": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_AndOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_DynamicVariable": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_EqOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_GtOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_GteOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_Llm": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_LtOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_LteOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_NeqOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_NumberLiteral": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_OrOperator": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputLeft_StringLiteral": ".ast_not_equals_operator_node_output_left", + "AstNotEqualsOperatorNodeOutputRight": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_AndOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_BooleanLiteral": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_DynamicVariable": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_EqOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_GtOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_GteOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_Llm": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_LtOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_LteOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_NeqOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_NumberLiteral": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_OrOperator": ".ast_not_equals_operator_node_output_right", + "AstNotEqualsOperatorNodeOutputRight_StringLiteral": ".ast_not_equals_operator_node_output_right", + "AstNumberNodeInput": ".ast_number_node_input", + "AstNumberNodeOutput": ".ast_number_node_output", + "AstOrOperatorNodeInput": ".ast_or_operator_node_input", + "AstOrOperatorNodeInputChildrenItem": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_AndOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_BooleanLiteral": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_DynamicVariable": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_EqOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_GtOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_GteOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_Llm": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_LtOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_LteOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_NeqOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_NumberLiteral": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_OrOperator": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeInputChildrenItem_StringLiteral": ".ast_or_operator_node_input_children_item", + "AstOrOperatorNodeOutput": ".ast_or_operator_node_output", + "AstOrOperatorNodeOutputChildrenItem": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_AndOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_BooleanLiteral": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_DynamicVariable": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_EqOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_GtOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_GteOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_Llm": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_LtOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_LteOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_NeqOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_NumberLiteral": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_OrOperator": ".ast_or_operator_node_output_children_item", + "AstOrOperatorNodeOutputChildrenItem_StringLiteral": ".ast_or_operator_node_output_children_item", + "AstStringNodeInput": ".ast_string_node_input", + "AstStringNodeOutput": ".ast_string_node_output", + "AstllmNodeInput": ".astllm_node_input", + "AstllmNodeOutput": ".astllm_node_output", + "AsyncConversationMetadata": ".async_conversation_metadata", + "AsyncConversationMetadataDeliveryStatus": ".async_conversation_metadata_delivery_status", "AttachedTestModel": ".attached_test_model", "AudioNativeCreateProjectResponseModel": ".audio_native_create_project_response_model", "AudioNativeEditContentResponseModel": ".audio_native_edit_content_response_model", @@ -1517,6 +2100,9 @@ "AuthConnectionLocator": ".auth_connection_locator", "AuthSettings": ".auth_settings", "AuthorizationMethod": ".authorization_method", + "BackupLlmDefault": ".backup_llm_default", + "BackupLlmDisabled": ".backup_llm_disabled", + "BackupLlmOverride": ".backup_llm_override", "BadRequestErrorBody": ".bad_request_error_body", "BanReasonType": ".ban_reason_type", "BatchCallDetailedResponse": ".batch_call_detailed_response", @@ -1528,7 +2114,8 @@ "BreakdownTypes": ".breakdown_types", "BuiltInToolsInput": ".built_in_tools_input", "BuiltInToolsOutput": ".built_in_tools_output", - "BuiltInToolsWorkflowOverride": ".built_in_tools_workflow_override", + "BuiltInToolsWorkflowOverrideInput": ".built_in_tools_workflow_override_input", + "BuiltInToolsWorkflowOverrideOutput": ".built_in_tools_workflow_override_output", "CaptionStyleCharacterAnimationModel": ".caption_style_character_animation_model", "CaptionStyleCharacterAnimationModelEnterType": ".caption_style_character_animation_model_enter_type", "CaptionStyleCharacterAnimationModelExitType": ".caption_style_character_animation_model_exit_type", @@ -1604,6 +2191,9 @@ "ConversationHistoryEvaluationCriteriaResultCommonModel": ".conversation_history_evaluation_criteria_result_common_model", "ConversationHistoryFeedbackCommonModel": ".conversation_history_feedback_common_model", "ConversationHistoryMetadataCommonModel": ".conversation_history_metadata_common_model", + "ConversationHistoryMetadataCommonModelInitiationTrigger": ".conversation_history_metadata_common_model_initiation_trigger", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Default": ".conversation_history_metadata_common_model_initiation_trigger", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk": ".conversation_history_metadata_common_model_initiation_trigger", "ConversationHistoryMetadataCommonModelPhoneCall": ".conversation_history_metadata_common_model_phone_call", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking": ".conversation_history_metadata_common_model_phone_call", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio": ".conversation_history_metadata_common_model_phone_call", @@ -1670,7 +2260,8 @@ "ConversationTokenPurpose": ".conversation_token_purpose", "ConversationTurnMetrics": ".conversation_turn_metrics", "ConversationalConfig": ".conversational_config", - "ConversationalConfigApiModelWorkflowOverride": ".conversational_config_api_model_workflow_override", + "ConversationalConfigApiModelWorkflowOverrideInput": ".conversational_config_api_model_workflow_override_input", + "ConversationalConfigApiModelWorkflowOverrideOutput": ".conversational_config_api_model_workflow_override_output", "ConvertChapterResponseModel": ".convert_chapter_response_model", "ConvertProjectResponseModel": ".convert_project_response_model", "CreateAgentResponseModel": ".create_agent_response_model", @@ -1688,6 +2279,7 @@ "DashboardCriteriaChartModel": ".dashboard_criteria_chart_model", "DashboardDataCollectionChartModel": ".dashboard_data_collection_chart_model", "DataCollectionResultCommonModel": ".data_collection_result_common_model", + "DefaultConversationInitiationTrigger": ".default_conversation_initiation_trigger", "DeleteChapterRequest": ".delete_chapter_request", "DeleteChapterResponseModel": ".delete_chapter_response_model", "DeleteDubbingResponseModel": ".delete_dubbing_response_model", @@ -1943,7 +2535,8 @@ "PodcastProjectResponseModel": ".podcast_project_response_model", "PodcastTextSource": ".podcast_text_source", "PodcastUrlSource": ".podcast_url_source", - "Position": ".position", + "PositionInput": ".position_input", + "PositionOutput": ".position_output", "PostAgentAvatarResponseModel": ".post_agent_avatar_response_model", "PostWorkspaceSecretResponseModel": ".post_workspace_secret_response_model", "PrivacyConfig": ".privacy_config", @@ -1953,12 +2546,14 @@ "ProjectExtendedResponse": ".project_extended_response", "ProjectExtendedResponseModelAccessLevel": ".project_extended_response_model_access_level", "ProjectExtendedResponseModelApplyTextNormalization": ".project_extended_response_model_apply_text_normalization", + "ProjectExtendedResponseModelAspectRatio": ".project_extended_response_model_aspect_ratio", "ProjectExtendedResponseModelFiction": ".project_extended_response_model_fiction", "ProjectExtendedResponseModelQualityPreset": ".project_extended_response_model_quality_preset", "ProjectExtendedResponseModelSourceType": ".project_extended_response_model_source_type", "ProjectExtendedResponseModelTargetAudience": ".project_extended_response_model_target_audience", "ProjectResponse": ".project_response", "ProjectResponseModelAccessLevel": ".project_response_model_access_level", + "ProjectResponseModelAspectRatio": ".project_response_model_aspect_ratio", "ProjectResponseModelFiction": ".project_response_model_fiction", "ProjectResponseModelSourceType": ".project_response_model_source_type", "ProjectResponseModelTargetAudience": ".project_response_model_target_audience", @@ -1968,12 +2563,20 @@ "ProjectState": ".project_state", "PromptAgent": ".prompt_agent", "PromptAgentApiModelInput": ".prompt_agent_api_model_input", + "PromptAgentApiModelInputBackupLlmConfig": ".prompt_agent_api_model_input_backup_llm_config", + "PromptAgentApiModelInputBackupLlmConfig_Default": ".prompt_agent_api_model_input_backup_llm_config", + "PromptAgentApiModelInputBackupLlmConfig_Disabled": ".prompt_agent_api_model_input_backup_llm_config", + "PromptAgentApiModelInputBackupLlmConfig_Override": ".prompt_agent_api_model_input_backup_llm_config", "PromptAgentApiModelInputToolsItem": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_Client": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_Mcp": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_System": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_Webhook": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelOutput": ".prompt_agent_api_model_output", + "PromptAgentApiModelOutputBackupLlmConfig": ".prompt_agent_api_model_output_backup_llm_config", + "PromptAgentApiModelOutputBackupLlmConfig_Default": ".prompt_agent_api_model_output_backup_llm_config", + "PromptAgentApiModelOutputBackupLlmConfig_Disabled": ".prompt_agent_api_model_output_backup_llm_config", + "PromptAgentApiModelOutputBackupLlmConfig_Override": ".prompt_agent_api_model_output_backup_llm_config", "PromptAgentApiModelOutputToolsItem": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOutputToolsItem_Client": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOutputToolsItem_Mcp": ".prompt_agent_api_model_output_tools_item", @@ -1981,12 +2584,20 @@ "PromptAgentApiModelOutputToolsItem_Webhook": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOverride": ".prompt_agent_api_model_override", "PromptAgentApiModelOverrideConfig": ".prompt_agent_api_model_override_config", - "PromptAgentApiModelWorkflowOverride": ".prompt_agent_api_model_workflow_override", - "PromptAgentApiModelWorkflowOverrideToolsItem": ".prompt_agent_api_model_workflow_override_tools_item", - "PromptAgentApiModelWorkflowOverrideToolsItem_Client": ".prompt_agent_api_model_workflow_override_tools_item", - "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_tools_item", - "PromptAgentApiModelWorkflowOverrideToolsItem_System": ".prompt_agent_api_model_workflow_override_tools_item", - "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook": ".prompt_agent_api_model_workflow_override_tools_item", + "PromptAgentApiModelWorkflowOverrideInput": ".prompt_agent_api_model_workflow_override_input", + "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig": ".prompt_agent_api_model_workflow_override_input_backup_llm_config", + "PromptAgentApiModelWorkflowOverrideInputToolsItem": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_System": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideOutput": ".prompt_agent_api_model_workflow_override_output", + "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig": ".prompt_agent_api_model_workflow_override_output_backup_llm_config", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem": ".prompt_agent_api_model_workflow_override_output_tools_item", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client": ".prompt_agent_api_model_workflow_override_output_tools_item", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_output_tools_item", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System": ".prompt_agent_api_model_workflow_override_output_tools_item", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook": ".prompt_agent_api_model_workflow_override_output_tools_item", "PromptAgentDbModel": ".prompt_agent_db_model", "PromptEvaluationCriteria": ".prompt_evaluation_criteria", "PronunciationDictionaryAliasRuleRequestModel": ".pronunciation_dictionary_alias_rule_request_model", @@ -2031,6 +2642,7 @@ "SafetyRule": ".safety_rule", "SaveVoicePreviewRequest": ".save_voice_preview_request", "SecretDependencyType": ".secret_dependency_type", + "SectionSource": ".section_source", "SegmentCreateResponse": ".segment_create_response", "SegmentDeleteResponse": ".segment_delete_response", "SegmentDubResponse": ".segment_dub_response", @@ -2120,6 +2732,7 @@ "TextToSpeechStreamRequest": ".text_to_speech_stream_request", "TextToSpeechStreamWithTimestampsRequest": ".text_to_speech_stream_with_timestamps_request", "TextToSpeechWithTimestampsRequest": ".text_to_speech_with_timestamps_request", + "TimeRange": ".time_range", "TokenResponseModel": ".token_response_model", "Tool": ".tool", "ToolAnnotations": ".tool_annotations", @@ -2152,7 +2765,8 @@ "TtsConversationalConfigOutput": ".tts_conversational_config_output", "TtsConversationalConfigOverride": ".tts_conversational_config_override", "TtsConversationalConfigOverrideConfig": ".tts_conversational_config_override_config", - "TtsConversationalConfigWorkflowOverride": ".tts_conversational_config_workflow_override", + "TtsConversationalConfigWorkflowOverrideInput": ".tts_conversational_config_workflow_override_input", + "TtsConversationalConfigWorkflowOverrideOutput": ".tts_conversational_config_workflow_override_output", "TtsConversationalModel": ".tts_conversational_model", "TtsModelFamily": ".tts_model_family", "TtsOptimizeStreamingLatency": ".tts_optimize_streaming_latency", @@ -2162,6 +2776,8 @@ "TurnMode": ".turn_mode", "TwilioOutboundCallResponse": ".twilio_outbound_call_response", "TxtExportOptions": ".txt_export_options", + "UnitTestCommonModel": ".unit_test_common_model", + "UnitTestCommonModelDynamicVariablesValue": ".unit_test_common_model_dynamic_variables_value", "UnitTestCommonModelType": ".unit_test_common_model_type", "UnitTestRunResponseModel": ".unit_test_run_response_model", "UnitTestSummaryResponseModel": ".unit_test_summary_response_model", @@ -2211,6 +2827,7 @@ "VoiceVerificationResponse": ".voice_verification_response", "VoicemailDetectionToolConfig": ".voicemail_detection_tool_config", "WebhookAuthMethodType": ".webhook_auth_method_type", + "WebhookEventType": ".webhook_event_type", "WebhookToolApiSchemaConfigInput": ".webhook_tool_api_schema_config_input", "WebhookToolApiSchemaConfigInputMethod": ".webhook_tool_api_schema_config_input_method", "WebhookToolApiSchemaConfigInputRequestHeadersValue": ".webhook_tool_api_schema_config_input_request_headers_value", @@ -2222,6 +2839,18 @@ "WebhookUsageType": ".webhook_usage_type", "WebsocketTtsClientMessageMulti": ".websocket_tts_client_message_multi", "WebsocketTtsServerMessageMulti": ".websocket_tts_server_message_multi", + "WhatsAppBusinessAccount": ".whats_app_business_account", + "WhatsAppBusinessAccountChangesItem": ".whats_app_business_account_changes_item", + "WhatsAppBusinessAccountChangesItem_Calls": ".whats_app_business_account_changes_item", + "WhatsAppBusinessAccountChangesItem_Messages": ".whats_app_business_account_changes_item", + "WhatsAppCall": ".whats_app_call", + "WhatsAppCallDirection": ".whats_app_call_direction", + "WhatsAppCalls": ".whats_app_calls", + "WhatsAppChangeCalls": ".whats_app_change_calls", + "WhatsAppChangeMessages": ".whats_app_change_messages", + "WhatsAppEventRequest": ".whats_app_event_request", + "WhatsAppMetadata": ".whats_app_metadata", + "WhatsAppSession": ".whats_app_session", "WidgetConfig": ".widget_config", "WidgetConfigInputAvatar": ".widget_config_input_avatar", "WidgetConfigInputAvatar_Image": ".widget_config_input_avatar", @@ -2243,43 +2872,79 @@ "WidgetPlacement": ".widget_placement", "WidgetStyles": ".widget_styles", "WidgetTextContents": ".widget_text_contents", - "WorkflowEdgeModel": ".workflow_edge_model", - "WorkflowEdgeModelBackwardCondition": ".workflow_edge_model_backward_condition", - "WorkflowEdgeModelBackwardCondition_Expression": ".workflow_edge_model_backward_condition", - "WorkflowEdgeModelBackwardCondition_Llm": ".workflow_edge_model_backward_condition", - "WorkflowEdgeModelBackwardCondition_Result": ".workflow_edge_model_backward_condition", - "WorkflowEdgeModelBackwardCondition_Unconditional": ".workflow_edge_model_backward_condition", - "WorkflowEdgeModelForwardCondition": ".workflow_edge_model_forward_condition", - "WorkflowEdgeModelForwardCondition_Expression": ".workflow_edge_model_forward_condition", - "WorkflowEdgeModelForwardCondition_Llm": ".workflow_edge_model_forward_condition", - "WorkflowEdgeModelForwardCondition_Result": ".workflow_edge_model_forward_condition", - "WorkflowEdgeModelForwardCondition_Unconditional": ".workflow_edge_model_forward_condition", - "WorkflowEndNodeModel": ".workflow_end_node_model", - "WorkflowExpressionConditionModel": ".workflow_expression_condition_model", - "WorkflowExpressionConditionModelExpression": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_AndOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_BooleanLiteral": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_DynamicVariable": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_EqOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_GtOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_GteOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_Llm": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_LtOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_LteOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_NeqOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_NumberLiteral": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_OrOperator": ".workflow_expression_condition_model_expression", - "WorkflowExpressionConditionModelExpression_StringLiteral": ".workflow_expression_condition_model_expression", + "WorkflowEdgeModelInput": ".workflow_edge_model_input", + "WorkflowEdgeModelInputBackwardCondition": ".workflow_edge_model_input_backward_condition", + "WorkflowEdgeModelInputBackwardCondition_Expression": ".workflow_edge_model_input_backward_condition", + "WorkflowEdgeModelInputBackwardCondition_Llm": ".workflow_edge_model_input_backward_condition", + "WorkflowEdgeModelInputBackwardCondition_Result": ".workflow_edge_model_input_backward_condition", + "WorkflowEdgeModelInputBackwardCondition_Unconditional": ".workflow_edge_model_input_backward_condition", + "WorkflowEdgeModelInputForwardCondition": ".workflow_edge_model_input_forward_condition", + "WorkflowEdgeModelInputForwardCondition_Expression": ".workflow_edge_model_input_forward_condition", + "WorkflowEdgeModelInputForwardCondition_Llm": ".workflow_edge_model_input_forward_condition", + "WorkflowEdgeModelInputForwardCondition_Result": ".workflow_edge_model_input_forward_condition", + "WorkflowEdgeModelInputForwardCondition_Unconditional": ".workflow_edge_model_input_forward_condition", + "WorkflowEdgeModelOutput": ".workflow_edge_model_output", + "WorkflowEdgeModelOutputBackwardCondition": ".workflow_edge_model_output_backward_condition", + "WorkflowEdgeModelOutputBackwardCondition_Expression": ".workflow_edge_model_output_backward_condition", + "WorkflowEdgeModelOutputBackwardCondition_Llm": ".workflow_edge_model_output_backward_condition", + "WorkflowEdgeModelOutputBackwardCondition_Result": ".workflow_edge_model_output_backward_condition", + "WorkflowEdgeModelOutputBackwardCondition_Unconditional": ".workflow_edge_model_output_backward_condition", + "WorkflowEdgeModelOutputForwardCondition": ".workflow_edge_model_output_forward_condition", + "WorkflowEdgeModelOutputForwardCondition_Expression": ".workflow_edge_model_output_forward_condition", + "WorkflowEdgeModelOutputForwardCondition_Llm": ".workflow_edge_model_output_forward_condition", + "WorkflowEdgeModelOutputForwardCondition_Result": ".workflow_edge_model_output_forward_condition", + "WorkflowEdgeModelOutputForwardCondition_Unconditional": ".workflow_edge_model_output_forward_condition", + "WorkflowEndNodeModelInput": ".workflow_end_node_model_input", + "WorkflowEndNodeModelOutput": ".workflow_end_node_model_output", + "WorkflowExpressionConditionModelInput": ".workflow_expression_condition_model_input", + "WorkflowExpressionConditionModelInputExpression": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_AndOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_BooleanLiteral": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_DynamicVariable": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_EqOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_GtOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_GteOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_Llm": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_LtOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_LteOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_NeqOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_NumberLiteral": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_OrOperator": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelInputExpression_StringLiteral": ".workflow_expression_condition_model_input_expression", + "WorkflowExpressionConditionModelOutput": ".workflow_expression_condition_model_output", + "WorkflowExpressionConditionModelOutputExpression": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_AndOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_BooleanLiteral": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_DynamicVariable": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_EqOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_GtOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_GteOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_Llm": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_LtOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_LteOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_NeqOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_NumberLiteral": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_OrOperator": ".workflow_expression_condition_model_output_expression", + "WorkflowExpressionConditionModelOutputExpression_StringLiteral": ".workflow_expression_condition_model_output_expression", "WorkflowFeaturesUsageCommonModel": ".workflow_features_usage_common_model", - "WorkflowLlmConditionModel": ".workflow_llm_condition_model", - "WorkflowOverrideAgentNodeModel": ".workflow_override_agent_node_model", - "WorkflowPhoneNumberNodeModel": ".workflow_phone_number_node_model", - "WorkflowPhoneNumberNodeModelTransferDestination": ".workflow_phone_number_node_model_transfer_destination", - "WorkflowPhoneNumberNodeModelTransferDestination_Phone": ".workflow_phone_number_node_model_transfer_destination", - "WorkflowPhoneNumberNodeModelTransferDestination_SipUri": ".workflow_phone_number_node_model_transfer_destination", - "WorkflowResultConditionModel": ".workflow_result_condition_model", - "WorkflowStandaloneAgentNodeModel": ".workflow_standalone_agent_node_model", - "WorkflowStartNodeModel": ".workflow_start_node_model", + "WorkflowLlmConditionModelInput": ".workflow_llm_condition_model_input", + "WorkflowLlmConditionModelOutput": ".workflow_llm_condition_model_output", + "WorkflowOverrideAgentNodeModelInput": ".workflow_override_agent_node_model_input", + "WorkflowOverrideAgentNodeModelOutput": ".workflow_override_agent_node_model_output", + "WorkflowPhoneNumberNodeModelInput": ".workflow_phone_number_node_model_input", + "WorkflowPhoneNumberNodeModelInputTransferDestination": ".workflow_phone_number_node_model_input_transfer_destination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone": ".workflow_phone_number_node_model_input_transfer_destination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri": ".workflow_phone_number_node_model_input_transfer_destination", + "WorkflowPhoneNumberNodeModelOutput": ".workflow_phone_number_node_model_output", + "WorkflowPhoneNumberNodeModelOutputTransferDestination": ".workflow_phone_number_node_model_output_transfer_destination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone": ".workflow_phone_number_node_model_output_transfer_destination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri": ".workflow_phone_number_node_model_output_transfer_destination", + "WorkflowResultConditionModelInput": ".workflow_result_condition_model_input", + "WorkflowResultConditionModelOutput": ".workflow_result_condition_model_output", + "WorkflowStandaloneAgentNodeModelInput": ".workflow_standalone_agent_node_model_input", + "WorkflowStandaloneAgentNodeModelOutput": ".workflow_standalone_agent_node_model_output", + "WorkflowStartNodeModelInput": ".workflow_start_node_model_input", + "WorkflowStartNodeModelOutput": ".workflow_start_node_model_output", "WorkflowToolEdgeStepModel": ".workflow_tool_edge_step_model", "WorkflowToolLocator": ".workflow_tool_locator", "WorkflowToolMaxIterationsExceededStepModel": ".workflow_tool_max_iterations_exceeded_step_model", @@ -2287,7 +2952,8 @@ "WorkflowToolNestedToolsStepModelInputResultsItem": ".workflow_tool_nested_tools_step_model_input_results_item", "WorkflowToolNestedToolsStepModelOutput": ".workflow_tool_nested_tools_step_model_output", "WorkflowToolNestedToolsStepModelOutputResultsItem": ".workflow_tool_nested_tools_step_model_output_results_item", - "WorkflowToolNodeModel": ".workflow_tool_node_model", + "WorkflowToolNodeModelInput": ".workflow_tool_node_model_input", + "WorkflowToolNodeModelOutput": ".workflow_tool_node_model_output", "WorkflowToolResponseModelInput": ".workflow_tool_response_model_input", "WorkflowToolResponseModelInputStepsItem": ".workflow_tool_response_model_input_steps_item", "WorkflowToolResponseModelInputStepsItem_Edge": ".workflow_tool_response_model_input_steps_item", @@ -2298,7 +2964,8 @@ "WorkflowToolResponseModelOutputStepsItem_Edge": ".workflow_tool_response_model_output_steps_item", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded": ".workflow_tool_response_model_output_steps_item", "WorkflowToolResponseModelOutputStepsItem_NestedTools": ".workflow_tool_response_model_output_steps_item", - "WorkflowUnconditionalModel": ".workflow_unconditional_model", + "WorkflowUnconditionalModelInput": ".workflow_unconditional_model_input", + "WorkflowUnconditionalModelOutput": ".workflow_unconditional_model_output", "WorkspaceApiKeyListResponseModel": ".workspace_api_key_list_response_model", "WorkspaceApiKeyResponseModel": ".workspace_api_key_response_model", "WorkspaceApiKeyResponseModelPermissionsItem": ".workspace_api_key_response_model_permissions_item", @@ -2311,6 +2978,7 @@ "WorkspaceWebhookListResponseModel": ".workspace_webhook_list_response_model", "WorkspaceWebhookResponseModel": ".workspace_webhook_response_model", "WorkspaceWebhookUsageResponseModel": ".workspace_webhook_usage_response_model", + "ZendeskConversationInitiationTrigger": ".zendesk_conversation_initiation_trigger", } @@ -2353,9 +3021,11 @@ def __dir__(): "Age", "AgentCallLimits", "AgentConfig", - "AgentConfigApiModelWorkflowOverride", - "AgentConfigOverride", + "AgentConfigApiModelWorkflowOverrideInput", + "AgentConfigApiModelWorkflowOverrideOutput", "AgentConfigOverrideConfig", + "AgentConfigOverrideInput", + "AgentConfigOverrideOutput", "AgentFailureResponseExample", "AgentMetadata", "AgentMetadataResponseModel", @@ -2375,6 +3045,14 @@ def __dir__(): "AgentWorkflowRequestModelNodesValue_StandaloneAgent", "AgentWorkflowRequestModelNodesValue_Start", "AgentWorkflowRequestModelNodesValue_Tool", + "AgentWorkflowResponseModel", + "AgentWorkflowResponseModelNodesValue", + "AgentWorkflowResponseModelNodesValue_End", + "AgentWorkflowResponseModelNodesValue_OverrideAgent", + "AgentWorkflowResponseModelNodesValue_PhoneNumber", + "AgentWorkflowResponseModelNodesValue_StandaloneAgent", + "AgentWorkflowResponseModelNodesValue_Start", + "AgentWorkflowResponseModelNodesValue_Tool", "AgentWorkspaceOverridesInput", "AgentWorkspaceOverridesOutput", "Alignment", @@ -2388,215 +3066,426 @@ def __dir__(): "AsrInputFormat", "AsrProvider", "AsrQuality", - "AstAndOperatorNode", - "AstAndOperatorNodeChildrenItem", - "AstAndOperatorNodeChildrenItem_AndOperator", - "AstAndOperatorNodeChildrenItem_BooleanLiteral", - "AstAndOperatorNodeChildrenItem_DynamicVariable", - "AstAndOperatorNodeChildrenItem_EqOperator", - "AstAndOperatorNodeChildrenItem_GtOperator", - "AstAndOperatorNodeChildrenItem_GteOperator", - "AstAndOperatorNodeChildrenItem_Llm", - "AstAndOperatorNodeChildrenItem_LtOperator", - "AstAndOperatorNodeChildrenItem_LteOperator", - "AstAndOperatorNodeChildrenItem_NeqOperator", - "AstAndOperatorNodeChildrenItem_NumberLiteral", - "AstAndOperatorNodeChildrenItem_OrOperator", - "AstAndOperatorNodeChildrenItem_StringLiteral", - "AstBooleanNode", - "AstDynamicVariableNode", - "AstEqualsOperatorNode", - "AstEqualsOperatorNodeLeft", - "AstEqualsOperatorNodeLeft_AndOperator", - "AstEqualsOperatorNodeLeft_BooleanLiteral", - "AstEqualsOperatorNodeLeft_DynamicVariable", - "AstEqualsOperatorNodeLeft_EqOperator", - "AstEqualsOperatorNodeLeft_GtOperator", - "AstEqualsOperatorNodeLeft_GteOperator", - "AstEqualsOperatorNodeLeft_Llm", - "AstEqualsOperatorNodeLeft_LtOperator", - "AstEqualsOperatorNodeLeft_LteOperator", - "AstEqualsOperatorNodeLeft_NeqOperator", - "AstEqualsOperatorNodeLeft_NumberLiteral", - "AstEqualsOperatorNodeLeft_OrOperator", - "AstEqualsOperatorNodeLeft_StringLiteral", - "AstEqualsOperatorNodeRight", - "AstEqualsOperatorNodeRight_AndOperator", - "AstEqualsOperatorNodeRight_BooleanLiteral", - "AstEqualsOperatorNodeRight_DynamicVariable", - "AstEqualsOperatorNodeRight_EqOperator", - "AstEqualsOperatorNodeRight_GtOperator", - "AstEqualsOperatorNodeRight_GteOperator", - "AstEqualsOperatorNodeRight_Llm", - "AstEqualsOperatorNodeRight_LtOperator", - "AstEqualsOperatorNodeRight_LteOperator", - "AstEqualsOperatorNodeRight_NeqOperator", - "AstEqualsOperatorNodeRight_NumberLiteral", - "AstEqualsOperatorNodeRight_OrOperator", - "AstEqualsOperatorNodeRight_StringLiteral", - "AstGreaterThanOperatorNode", - "AstGreaterThanOperatorNodeLeft", - "AstGreaterThanOperatorNodeLeft_AndOperator", - "AstGreaterThanOperatorNodeLeft_BooleanLiteral", - "AstGreaterThanOperatorNodeLeft_DynamicVariable", - "AstGreaterThanOperatorNodeLeft_EqOperator", - "AstGreaterThanOperatorNodeLeft_GtOperator", - "AstGreaterThanOperatorNodeLeft_GteOperator", - "AstGreaterThanOperatorNodeLeft_Llm", - "AstGreaterThanOperatorNodeLeft_LtOperator", - "AstGreaterThanOperatorNodeLeft_LteOperator", - "AstGreaterThanOperatorNodeLeft_NeqOperator", - "AstGreaterThanOperatorNodeLeft_NumberLiteral", - "AstGreaterThanOperatorNodeLeft_OrOperator", - "AstGreaterThanOperatorNodeLeft_StringLiteral", - "AstGreaterThanOperatorNodeRight", - "AstGreaterThanOperatorNodeRight_AndOperator", - "AstGreaterThanOperatorNodeRight_BooleanLiteral", - "AstGreaterThanOperatorNodeRight_DynamicVariable", - "AstGreaterThanOperatorNodeRight_EqOperator", - "AstGreaterThanOperatorNodeRight_GtOperator", - "AstGreaterThanOperatorNodeRight_GteOperator", - "AstGreaterThanOperatorNodeRight_Llm", - "AstGreaterThanOperatorNodeRight_LtOperator", - "AstGreaterThanOperatorNodeRight_LteOperator", - "AstGreaterThanOperatorNodeRight_NeqOperator", - "AstGreaterThanOperatorNodeRight_NumberLiteral", - "AstGreaterThanOperatorNodeRight_OrOperator", - "AstGreaterThanOperatorNodeRight_StringLiteral", - "AstGreaterThanOrEqualsOperatorNode", - "AstGreaterThanOrEqualsOperatorNodeLeft", - "AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral", - "AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable", - "AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_Llm", - "AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral", - "AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator", - "AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight", - "AstGreaterThanOrEqualsOperatorNodeRight_AndOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable", - "AstGreaterThanOrEqualsOperatorNodeRight_EqOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_GtOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_GteOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_Llm", - "AstGreaterThanOrEqualsOperatorNodeRight_LtOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_LteOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral", - "AstGreaterThanOrEqualsOperatorNodeRight_OrOperator", - "AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral", - "AstLessThanOperatorNode", - "AstLessThanOperatorNodeLeft", - "AstLessThanOperatorNodeLeft_AndOperator", - "AstLessThanOperatorNodeLeft_BooleanLiteral", - "AstLessThanOperatorNodeLeft_DynamicVariable", - "AstLessThanOperatorNodeLeft_EqOperator", - "AstLessThanOperatorNodeLeft_GtOperator", - "AstLessThanOperatorNodeLeft_GteOperator", - "AstLessThanOperatorNodeLeft_Llm", - "AstLessThanOperatorNodeLeft_LtOperator", - "AstLessThanOperatorNodeLeft_LteOperator", - "AstLessThanOperatorNodeLeft_NeqOperator", - "AstLessThanOperatorNodeLeft_NumberLiteral", - "AstLessThanOperatorNodeLeft_OrOperator", - "AstLessThanOperatorNodeLeft_StringLiteral", - "AstLessThanOperatorNodeRight", - "AstLessThanOperatorNodeRight_AndOperator", - "AstLessThanOperatorNodeRight_BooleanLiteral", - "AstLessThanOperatorNodeRight_DynamicVariable", - "AstLessThanOperatorNodeRight_EqOperator", - "AstLessThanOperatorNodeRight_GtOperator", - "AstLessThanOperatorNodeRight_GteOperator", - "AstLessThanOperatorNodeRight_Llm", - "AstLessThanOperatorNodeRight_LtOperator", - "AstLessThanOperatorNodeRight_LteOperator", - "AstLessThanOperatorNodeRight_NeqOperator", - "AstLessThanOperatorNodeRight_NumberLiteral", - "AstLessThanOperatorNodeRight_OrOperator", - "AstLessThanOperatorNodeRight_StringLiteral", - "AstLessThanOrEqualsOperatorNode", - "AstLessThanOrEqualsOperatorNodeLeft", - "AstLessThanOrEqualsOperatorNodeLeft_AndOperator", - "AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral", - "AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable", - "AstLessThanOrEqualsOperatorNodeLeft_EqOperator", - "AstLessThanOrEqualsOperatorNodeLeft_GtOperator", - "AstLessThanOrEqualsOperatorNodeLeft_GteOperator", - "AstLessThanOrEqualsOperatorNodeLeft_Llm", - "AstLessThanOrEqualsOperatorNodeLeft_LtOperator", - "AstLessThanOrEqualsOperatorNodeLeft_LteOperator", - "AstLessThanOrEqualsOperatorNodeLeft_NeqOperator", - "AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral", - "AstLessThanOrEqualsOperatorNodeLeft_OrOperator", - "AstLessThanOrEqualsOperatorNodeLeft_StringLiteral", - "AstLessThanOrEqualsOperatorNodeRight", - "AstLessThanOrEqualsOperatorNodeRight_AndOperator", - "AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral", - "AstLessThanOrEqualsOperatorNodeRight_DynamicVariable", - "AstLessThanOrEqualsOperatorNodeRight_EqOperator", - "AstLessThanOrEqualsOperatorNodeRight_GtOperator", - "AstLessThanOrEqualsOperatorNodeRight_GteOperator", - "AstLessThanOrEqualsOperatorNodeRight_Llm", - "AstLessThanOrEqualsOperatorNodeRight_LtOperator", - "AstLessThanOrEqualsOperatorNodeRight_LteOperator", - "AstLessThanOrEqualsOperatorNodeRight_NeqOperator", - "AstLessThanOrEqualsOperatorNodeRight_NumberLiteral", - "AstLessThanOrEqualsOperatorNodeRight_OrOperator", - "AstLessThanOrEqualsOperatorNodeRight_StringLiteral", - "AstNotEqualsOperatorNode", - "AstNotEqualsOperatorNodeLeft", - "AstNotEqualsOperatorNodeLeft_AndOperator", - "AstNotEqualsOperatorNodeLeft_BooleanLiteral", - "AstNotEqualsOperatorNodeLeft_DynamicVariable", - "AstNotEqualsOperatorNodeLeft_EqOperator", - "AstNotEqualsOperatorNodeLeft_GtOperator", - "AstNotEqualsOperatorNodeLeft_GteOperator", - "AstNotEqualsOperatorNodeLeft_Llm", - "AstNotEqualsOperatorNodeLeft_LtOperator", - "AstNotEqualsOperatorNodeLeft_LteOperator", - "AstNotEqualsOperatorNodeLeft_NeqOperator", - "AstNotEqualsOperatorNodeLeft_NumberLiteral", - "AstNotEqualsOperatorNodeLeft_OrOperator", - "AstNotEqualsOperatorNodeLeft_StringLiteral", - "AstNotEqualsOperatorNodeRight", - "AstNotEqualsOperatorNodeRight_AndOperator", - "AstNotEqualsOperatorNodeRight_BooleanLiteral", - "AstNotEqualsOperatorNodeRight_DynamicVariable", - "AstNotEqualsOperatorNodeRight_EqOperator", - "AstNotEqualsOperatorNodeRight_GtOperator", - "AstNotEqualsOperatorNodeRight_GteOperator", - "AstNotEqualsOperatorNodeRight_Llm", - "AstNotEqualsOperatorNodeRight_LtOperator", - "AstNotEqualsOperatorNodeRight_LteOperator", - "AstNotEqualsOperatorNodeRight_NeqOperator", - "AstNotEqualsOperatorNodeRight_NumberLiteral", - "AstNotEqualsOperatorNodeRight_OrOperator", - "AstNotEqualsOperatorNodeRight_StringLiteral", - "AstNumberNode", - "AstOrOperatorNode", - "AstOrOperatorNodeChildrenItem", - "AstOrOperatorNodeChildrenItem_AndOperator", - "AstOrOperatorNodeChildrenItem_BooleanLiteral", - "AstOrOperatorNodeChildrenItem_DynamicVariable", - "AstOrOperatorNodeChildrenItem_EqOperator", - "AstOrOperatorNodeChildrenItem_GtOperator", - "AstOrOperatorNodeChildrenItem_GteOperator", - "AstOrOperatorNodeChildrenItem_Llm", - "AstOrOperatorNodeChildrenItem_LtOperator", - "AstOrOperatorNodeChildrenItem_LteOperator", - "AstOrOperatorNodeChildrenItem_NeqOperator", - "AstOrOperatorNodeChildrenItem_NumberLiteral", - "AstOrOperatorNodeChildrenItem_OrOperator", - "AstOrOperatorNodeChildrenItem_StringLiteral", - "AstStringNode", - "AstllmNode", + "AstAndOperatorNodeInput", + "AstAndOperatorNodeInputChildrenItem", + "AstAndOperatorNodeInputChildrenItem_AndOperator", + "AstAndOperatorNodeInputChildrenItem_BooleanLiteral", + "AstAndOperatorNodeInputChildrenItem_DynamicVariable", + "AstAndOperatorNodeInputChildrenItem_EqOperator", + "AstAndOperatorNodeInputChildrenItem_GtOperator", + "AstAndOperatorNodeInputChildrenItem_GteOperator", + "AstAndOperatorNodeInputChildrenItem_Llm", + "AstAndOperatorNodeInputChildrenItem_LtOperator", + "AstAndOperatorNodeInputChildrenItem_LteOperator", + "AstAndOperatorNodeInputChildrenItem_NeqOperator", + "AstAndOperatorNodeInputChildrenItem_NumberLiteral", + "AstAndOperatorNodeInputChildrenItem_OrOperator", + "AstAndOperatorNodeInputChildrenItem_StringLiteral", + "AstAndOperatorNodeOutput", + "AstAndOperatorNodeOutputChildrenItem", + "AstAndOperatorNodeOutputChildrenItem_AndOperator", + "AstAndOperatorNodeOutputChildrenItem_BooleanLiteral", + "AstAndOperatorNodeOutputChildrenItem_DynamicVariable", + "AstAndOperatorNodeOutputChildrenItem_EqOperator", + "AstAndOperatorNodeOutputChildrenItem_GtOperator", + "AstAndOperatorNodeOutputChildrenItem_GteOperator", + "AstAndOperatorNodeOutputChildrenItem_Llm", + "AstAndOperatorNodeOutputChildrenItem_LtOperator", + "AstAndOperatorNodeOutputChildrenItem_LteOperator", + "AstAndOperatorNodeOutputChildrenItem_NeqOperator", + "AstAndOperatorNodeOutputChildrenItem_NumberLiteral", + "AstAndOperatorNodeOutputChildrenItem_OrOperator", + "AstAndOperatorNodeOutputChildrenItem_StringLiteral", + "AstBooleanNodeInput", + "AstBooleanNodeOutput", + "AstDynamicVariableNodeInput", + "AstDynamicVariableNodeOutput", + "AstEqualsOperatorNodeInput", + "AstEqualsOperatorNodeInputLeft", + "AstEqualsOperatorNodeInputLeft_AndOperator", + "AstEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstEqualsOperatorNodeInputLeft_DynamicVariable", + "AstEqualsOperatorNodeInputLeft_EqOperator", + "AstEqualsOperatorNodeInputLeft_GtOperator", + "AstEqualsOperatorNodeInputLeft_GteOperator", + "AstEqualsOperatorNodeInputLeft_Llm", + "AstEqualsOperatorNodeInputLeft_LtOperator", + "AstEqualsOperatorNodeInputLeft_LteOperator", + "AstEqualsOperatorNodeInputLeft_NeqOperator", + "AstEqualsOperatorNodeInputLeft_NumberLiteral", + "AstEqualsOperatorNodeInputLeft_OrOperator", + "AstEqualsOperatorNodeInputLeft_StringLiteral", + "AstEqualsOperatorNodeInputRight", + "AstEqualsOperatorNodeInputRight_AndOperator", + "AstEqualsOperatorNodeInputRight_BooleanLiteral", + "AstEqualsOperatorNodeInputRight_DynamicVariable", + "AstEqualsOperatorNodeInputRight_EqOperator", + "AstEqualsOperatorNodeInputRight_GtOperator", + "AstEqualsOperatorNodeInputRight_GteOperator", + "AstEqualsOperatorNodeInputRight_Llm", + "AstEqualsOperatorNodeInputRight_LtOperator", + "AstEqualsOperatorNodeInputRight_LteOperator", + "AstEqualsOperatorNodeInputRight_NeqOperator", + "AstEqualsOperatorNodeInputRight_NumberLiteral", + "AstEqualsOperatorNodeInputRight_OrOperator", + "AstEqualsOperatorNodeInputRight_StringLiteral", + "AstEqualsOperatorNodeOutput", + "AstEqualsOperatorNodeOutputLeft", + "AstEqualsOperatorNodeOutputLeft_AndOperator", + "AstEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstEqualsOperatorNodeOutputLeft_EqOperator", + "AstEqualsOperatorNodeOutputLeft_GtOperator", + "AstEqualsOperatorNodeOutputLeft_GteOperator", + "AstEqualsOperatorNodeOutputLeft_Llm", + "AstEqualsOperatorNodeOutputLeft_LtOperator", + "AstEqualsOperatorNodeOutputLeft_LteOperator", + "AstEqualsOperatorNodeOutputLeft_NeqOperator", + "AstEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstEqualsOperatorNodeOutputLeft_OrOperator", + "AstEqualsOperatorNodeOutputLeft_StringLiteral", + "AstEqualsOperatorNodeOutputRight", + "AstEqualsOperatorNodeOutputRight_AndOperator", + "AstEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstEqualsOperatorNodeOutputRight_DynamicVariable", + "AstEqualsOperatorNodeOutputRight_EqOperator", + "AstEqualsOperatorNodeOutputRight_GtOperator", + "AstEqualsOperatorNodeOutputRight_GteOperator", + "AstEqualsOperatorNodeOutputRight_Llm", + "AstEqualsOperatorNodeOutputRight_LtOperator", + "AstEqualsOperatorNodeOutputRight_LteOperator", + "AstEqualsOperatorNodeOutputRight_NeqOperator", + "AstEqualsOperatorNodeOutputRight_NumberLiteral", + "AstEqualsOperatorNodeOutputRight_OrOperator", + "AstEqualsOperatorNodeOutputRight_StringLiteral", + "AstGreaterThanOperatorNodeInput", + "AstGreaterThanOperatorNodeInputLeft", + "AstGreaterThanOperatorNodeInputLeft_AndOperator", + "AstGreaterThanOperatorNodeInputLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeInputLeft_DynamicVariable", + "AstGreaterThanOperatorNodeInputLeft_EqOperator", + "AstGreaterThanOperatorNodeInputLeft_GtOperator", + "AstGreaterThanOperatorNodeInputLeft_GteOperator", + "AstGreaterThanOperatorNodeInputLeft_Llm", + "AstGreaterThanOperatorNodeInputLeft_LtOperator", + "AstGreaterThanOperatorNodeInputLeft_LteOperator", + "AstGreaterThanOperatorNodeInputLeft_NeqOperator", + "AstGreaterThanOperatorNodeInputLeft_NumberLiteral", + "AstGreaterThanOperatorNodeInputLeft_OrOperator", + "AstGreaterThanOperatorNodeInputLeft_StringLiteral", + "AstGreaterThanOperatorNodeInputRight", + "AstGreaterThanOperatorNodeInputRight_AndOperator", + "AstGreaterThanOperatorNodeInputRight_BooleanLiteral", + "AstGreaterThanOperatorNodeInputRight_DynamicVariable", + "AstGreaterThanOperatorNodeInputRight_EqOperator", + "AstGreaterThanOperatorNodeInputRight_GtOperator", + "AstGreaterThanOperatorNodeInputRight_GteOperator", + "AstGreaterThanOperatorNodeInputRight_Llm", + "AstGreaterThanOperatorNodeInputRight_LtOperator", + "AstGreaterThanOperatorNodeInputRight_LteOperator", + "AstGreaterThanOperatorNodeInputRight_NeqOperator", + "AstGreaterThanOperatorNodeInputRight_NumberLiteral", + "AstGreaterThanOperatorNodeInputRight_OrOperator", + "AstGreaterThanOperatorNodeInputRight_StringLiteral", + "AstGreaterThanOperatorNodeOutput", + "AstGreaterThanOperatorNodeOutputLeft", + "AstGreaterThanOperatorNodeOutputLeft_AndOperator", + "AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral", + "AstGreaterThanOperatorNodeOutputLeft_DynamicVariable", + "AstGreaterThanOperatorNodeOutputLeft_EqOperator", + "AstGreaterThanOperatorNodeOutputLeft_GtOperator", + "AstGreaterThanOperatorNodeOutputLeft_GteOperator", + "AstGreaterThanOperatorNodeOutputLeft_Llm", + "AstGreaterThanOperatorNodeOutputLeft_LtOperator", + "AstGreaterThanOperatorNodeOutputLeft_LteOperator", + "AstGreaterThanOperatorNodeOutputLeft_NeqOperator", + "AstGreaterThanOperatorNodeOutputLeft_NumberLiteral", + "AstGreaterThanOperatorNodeOutputLeft_OrOperator", + "AstGreaterThanOperatorNodeOutputLeft_StringLiteral", + "AstGreaterThanOperatorNodeOutputRight", + "AstGreaterThanOperatorNodeOutputRight_AndOperator", + "AstGreaterThanOperatorNodeOutputRight_BooleanLiteral", + "AstGreaterThanOperatorNodeOutputRight_DynamicVariable", + "AstGreaterThanOperatorNodeOutputRight_EqOperator", + "AstGreaterThanOperatorNodeOutputRight_GtOperator", + "AstGreaterThanOperatorNodeOutputRight_GteOperator", + "AstGreaterThanOperatorNodeOutputRight_Llm", + "AstGreaterThanOperatorNodeOutputRight_LtOperator", + "AstGreaterThanOperatorNodeOutputRight_LteOperator", + "AstGreaterThanOperatorNodeOutputRight_NeqOperator", + "AstGreaterThanOperatorNodeOutputRight_NumberLiteral", + "AstGreaterThanOperatorNodeOutputRight_OrOperator", + "AstGreaterThanOperatorNodeOutputRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeInput", + "AstGreaterThanOrEqualsOperatorNodeInputLeft", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight", + "AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutput", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator", + "AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral", + "AstLessThanOperatorNodeInput", + "AstLessThanOperatorNodeInputLeft", + "AstLessThanOperatorNodeInputLeft_AndOperator", + "AstLessThanOperatorNodeInputLeft_BooleanLiteral", + "AstLessThanOperatorNodeInputLeft_DynamicVariable", + "AstLessThanOperatorNodeInputLeft_EqOperator", + "AstLessThanOperatorNodeInputLeft_GtOperator", + "AstLessThanOperatorNodeInputLeft_GteOperator", + "AstLessThanOperatorNodeInputLeft_Llm", + "AstLessThanOperatorNodeInputLeft_LtOperator", + "AstLessThanOperatorNodeInputLeft_LteOperator", + "AstLessThanOperatorNodeInputLeft_NeqOperator", + "AstLessThanOperatorNodeInputLeft_NumberLiteral", + "AstLessThanOperatorNodeInputLeft_OrOperator", + "AstLessThanOperatorNodeInputLeft_StringLiteral", + "AstLessThanOperatorNodeInputRight", + "AstLessThanOperatorNodeInputRight_AndOperator", + "AstLessThanOperatorNodeInputRight_BooleanLiteral", + "AstLessThanOperatorNodeInputRight_DynamicVariable", + "AstLessThanOperatorNodeInputRight_EqOperator", + "AstLessThanOperatorNodeInputRight_GtOperator", + "AstLessThanOperatorNodeInputRight_GteOperator", + "AstLessThanOperatorNodeInputRight_Llm", + "AstLessThanOperatorNodeInputRight_LtOperator", + "AstLessThanOperatorNodeInputRight_LteOperator", + "AstLessThanOperatorNodeInputRight_NeqOperator", + "AstLessThanOperatorNodeInputRight_NumberLiteral", + "AstLessThanOperatorNodeInputRight_OrOperator", + "AstLessThanOperatorNodeInputRight_StringLiteral", + "AstLessThanOperatorNodeOutput", + "AstLessThanOperatorNodeOutputLeft", + "AstLessThanOperatorNodeOutputLeft_AndOperator", + "AstLessThanOperatorNodeOutputLeft_BooleanLiteral", + "AstLessThanOperatorNodeOutputLeft_DynamicVariable", + "AstLessThanOperatorNodeOutputLeft_EqOperator", + "AstLessThanOperatorNodeOutputLeft_GtOperator", + "AstLessThanOperatorNodeOutputLeft_GteOperator", + "AstLessThanOperatorNodeOutputLeft_Llm", + "AstLessThanOperatorNodeOutputLeft_LtOperator", + "AstLessThanOperatorNodeOutputLeft_LteOperator", + "AstLessThanOperatorNodeOutputLeft_NeqOperator", + "AstLessThanOperatorNodeOutputLeft_NumberLiteral", + "AstLessThanOperatorNodeOutputLeft_OrOperator", + "AstLessThanOperatorNodeOutputLeft_StringLiteral", + "AstLessThanOperatorNodeOutputRight", + "AstLessThanOperatorNodeOutputRight_AndOperator", + "AstLessThanOperatorNodeOutputRight_BooleanLiteral", + "AstLessThanOperatorNodeOutputRight_DynamicVariable", + "AstLessThanOperatorNodeOutputRight_EqOperator", + "AstLessThanOperatorNodeOutputRight_GtOperator", + "AstLessThanOperatorNodeOutputRight_GteOperator", + "AstLessThanOperatorNodeOutputRight_Llm", + "AstLessThanOperatorNodeOutputRight_LtOperator", + "AstLessThanOperatorNodeOutputRight_LteOperator", + "AstLessThanOperatorNodeOutputRight_NeqOperator", + "AstLessThanOperatorNodeOutputRight_NumberLiteral", + "AstLessThanOperatorNodeOutputRight_OrOperator", + "AstLessThanOperatorNodeOutputRight_StringLiteral", + "AstLessThanOrEqualsOperatorNodeInput", + "AstLessThanOrEqualsOperatorNodeInputLeft", + "AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_Llm", + "AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight", + "AstLessThanOrEqualsOperatorNodeInputRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeInputRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_Llm", + "AstLessThanOrEqualsOperatorNodeInputRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeInputRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral", + "AstLessThanOrEqualsOperatorNodeOutput", + "AstLessThanOrEqualsOperatorNodeOutputLeft", + "AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_Llm", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator", + "AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight", + "AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable", + "AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_Llm", + "AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral", + "AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator", + "AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral", + "AstNotEqualsOperatorNodeInput", + "AstNotEqualsOperatorNodeInputLeft", + "AstNotEqualsOperatorNodeInputLeft_AndOperator", + "AstNotEqualsOperatorNodeInputLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeInputLeft_DynamicVariable", + "AstNotEqualsOperatorNodeInputLeft_EqOperator", + "AstNotEqualsOperatorNodeInputLeft_GtOperator", + "AstNotEqualsOperatorNodeInputLeft_GteOperator", + "AstNotEqualsOperatorNodeInputLeft_Llm", + "AstNotEqualsOperatorNodeInputLeft_LtOperator", + "AstNotEqualsOperatorNodeInputLeft_LteOperator", + "AstNotEqualsOperatorNodeInputLeft_NeqOperator", + "AstNotEqualsOperatorNodeInputLeft_NumberLiteral", + "AstNotEqualsOperatorNodeInputLeft_OrOperator", + "AstNotEqualsOperatorNodeInputLeft_StringLiteral", + "AstNotEqualsOperatorNodeInputRight", + "AstNotEqualsOperatorNodeInputRight_AndOperator", + "AstNotEqualsOperatorNodeInputRight_BooleanLiteral", + "AstNotEqualsOperatorNodeInputRight_DynamicVariable", + "AstNotEqualsOperatorNodeInputRight_EqOperator", + "AstNotEqualsOperatorNodeInputRight_GtOperator", + "AstNotEqualsOperatorNodeInputRight_GteOperator", + "AstNotEqualsOperatorNodeInputRight_Llm", + "AstNotEqualsOperatorNodeInputRight_LtOperator", + "AstNotEqualsOperatorNodeInputRight_LteOperator", + "AstNotEqualsOperatorNodeInputRight_NeqOperator", + "AstNotEqualsOperatorNodeInputRight_NumberLiteral", + "AstNotEqualsOperatorNodeInputRight_OrOperator", + "AstNotEqualsOperatorNodeInputRight_StringLiteral", + "AstNotEqualsOperatorNodeOutput", + "AstNotEqualsOperatorNodeOutputLeft", + "AstNotEqualsOperatorNodeOutputLeft_AndOperator", + "AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral", + "AstNotEqualsOperatorNodeOutputLeft_DynamicVariable", + "AstNotEqualsOperatorNodeOutputLeft_EqOperator", + "AstNotEqualsOperatorNodeOutputLeft_GtOperator", + "AstNotEqualsOperatorNodeOutputLeft_GteOperator", + "AstNotEqualsOperatorNodeOutputLeft_Llm", + "AstNotEqualsOperatorNodeOutputLeft_LtOperator", + "AstNotEqualsOperatorNodeOutputLeft_LteOperator", + "AstNotEqualsOperatorNodeOutputLeft_NeqOperator", + "AstNotEqualsOperatorNodeOutputLeft_NumberLiteral", + "AstNotEqualsOperatorNodeOutputLeft_OrOperator", + "AstNotEqualsOperatorNodeOutputLeft_StringLiteral", + "AstNotEqualsOperatorNodeOutputRight", + "AstNotEqualsOperatorNodeOutputRight_AndOperator", + "AstNotEqualsOperatorNodeOutputRight_BooleanLiteral", + "AstNotEqualsOperatorNodeOutputRight_DynamicVariable", + "AstNotEqualsOperatorNodeOutputRight_EqOperator", + "AstNotEqualsOperatorNodeOutputRight_GtOperator", + "AstNotEqualsOperatorNodeOutputRight_GteOperator", + "AstNotEqualsOperatorNodeOutputRight_Llm", + "AstNotEqualsOperatorNodeOutputRight_LtOperator", + "AstNotEqualsOperatorNodeOutputRight_LteOperator", + "AstNotEqualsOperatorNodeOutputRight_NeqOperator", + "AstNotEqualsOperatorNodeOutputRight_NumberLiteral", + "AstNotEqualsOperatorNodeOutputRight_OrOperator", + "AstNotEqualsOperatorNodeOutputRight_StringLiteral", + "AstNumberNodeInput", + "AstNumberNodeOutput", + "AstOrOperatorNodeInput", + "AstOrOperatorNodeInputChildrenItem", + "AstOrOperatorNodeInputChildrenItem_AndOperator", + "AstOrOperatorNodeInputChildrenItem_BooleanLiteral", + "AstOrOperatorNodeInputChildrenItem_DynamicVariable", + "AstOrOperatorNodeInputChildrenItem_EqOperator", + "AstOrOperatorNodeInputChildrenItem_GtOperator", + "AstOrOperatorNodeInputChildrenItem_GteOperator", + "AstOrOperatorNodeInputChildrenItem_Llm", + "AstOrOperatorNodeInputChildrenItem_LtOperator", + "AstOrOperatorNodeInputChildrenItem_LteOperator", + "AstOrOperatorNodeInputChildrenItem_NeqOperator", + "AstOrOperatorNodeInputChildrenItem_NumberLiteral", + "AstOrOperatorNodeInputChildrenItem_OrOperator", + "AstOrOperatorNodeInputChildrenItem_StringLiteral", + "AstOrOperatorNodeOutput", + "AstOrOperatorNodeOutputChildrenItem", + "AstOrOperatorNodeOutputChildrenItem_AndOperator", + "AstOrOperatorNodeOutputChildrenItem_BooleanLiteral", + "AstOrOperatorNodeOutputChildrenItem_DynamicVariable", + "AstOrOperatorNodeOutputChildrenItem_EqOperator", + "AstOrOperatorNodeOutputChildrenItem_GtOperator", + "AstOrOperatorNodeOutputChildrenItem_GteOperator", + "AstOrOperatorNodeOutputChildrenItem_Llm", + "AstOrOperatorNodeOutputChildrenItem_LtOperator", + "AstOrOperatorNodeOutputChildrenItem_LteOperator", + "AstOrOperatorNodeOutputChildrenItem_NeqOperator", + "AstOrOperatorNodeOutputChildrenItem_NumberLiteral", + "AstOrOperatorNodeOutputChildrenItem_OrOperator", + "AstOrOperatorNodeOutputChildrenItem_StringLiteral", + "AstStringNodeInput", + "AstStringNodeOutput", + "AstllmNodeInput", + "AstllmNodeOutput", + "AsyncConversationMetadata", + "AsyncConversationMetadataDeliveryStatus", "AttachedTestModel", "AudioNativeCreateProjectResponseModel", "AudioNativeEditContentResponseModel", @@ -2608,6 +3497,9 @@ def __dir__(): "AuthConnectionLocator", "AuthSettings", "AuthorizationMethod", + "BackupLlmDefault", + "BackupLlmDisabled", + "BackupLlmOverride", "BadRequestErrorBody", "BanReasonType", "BatchCallDetailedResponse", @@ -2619,7 +3511,8 @@ def __dir__(): "BreakdownTypes", "BuiltInToolsInput", "BuiltInToolsOutput", - "BuiltInToolsWorkflowOverride", + "BuiltInToolsWorkflowOverrideInput", + "BuiltInToolsWorkflowOverrideOutput", "CaptionStyleCharacterAnimationModel", "CaptionStyleCharacterAnimationModelEnterType", "CaptionStyleCharacterAnimationModelExitType", @@ -2695,6 +3588,9 @@ def __dir__(): "ConversationHistoryEvaluationCriteriaResultCommonModel", "ConversationHistoryFeedbackCommonModel", "ConversationHistoryMetadataCommonModel", + "ConversationHistoryMetadataCommonModelInitiationTrigger", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Default", + "ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk", "ConversationHistoryMetadataCommonModelPhoneCall", "ConversationHistoryMetadataCommonModelPhoneCall_SipTrunking", "ConversationHistoryMetadataCommonModelPhoneCall_Twilio", @@ -2761,7 +3657,8 @@ def __dir__(): "ConversationTokenPurpose", "ConversationTurnMetrics", "ConversationalConfig", - "ConversationalConfigApiModelWorkflowOverride", + "ConversationalConfigApiModelWorkflowOverrideInput", + "ConversationalConfigApiModelWorkflowOverrideOutput", "ConvertChapterResponseModel", "ConvertProjectResponseModel", "CreateAgentResponseModel", @@ -2779,6 +3676,7 @@ def __dir__(): "DashboardCriteriaChartModel", "DashboardDataCollectionChartModel", "DataCollectionResultCommonModel", + "DefaultConversationInitiationTrigger", "DeleteChapterRequest", "DeleteChapterResponseModel", "DeleteDubbingResponseModel", @@ -3034,7 +3932,8 @@ def __dir__(): "PodcastProjectResponseModel", "PodcastTextSource", "PodcastUrlSource", - "Position", + "PositionInput", + "PositionOutput", "PostAgentAvatarResponseModel", "PostWorkspaceSecretResponseModel", "PrivacyConfig", @@ -3044,12 +3943,14 @@ def __dir__(): "ProjectExtendedResponse", "ProjectExtendedResponseModelAccessLevel", "ProjectExtendedResponseModelApplyTextNormalization", + "ProjectExtendedResponseModelAspectRatio", "ProjectExtendedResponseModelFiction", "ProjectExtendedResponseModelQualityPreset", "ProjectExtendedResponseModelSourceType", "ProjectExtendedResponseModelTargetAudience", "ProjectResponse", "ProjectResponseModelAccessLevel", + "ProjectResponseModelAspectRatio", "ProjectResponseModelFiction", "ProjectResponseModelSourceType", "ProjectResponseModelTargetAudience", @@ -3059,12 +3960,20 @@ def __dir__(): "ProjectState", "PromptAgent", "PromptAgentApiModelInput", + "PromptAgentApiModelInputBackupLlmConfig", + "PromptAgentApiModelInputBackupLlmConfig_Default", + "PromptAgentApiModelInputBackupLlmConfig_Disabled", + "PromptAgentApiModelInputBackupLlmConfig_Override", "PromptAgentApiModelInputToolsItem", "PromptAgentApiModelInputToolsItem_Client", "PromptAgentApiModelInputToolsItem_Mcp", "PromptAgentApiModelInputToolsItem_System", "PromptAgentApiModelInputToolsItem_Webhook", "PromptAgentApiModelOutput", + "PromptAgentApiModelOutputBackupLlmConfig", + "PromptAgentApiModelOutputBackupLlmConfig_Default", + "PromptAgentApiModelOutputBackupLlmConfig_Disabled", + "PromptAgentApiModelOutputBackupLlmConfig_Override", "PromptAgentApiModelOutputToolsItem", "PromptAgentApiModelOutputToolsItem_Client", "PromptAgentApiModelOutputToolsItem_Mcp", @@ -3072,12 +3981,20 @@ def __dir__(): "PromptAgentApiModelOutputToolsItem_Webhook", "PromptAgentApiModelOverride", "PromptAgentApiModelOverrideConfig", - "PromptAgentApiModelWorkflowOverride", - "PromptAgentApiModelWorkflowOverrideToolsItem", - "PromptAgentApiModelWorkflowOverrideToolsItem_Client", - "PromptAgentApiModelWorkflowOverrideToolsItem_Mcp", - "PromptAgentApiModelWorkflowOverrideToolsItem_System", - "PromptAgentApiModelWorkflowOverrideToolsItem_Webhook", + "PromptAgentApiModelWorkflowOverrideInput", + "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig", + "PromptAgentApiModelWorkflowOverrideInputToolsItem", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_System", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook", + "PromptAgentApiModelWorkflowOverrideOutput", + "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook", "PromptAgentDbModel", "PromptEvaluationCriteria", "PronunciationDictionaryAliasRuleRequestModel", @@ -3122,6 +4039,7 @@ def __dir__(): "SafetyRule", "SaveVoicePreviewRequest", "SecretDependencyType", + "SectionSource", "SegmentCreateResponse", "SegmentDeleteResponse", "SegmentDubResponse", @@ -3211,6 +4129,7 @@ def __dir__(): "TextToSpeechStreamRequest", "TextToSpeechStreamWithTimestampsRequest", "TextToSpeechWithTimestampsRequest", + "TimeRange", "TokenResponseModel", "Tool", "ToolAnnotations", @@ -3243,7 +4162,8 @@ def __dir__(): "TtsConversationalConfigOutput", "TtsConversationalConfigOverride", "TtsConversationalConfigOverrideConfig", - "TtsConversationalConfigWorkflowOverride", + "TtsConversationalConfigWorkflowOverrideInput", + "TtsConversationalConfigWorkflowOverrideOutput", "TtsConversationalModel", "TtsModelFamily", "TtsOptimizeStreamingLatency", @@ -3253,6 +4173,8 @@ def __dir__(): "TurnMode", "TwilioOutboundCallResponse", "TxtExportOptions", + "UnitTestCommonModel", + "UnitTestCommonModelDynamicVariablesValue", "UnitTestCommonModelType", "UnitTestRunResponseModel", "UnitTestSummaryResponseModel", @@ -3302,6 +4224,7 @@ def __dir__(): "VoiceVerificationResponse", "VoicemailDetectionToolConfig", "WebhookAuthMethodType", + "WebhookEventType", "WebhookToolApiSchemaConfigInput", "WebhookToolApiSchemaConfigInputMethod", "WebhookToolApiSchemaConfigInputRequestHeadersValue", @@ -3313,6 +4236,18 @@ def __dir__(): "WebhookUsageType", "WebsocketTtsClientMessageMulti", "WebsocketTtsServerMessageMulti", + "WhatsAppBusinessAccount", + "WhatsAppBusinessAccountChangesItem", + "WhatsAppBusinessAccountChangesItem_Calls", + "WhatsAppBusinessAccountChangesItem_Messages", + "WhatsAppCall", + "WhatsAppCallDirection", + "WhatsAppCalls", + "WhatsAppChangeCalls", + "WhatsAppChangeMessages", + "WhatsAppEventRequest", + "WhatsAppMetadata", + "WhatsAppSession", "WidgetConfig", "WidgetConfigInputAvatar", "WidgetConfigInputAvatar_Image", @@ -3334,43 +4269,79 @@ def __dir__(): "WidgetPlacement", "WidgetStyles", "WidgetTextContents", - "WorkflowEdgeModel", - "WorkflowEdgeModelBackwardCondition", - "WorkflowEdgeModelBackwardCondition_Expression", - "WorkflowEdgeModelBackwardCondition_Llm", - "WorkflowEdgeModelBackwardCondition_Result", - "WorkflowEdgeModelBackwardCondition_Unconditional", - "WorkflowEdgeModelForwardCondition", - "WorkflowEdgeModelForwardCondition_Expression", - "WorkflowEdgeModelForwardCondition_Llm", - "WorkflowEdgeModelForwardCondition_Result", - "WorkflowEdgeModelForwardCondition_Unconditional", - "WorkflowEndNodeModel", - "WorkflowExpressionConditionModel", - "WorkflowExpressionConditionModelExpression", - "WorkflowExpressionConditionModelExpression_AndOperator", - "WorkflowExpressionConditionModelExpression_BooleanLiteral", - "WorkflowExpressionConditionModelExpression_DynamicVariable", - "WorkflowExpressionConditionModelExpression_EqOperator", - "WorkflowExpressionConditionModelExpression_GtOperator", - "WorkflowExpressionConditionModelExpression_GteOperator", - "WorkflowExpressionConditionModelExpression_Llm", - "WorkflowExpressionConditionModelExpression_LtOperator", - "WorkflowExpressionConditionModelExpression_LteOperator", - "WorkflowExpressionConditionModelExpression_NeqOperator", - "WorkflowExpressionConditionModelExpression_NumberLiteral", - "WorkflowExpressionConditionModelExpression_OrOperator", - "WorkflowExpressionConditionModelExpression_StringLiteral", + "WorkflowEdgeModelInput", + "WorkflowEdgeModelInputBackwardCondition", + "WorkflowEdgeModelInputBackwardCondition_Expression", + "WorkflowEdgeModelInputBackwardCondition_Llm", + "WorkflowEdgeModelInputBackwardCondition_Result", + "WorkflowEdgeModelInputBackwardCondition_Unconditional", + "WorkflowEdgeModelInputForwardCondition", + "WorkflowEdgeModelInputForwardCondition_Expression", + "WorkflowEdgeModelInputForwardCondition_Llm", + "WorkflowEdgeModelInputForwardCondition_Result", + "WorkflowEdgeModelInputForwardCondition_Unconditional", + "WorkflowEdgeModelOutput", + "WorkflowEdgeModelOutputBackwardCondition", + "WorkflowEdgeModelOutputBackwardCondition_Expression", + "WorkflowEdgeModelOutputBackwardCondition_Llm", + "WorkflowEdgeModelOutputBackwardCondition_Result", + "WorkflowEdgeModelOutputBackwardCondition_Unconditional", + "WorkflowEdgeModelOutputForwardCondition", + "WorkflowEdgeModelOutputForwardCondition_Expression", + "WorkflowEdgeModelOutputForwardCondition_Llm", + "WorkflowEdgeModelOutputForwardCondition_Result", + "WorkflowEdgeModelOutputForwardCondition_Unconditional", + "WorkflowEndNodeModelInput", + "WorkflowEndNodeModelOutput", + "WorkflowExpressionConditionModelInput", + "WorkflowExpressionConditionModelInputExpression", + "WorkflowExpressionConditionModelInputExpression_AndOperator", + "WorkflowExpressionConditionModelInputExpression_BooleanLiteral", + "WorkflowExpressionConditionModelInputExpression_DynamicVariable", + "WorkflowExpressionConditionModelInputExpression_EqOperator", + "WorkflowExpressionConditionModelInputExpression_GtOperator", + "WorkflowExpressionConditionModelInputExpression_GteOperator", + "WorkflowExpressionConditionModelInputExpression_Llm", + "WorkflowExpressionConditionModelInputExpression_LtOperator", + "WorkflowExpressionConditionModelInputExpression_LteOperator", + "WorkflowExpressionConditionModelInputExpression_NeqOperator", + "WorkflowExpressionConditionModelInputExpression_NumberLiteral", + "WorkflowExpressionConditionModelInputExpression_OrOperator", + "WorkflowExpressionConditionModelInputExpression_StringLiteral", + "WorkflowExpressionConditionModelOutput", + "WorkflowExpressionConditionModelOutputExpression", + "WorkflowExpressionConditionModelOutputExpression_AndOperator", + "WorkflowExpressionConditionModelOutputExpression_BooleanLiteral", + "WorkflowExpressionConditionModelOutputExpression_DynamicVariable", + "WorkflowExpressionConditionModelOutputExpression_EqOperator", + "WorkflowExpressionConditionModelOutputExpression_GtOperator", + "WorkflowExpressionConditionModelOutputExpression_GteOperator", + "WorkflowExpressionConditionModelOutputExpression_Llm", + "WorkflowExpressionConditionModelOutputExpression_LtOperator", + "WorkflowExpressionConditionModelOutputExpression_LteOperator", + "WorkflowExpressionConditionModelOutputExpression_NeqOperator", + "WorkflowExpressionConditionModelOutputExpression_NumberLiteral", + "WorkflowExpressionConditionModelOutputExpression_OrOperator", + "WorkflowExpressionConditionModelOutputExpression_StringLiteral", "WorkflowFeaturesUsageCommonModel", - "WorkflowLlmConditionModel", - "WorkflowOverrideAgentNodeModel", - "WorkflowPhoneNumberNodeModel", - "WorkflowPhoneNumberNodeModelTransferDestination", - "WorkflowPhoneNumberNodeModelTransferDestination_Phone", - "WorkflowPhoneNumberNodeModelTransferDestination_SipUri", - "WorkflowResultConditionModel", - "WorkflowStandaloneAgentNodeModel", - "WorkflowStartNodeModel", + "WorkflowLlmConditionModelInput", + "WorkflowLlmConditionModelOutput", + "WorkflowOverrideAgentNodeModelInput", + "WorkflowOverrideAgentNodeModelOutput", + "WorkflowPhoneNumberNodeModelInput", + "WorkflowPhoneNumberNodeModelInputTransferDestination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelOutput", + "WorkflowPhoneNumberNodeModelOutputTransferDestination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri", + "WorkflowResultConditionModelInput", + "WorkflowResultConditionModelOutput", + "WorkflowStandaloneAgentNodeModelInput", + "WorkflowStandaloneAgentNodeModelOutput", + "WorkflowStartNodeModelInput", + "WorkflowStartNodeModelOutput", "WorkflowToolEdgeStepModel", "WorkflowToolLocator", "WorkflowToolMaxIterationsExceededStepModel", @@ -3378,7 +4349,8 @@ def __dir__(): "WorkflowToolNestedToolsStepModelInputResultsItem", "WorkflowToolNestedToolsStepModelOutput", "WorkflowToolNestedToolsStepModelOutputResultsItem", - "WorkflowToolNodeModel", + "WorkflowToolNodeModelInput", + "WorkflowToolNodeModelOutput", "WorkflowToolResponseModelInput", "WorkflowToolResponseModelInputStepsItem", "WorkflowToolResponseModelInputStepsItem_Edge", @@ -3389,7 +4361,8 @@ def __dir__(): "WorkflowToolResponseModelOutputStepsItem_Edge", "WorkflowToolResponseModelOutputStepsItem_MaxIterationsExceeded", "WorkflowToolResponseModelOutputStepsItem_NestedTools", - "WorkflowUnconditionalModel", + "WorkflowUnconditionalModelInput", + "WorkflowUnconditionalModelOutput", "WorkspaceApiKeyListResponseModel", "WorkspaceApiKeyResponseModel", "WorkspaceApiKeyResponseModelPermissionsItem", @@ -3402,4 +4375,5 @@ def __dir__(): "WorkspaceWebhookListResponseModel", "WorkspaceWebhookResponseModel", "WorkspaceWebhookUsageResponseModel", + "ZendeskConversationInitiationTrigger", ] diff --git a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py index b13c18d8..b872ddee 100644 --- a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py +++ b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py @@ -30,14 +30,14 @@ class Config: from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 update_forward_refs(AdhocAgentConfigOverrideForTestRequestModel) diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override.py b/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py similarity index 83% rename from src/elevenlabs/types/agent_config_api_model_workflow_override.py rename to src/elevenlabs/types/agent_config_api_model_workflow_override_input.py index a5d660e5..6fdec28a 100644 --- a/src/elevenlabs/types/agent_config_api_model_workflow_override.py +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py @@ -8,10 +8,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride -from .prompt_agent_api_model_workflow_override import PromptAgentApiModelWorkflowOverride +from .prompt_agent_api_model_workflow_override_input import PromptAgentApiModelWorkflowOverrideInput -class AgentConfigApiModelWorkflowOverride(UncheckedBaseModel): +class AgentConfigApiModelWorkflowOverrideInput(UncheckedBaseModel): first_message: typing.Optional[str] = pydantic.Field(default=None) """ If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. @@ -32,7 +32,7 @@ class AgentConfigApiModelWorkflowOverride(UncheckedBaseModel): If true, the user will not be able to interrupt the agent while the first message is being delivered. """ - prompt: typing.Optional[PromptAgentApiModelWorkflowOverride] = pydantic.Field(default=None) + prompt: typing.Optional[PromptAgentApiModelWorkflowOverrideInput] = pydantic.Field(default=None) """ The prompt for the agent """ @@ -50,4 +50,4 @@ class Config: from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 -update_forward_refs(AgentConfigApiModelWorkflowOverride) +update_forward_refs(AgentConfigApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py b/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py new file mode 100644 index 00000000..ed764eda --- /dev/null +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variables_config_workflow_override import DynamicVariablesConfigWorkflowOverride +from .prompt_agent_api_model_workflow_override_output import PromptAgentApiModelWorkflowOverrideOutput + + +class AgentConfigApiModelWorkflowOverrideOutput(UncheckedBaseModel): + first_message: typing.Optional[str] = pydantic.Field(default=None) + """ + If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language of the agent - used for ASR and TTS + """ + + dynamic_variables: typing.Optional[DynamicVariablesConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for dynamic variables + """ + + disable_first_message_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while the first message is being delivered. + """ + + prompt: typing.Optional[PromptAgentApiModelWorkflowOverrideOutput] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(AgentConfigApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/agent_config_override.py b/src/elevenlabs/types/agent_config_override_input.py similarity index 95% rename from src/elevenlabs/types/agent_config_override.py rename to src/elevenlabs/types/agent_config_override_input.py index 9a917987..c27d634e 100644 --- a/src/elevenlabs/types/agent_config_override.py +++ b/src/elevenlabs/types/agent_config_override_input.py @@ -8,7 +8,7 @@ from .prompt_agent_api_model_override import PromptAgentApiModelOverride -class AgentConfigOverride(UncheckedBaseModel): +class AgentConfigOverrideInput(UncheckedBaseModel): first_message: typing.Optional[str] = pydantic.Field(default=None) """ If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. diff --git a/src/elevenlabs/types/agent_config_override_output.py b/src/elevenlabs/types/agent_config_override_output.py new file mode 100644 index 00000000..455903dc --- /dev/null +++ b/src/elevenlabs/types/agent_config_override_output.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .prompt_agent_api_model_override import PromptAgentApiModelOverride + + +class AgentConfigOverrideOutput(UncheckedBaseModel): + first_message: typing.Optional[str] = pydantic.Field(default=None) + """ + If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language of the agent - used for ASR and TTS + """ + + prompt: typing.Optional[PromptAgentApiModelOverride] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/agent_platform_settings_request_model.py b/src/elevenlabs/types/agent_platform_settings_request_model.py index a99e36f0..978d61a3 100644 --- a/src/elevenlabs/types/agent_platform_settings_request_model.py +++ b/src/elevenlabs/types/agent_platform_settings_request_model.py @@ -17,11 +17,6 @@ class AgentPlatformSettingsRequestModel(UncheckedBaseModel): - auth: typing.Optional[AuthSettings] = pydantic.Field(default=None) - """ - Settings for authentication - """ - evaluation: typing.Optional[EvaluationSettings] = pydantic.Field(default=None) """ Settings for evaluation @@ -42,16 +37,6 @@ class AgentPlatformSettingsRequestModel(UncheckedBaseModel): Additional overrides for the agent during conversation initiation """ - call_limits: typing.Optional[AgentCallLimits] = pydantic.Field(default=None) - """ - Call limits for the agent - """ - - privacy: typing.Optional[PrivacyConfig] = pydantic.Field(default=None) - """ - Privacy settings for the agent - """ - workspace_overrides: typing.Optional[AgentWorkspaceOverridesInput] = pydantic.Field(default=None) """ Workspace overrides for the agent @@ -67,6 +52,21 @@ class AgentPlatformSettingsRequestModel(UncheckedBaseModel): Whether the agent is archived """ + auth: typing.Optional[AuthSettings] = pydantic.Field(default=None) + """ + Settings for authentication + """ + + call_limits: typing.Optional[AgentCallLimits] = pydantic.Field(default=None) + """ + Call limits for the agent + """ + + privacy: typing.Optional[PrivacyConfig] = pydantic.Field(default=None) + """ + Privacy settings for the agent + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/agent_platform_settings_response_model.py b/src/elevenlabs/types/agent_platform_settings_response_model.py index 55306932..8493ebbe 100644 --- a/src/elevenlabs/types/agent_platform_settings_response_model.py +++ b/src/elevenlabs/types/agent_platform_settings_response_model.py @@ -18,11 +18,6 @@ class AgentPlatformSettingsResponseModel(UncheckedBaseModel): - auth: typing.Optional[AuthSettings] = pydantic.Field(default=None) - """ - Settings for authentication - """ - evaluation: typing.Optional[EvaluationSettings] = pydantic.Field(default=None) """ Settings for evaluation @@ -43,16 +38,6 @@ class AgentPlatformSettingsResponseModel(UncheckedBaseModel): Additional overrides for the agent during conversation initiation """ - call_limits: typing.Optional[AgentCallLimits] = pydantic.Field(default=None) - """ - Call limits for the agent - """ - - privacy: typing.Optional[PrivacyConfig] = pydantic.Field(default=None) - """ - Privacy settings for the agent - """ - workspace_overrides: typing.Optional[AgentWorkspaceOverridesOutput] = pydantic.Field(default=None) """ Workspace overrides for the agent @@ -68,6 +53,21 @@ class AgentPlatformSettingsResponseModel(UncheckedBaseModel): Whether the agent is archived """ + auth: typing.Optional[AuthSettings] = pydantic.Field(default=None) + """ + Settings for authentication + """ + + call_limits: typing.Optional[AgentCallLimits] = pydantic.Field(default=None) + """ + Call limits for the agent + """ + + privacy: typing.Optional[PrivacyConfig] = pydantic.Field(default=None) + """ + Privacy settings for the agent + """ + safety: typing.Optional[SafetyResponseModel] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/agent_workflow_request_model.py b/src/elevenlabs/types/agent_workflow_request_model.py index 4769bee5..af0c9573 100644 --- a/src/elevenlabs/types/agent_workflow_request_model.py +++ b/src/elevenlabs/types/agent_workflow_request_model.py @@ -8,11 +8,11 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .agent_workflow_request_model_nodes_value import AgentWorkflowRequestModelNodesValue -from .workflow_edge_model import WorkflowEdgeModel +from .workflow_edge_model_input import WorkflowEdgeModelInput class AgentWorkflowRequestModel(UncheckedBaseModel): - edges: typing.Optional[typing.Dict[str, WorkflowEdgeModel]] = None + edges: typing.Optional[typing.Dict[str, WorkflowEdgeModelInput]] = None nodes: typing.Optional[typing.Dict[str, AgentWorkflowRequestModelNodesValue]] = None if IS_PYDANTIC_V2: @@ -25,14 +25,14 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 diff --git a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py index de302d71..62fa50ad 100644 --- a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py +++ b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py @@ -8,17 +8,19 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride +from .conversational_config_api_model_workflow_override_input import ConversationalConfigApiModelWorkflowOverrideInput from .knowledge_base_locator import KnowledgeBaseLocator -from .position import Position +from .position_input import PositionInput from .transfer_type_enum import TransferTypeEnum -from .workflow_phone_number_node_model_transfer_destination import WorkflowPhoneNumberNodeModelTransferDestination +from .workflow_phone_number_node_model_input_transfer_destination import ( + WorkflowPhoneNumberNodeModelInputTransferDestination, +) from .workflow_tool_locator import WorkflowToolLocator class AgentWorkflowRequestModelNodesValue_End(UncheckedBaseModel): type: typing.Literal["end"] = "end" - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: @@ -33,11 +35,11 @@ class Config: class AgentWorkflowRequestModelNodesValue_OverrideAgent(UncheckedBaseModel): type: typing.Literal["override_agent"] = "override_agent" - conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverride] = None + conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverrideInput] = None additional_prompt: typing.Optional[str] = None additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = None additional_tool_ids: typing.Optional[typing.List[str]] = None - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None label: str @@ -57,9 +59,9 @@ class Config: class AgentWorkflowRequestModelNodesValue_PhoneNumber(UncheckedBaseModel): type: typing.Literal["phone_number"] = "phone_number" - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None - transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination + transfer_destination: WorkflowPhoneNumberNodeModelInputTransferDestination transfer_type: typing.Optional[TransferTypeEnum] = None if IS_PYDANTIC_V2: @@ -74,7 +76,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_StandaloneAgent(UncheckedBaseModel): type: typing.Literal["standalone_agent"] = "standalone_agent" - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None agent_id: str delay_ms: typing.Optional[int] = None @@ -93,7 +95,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_Start(UncheckedBaseModel): type: typing.Literal["start"] = "start" - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: @@ -108,7 +110,7 @@ class Config: class AgentWorkflowRequestModelNodesValue_Tool(UncheckedBaseModel): type: typing.Literal["tool"] = "tool" - position: typing.Optional[Position] = None + position: typing.Optional[PositionInput] = None edge_order: typing.Optional[typing.List[str]] = None tools: typing.Optional[typing.List[WorkflowToolLocator]] = None diff --git a/src/elevenlabs/types/agent_workflow_response_model.py b/src/elevenlabs/types/agent_workflow_response_model.py new file mode 100644 index 00000000..f724ef7b --- /dev/null +++ b/src/elevenlabs/types/agent_workflow_response_model.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_workflow_response_model_nodes_value import AgentWorkflowResponseModelNodesValue +from .workflow_edge_model_output import WorkflowEdgeModelOutput + + +class AgentWorkflowResponseModel(UncheckedBaseModel): + edges: typing.Dict[str, WorkflowEdgeModelOutput] + nodes: typing.Dict[str, AgentWorkflowResponseModelNodesValue] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(AgentWorkflowResponseModel) diff --git a/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py new file mode 100644 index 00000000..3b71808b --- /dev/null +++ b/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py @@ -0,0 +1,138 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversational_config_api_model_workflow_override_output import ConversationalConfigApiModelWorkflowOverrideOutput +from .knowledge_base_locator import KnowledgeBaseLocator +from .position_output import PositionOutput +from .transfer_type_enum import TransferTypeEnum +from .workflow_phone_number_node_model_output_transfer_destination import ( + WorkflowPhoneNumberNodeModelOutputTransferDestination, +) +from .workflow_tool_locator import WorkflowToolLocator + + +class AgentWorkflowResponseModelNodesValue_End(UncheckedBaseModel): + type: typing.Literal["end"] = "end" + position: PositionOutput + edge_order: typing.List[str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowResponseModelNodesValue_OverrideAgent(UncheckedBaseModel): + type: typing.Literal["override_agent"] = "override_agent" + conversation_config: ConversationalConfigApiModelWorkflowOverrideOutput + additional_prompt: str + additional_knowledge_base: typing.List[KnowledgeBaseLocator] + additional_tool_ids: typing.List[str] + position: PositionOutput + edge_order: typing.List[str] + label: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + + +class AgentWorkflowResponseModelNodesValue_PhoneNumber(UncheckedBaseModel): + type: typing.Literal["phone_number"] = "phone_number" + position: PositionOutput + edge_order: typing.List[str] + transfer_destination: WorkflowPhoneNumberNodeModelOutputTransferDestination + transfer_type: TransferTypeEnum + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowResponseModelNodesValue_StandaloneAgent(UncheckedBaseModel): + type: typing.Literal["standalone_agent"] = "standalone_agent" + position: PositionOutput + edge_order: typing.List[str] + agent_id: str + delay_ms: int + transfer_message: typing.Optional[str] = None + enable_transferred_agent_first_message: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowResponseModelNodesValue_Start(UncheckedBaseModel): + type: typing.Literal["start"] = "start" + position: PositionOutput + edge_order: typing.List[str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AgentWorkflowResponseModelNodesValue_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + position: PositionOutput + edge_order: typing.List[str] + tools: typing.List[WorkflowToolLocator] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AgentWorkflowResponseModelNodesValue = typing_extensions.Annotated[ + typing.Union[ + AgentWorkflowResponseModelNodesValue_End, + AgentWorkflowResponseModelNodesValue_OverrideAgent, + AgentWorkflowResponseModelNodesValue_PhoneNumber, + AgentWorkflowResponseModelNodesValue_StandaloneAgent, + AgentWorkflowResponseModelNodesValue_Start, + AgentWorkflowResponseModelNodesValue_Tool, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(AgentWorkflowResponseModelNodesValue_OverrideAgent) diff --git a/src/elevenlabs/types/alignment.py b/src/elevenlabs/types/alignment.py index ae03e97e..73cf72c5 100644 --- a/src/elevenlabs/types/alignment.py +++ b/src/elevenlabs/types/alignment.py @@ -24,8 +24,8 @@ class Alignment(UncheckedBaseModel): full audio response. """ - chars_durations_ms: typing_extensions.Annotated[ - typing.Optional[typing.List[int]], FieldMetadata(alias="charsDurationsMs") + char_durations_ms: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], FieldMetadata(alias="charDurationsMs") ] = pydantic.Field(default=None) """ A list of durations (in milliseconds) for each character in the text as it @@ -38,7 +38,7 @@ class Alignment(UncheckedBaseModel): """ A list of characters in the text sequence. For instance, the first character is 'H'. Note that this list may contain spaces, punctuation, and other special characters. - The length of this list should be the same as the lengths of `charStartTimesMs` and `charsDurationsMs`. + The length of this list should be the same as the lengths of `charStartTimesMs` and `charDurationsMs`. """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/ast_and_operator_node.py b/src/elevenlabs/types/ast_and_operator_node.py deleted file mode 100644 index 1dae1dc4..00000000 --- a/src/elevenlabs/types/ast_and_operator_node.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstAndOperatorNode(UncheckedBaseModel): - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstAndOperatorNode) diff --git a/src/elevenlabs/types/ast_and_operator_node_children_item.py b/src/elevenlabs/types/ast_and_operator_node_children_item.py deleted file mode 100644 index e9f16b48..00000000 --- a/src/elevenlabs/types/ast_and_operator_node_children_item.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstAndOperatorNodeChildrenItem_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstAndOperatorNodeChildrenItem_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstAndOperatorNodeChildrenItem_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstAndOperatorNodeChildrenItem = typing_extensions.Annotated[ - typing.Union[ - AstAndOperatorNodeChildrenItem_AndOperator, - AstAndOperatorNodeChildrenItem_BooleanLiteral, - AstAndOperatorNodeChildrenItem_DynamicVariable, - AstAndOperatorNodeChildrenItem_EqOperator, - AstAndOperatorNodeChildrenItem_GtOperator, - AstAndOperatorNodeChildrenItem_GteOperator, - AstAndOperatorNodeChildrenItem_Llm, - AstAndOperatorNodeChildrenItem_LtOperator, - AstAndOperatorNodeChildrenItem_LteOperator, - AstAndOperatorNodeChildrenItem_NeqOperator, - AstAndOperatorNodeChildrenItem_NumberLiteral, - AstAndOperatorNodeChildrenItem_OrOperator, - AstAndOperatorNodeChildrenItem_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstAndOperatorNodeChildrenItem_AndOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_EqOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_GtOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_GteOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_LtOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_LteOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_NeqOperator) -update_forward_refs(AstAndOperatorNodeChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_and_operator_node_input.py b/src/elevenlabs/types/ast_and_operator_node_input.py new file mode 100644 index 00000000..b2504a87 --- /dev/null +++ b/src/elevenlabs/types/ast_and_operator_node_input.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstAndOperatorNodeInput(UncheckedBaseModel): + children: typing.List["AstAndOperatorNodeInputChildrenItem"] = pydantic.Field() + """ + Child nodes of the logical operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py b/src/elevenlabs/types/ast_and_operator_node_input_children_item.py similarity index 50% rename from src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py rename to src/elevenlabs/types/ast_and_operator_node_input_children_item.py index f28df8cb..b1bc8e50 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_left.py +++ b/src/elevenlabs/types/ast_and_operator_node_input_children_item.py @@ -10,9 +10,9 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -class AstLessThanOrEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_AndOperator(UncheckedBaseModel): type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] + children: typing.List["AstAndOperatorNodeInputChildrenItem"] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -24,7 +24,7 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_BooleanLiteral(UncheckedBaseModel): type: typing.Literal["boolean_literal"] = "boolean_literal" value: bool @@ -38,7 +38,7 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_DynamicVariable(UncheckedBaseModel): type: typing.Literal["dynamic_variable"] = "dynamic_variable" name: str @@ -52,10 +52,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_EqOperator(UncheckedBaseModel): type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -67,10 +67,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_GtOperator(UncheckedBaseModel): type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -82,10 +82,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_GteOperator(UncheckedBaseModel): type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -97,7 +97,7 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" prompt: str @@ -111,10 +111,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_LtOperator(UncheckedBaseModel): type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -126,10 +126,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_LteOperator(UncheckedBaseModel): type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -141,10 +141,10 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_NeqOperator(UncheckedBaseModel): type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -156,7 +156,7 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_NumberLiteral(UncheckedBaseModel): type: typing.Literal["number_literal"] = "number_literal" value: float @@ -170,9 +170,9 @@ class Config: extra = pydantic.Extra.allow -class AstLessThanOrEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_OrOperator(UncheckedBaseModel): type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] + children: typing.List["AstOrOperatorNodeInputChildrenItem"] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -184,17 +184,17 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -class AstLessThanOrEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): +class AstAndOperatorNodeInputChildrenItem_StringLiteral(UncheckedBaseModel): type: typing.Literal["string_literal"] = "string_literal" value: str @@ -208,43 +208,43 @@ class Config: extra = pydantic.Extra.allow -AstLessThanOrEqualsOperatorNodeLeft = typing_extensions.Annotated[ +AstAndOperatorNodeInputChildrenItem = typing_extensions.Annotated[ typing.Union[ - AstLessThanOrEqualsOperatorNodeLeft_AndOperator, - AstLessThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstLessThanOrEqualsOperatorNodeLeft_EqOperator, - AstLessThanOrEqualsOperatorNodeLeft_GtOperator, - AstLessThanOrEqualsOperatorNodeLeft_GteOperator, - AstLessThanOrEqualsOperatorNodeLeft_Llm, - AstLessThanOrEqualsOperatorNodeLeft_LtOperator, - AstLessThanOrEqualsOperatorNodeLeft_LteOperator, - AstLessThanOrEqualsOperatorNodeLeft_NeqOperator, - AstLessThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstLessThanOrEqualsOperatorNodeLeft_OrOperator, - AstLessThanOrEqualsOperatorNodeLeft_StringLiteral, + AstAndOperatorNodeInputChildrenItem_AndOperator, + AstAndOperatorNodeInputChildrenItem_BooleanLiteral, + AstAndOperatorNodeInputChildrenItem_DynamicVariable, + AstAndOperatorNodeInputChildrenItem_EqOperator, + AstAndOperatorNodeInputChildrenItem_GtOperator, + AstAndOperatorNodeInputChildrenItem_GteOperator, + AstAndOperatorNodeInputChildrenItem_Llm, + AstAndOperatorNodeInputChildrenItem_LtOperator, + AstAndOperatorNodeInputChildrenItem_LteOperator, + AstAndOperatorNodeInputChildrenItem_NeqOperator, + AstAndOperatorNodeInputChildrenItem_NumberLiteral, + AstAndOperatorNodeInputChildrenItem_OrOperator, + AstAndOperatorNodeInputChildrenItem_StringLiteral, ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_AndOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_EqOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_GtOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_GteOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_LtOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_LteOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_NeqOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeLeft_OrOperator) +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNodeInputChildrenItem_AndOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_EqOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_GtOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_GteOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_LtOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_LteOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_NeqOperator) +update_forward_refs(AstAndOperatorNodeInputChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_and_operator_node_output.py b/src/elevenlabs/types/ast_and_operator_node_output.py new file mode 100644 index 00000000..8cc3ab03 --- /dev/null +++ b/src/elevenlabs/types/ast_and_operator_node_output.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstAndOperatorNodeOutput(UncheckedBaseModel): + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] = pydantic.Field() + """ + Child nodes of the logical operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_and_operator_node_output_children_item.py b/src/elevenlabs/types/ast_and_operator_node_output_children_item.py new file mode 100644 index 00000000..667673b5 --- /dev/null +++ b/src/elevenlabs/types/ast_and_operator_node_output_children_item.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstAndOperatorNodeOutputChildrenItem_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstAndOperatorNodeOutputChildrenItem_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstAndOperatorNodeOutputChildrenItem_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstAndOperatorNodeOutputChildrenItem = typing_extensions.Annotated[ + typing.Union[ + AstAndOperatorNodeOutputChildrenItem_AndOperator, + AstAndOperatorNodeOutputChildrenItem_BooleanLiteral, + AstAndOperatorNodeOutputChildrenItem_DynamicVariable, + AstAndOperatorNodeOutputChildrenItem_EqOperator, + AstAndOperatorNodeOutputChildrenItem_GtOperator, + AstAndOperatorNodeOutputChildrenItem_GteOperator, + AstAndOperatorNodeOutputChildrenItem_Llm, + AstAndOperatorNodeOutputChildrenItem_LtOperator, + AstAndOperatorNodeOutputChildrenItem_LteOperator, + AstAndOperatorNodeOutputChildrenItem_NeqOperator, + AstAndOperatorNodeOutputChildrenItem_NumberLiteral, + AstAndOperatorNodeOutputChildrenItem_OrOperator, + AstAndOperatorNodeOutputChildrenItem_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_AndOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_EqOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_GtOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_GteOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_LtOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_LteOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_NeqOperator) +update_forward_refs(AstAndOperatorNodeOutputChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_boolean_node_input.py b/src/elevenlabs/types/ast_boolean_node_input.py new file mode 100644 index 00000000..a1f2a4ca --- /dev/null +++ b/src/elevenlabs/types/ast_boolean_node_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstBooleanNodeInput(UncheckedBaseModel): + value: bool = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_boolean_node_output.py b/src/elevenlabs/types/ast_boolean_node_output.py new file mode 100644 index 00000000..e2ddd304 --- /dev/null +++ b/src/elevenlabs/types/ast_boolean_node_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstBooleanNodeOutput(UncheckedBaseModel): + value: bool = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_dynamic_variable_node_input.py b/src/elevenlabs/types/ast_dynamic_variable_node_input.py new file mode 100644 index 00000000..48fff531 --- /dev/null +++ b/src/elevenlabs/types/ast_dynamic_variable_node_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstDynamicVariableNodeInput(UncheckedBaseModel): + name: str = pydantic.Field() + """ + The name of the dynamic variable. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_dynamic_variable_node_output.py b/src/elevenlabs/types/ast_dynamic_variable_node_output.py new file mode 100644 index 00000000..1a7eda58 --- /dev/null +++ b/src/elevenlabs/types/ast_dynamic_variable_node_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstDynamicVariableNodeOutput(UncheckedBaseModel): + name: str = pydantic.Field() + """ + The name of the dynamic variable. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_equals_operator_node.py b/src/elevenlabs/types/ast_equals_operator_node.py deleted file mode 100644 index 4d8538db..00000000 --- a/src/elevenlabs/types/ast_equals_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstEqualsOperatorNode(UncheckedBaseModel): - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input.py b/src/elevenlabs/types/ast_equals_operator_node_input.py new file mode 100644 index 00000000..31d72218 --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstEqualsOperatorNodeInput(UncheckedBaseModel): + left: "AstEqualsOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstEqualsOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_equals_operator_node_input_left.py new file mode 100644 index 00000000..ec16c11a --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeInputLeft_AndOperator, + AstEqualsOperatorNodeInputLeft_BooleanLiteral, + AstEqualsOperatorNodeInputLeft_DynamicVariable, + AstEqualsOperatorNodeInputLeft_EqOperator, + AstEqualsOperatorNodeInputLeft_GtOperator, + AstEqualsOperatorNodeInputLeft_GteOperator, + AstEqualsOperatorNodeInputLeft_Llm, + AstEqualsOperatorNodeInputLeft_LtOperator, + AstEqualsOperatorNodeInputLeft_LteOperator, + AstEqualsOperatorNodeInputLeft_NeqOperator, + AstEqualsOperatorNodeInputLeft_NumberLiteral, + AstEqualsOperatorNodeInputLeft_OrOperator, + AstEqualsOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_equals_operator_node_input_right.py new file mode 100644 index 00000000..0b7828eb --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeInputRight_AndOperator, + AstEqualsOperatorNodeInputRight_BooleanLiteral, + AstEqualsOperatorNodeInputRight_DynamicVariable, + AstEqualsOperatorNodeInputRight_EqOperator, + AstEqualsOperatorNodeInputRight_GtOperator, + AstEqualsOperatorNodeInputRight_GteOperator, + AstEqualsOperatorNodeInputRight_Llm, + AstEqualsOperatorNodeInputRight_LtOperator, + AstEqualsOperatorNodeInputRight_LteOperator, + AstEqualsOperatorNodeInputRight_NeqOperator, + AstEqualsOperatorNodeInputRight_NumberLiteral, + AstEqualsOperatorNodeInputRight_OrOperator, + AstEqualsOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeInputRight_AndOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_EqOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_GtOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_GteOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_LtOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_LteOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_left.py b/src/elevenlabs/types/ast_equals_operator_node_left.py deleted file mode 100644 index 54f541c7..00000000 --- a/src/elevenlabs/types/ast_equals_operator_node_left.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstEqualsOperatorNodeLeft = typing_extensions.Annotated[ - typing.Union[ - AstEqualsOperatorNodeLeft_AndOperator, - AstEqualsOperatorNodeLeft_BooleanLiteral, - AstEqualsOperatorNodeLeft_DynamicVariable, - AstEqualsOperatorNodeLeft_EqOperator, - AstEqualsOperatorNodeLeft_GtOperator, - AstEqualsOperatorNodeLeft_GteOperator, - AstEqualsOperatorNodeLeft_Llm, - AstEqualsOperatorNodeLeft_LtOperator, - AstEqualsOperatorNodeLeft_LteOperator, - AstEqualsOperatorNodeLeft_NeqOperator, - AstEqualsOperatorNodeLeft_NumberLiteral, - AstEqualsOperatorNodeLeft_OrOperator, - AstEqualsOperatorNodeLeft_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstEqualsOperatorNodeLeft_AndOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_EqOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_GtOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_GteOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_LtOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_LteOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_NeqOperator) -update_forward_refs(AstEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output.py b/src/elevenlabs/types/ast_equals_operator_node_output.py new file mode 100644 index 00000000..1fb84043 --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstEqualsOperatorNodeOutput(UncheckedBaseModel): + left: "AstEqualsOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstEqualsOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_equals_operator_node_output_left.py new file mode 100644 index 00000000..0d65c56d --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeOutputLeft_AndOperator, + AstEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstEqualsOperatorNodeOutputLeft_DynamicVariable, + AstEqualsOperatorNodeOutputLeft_EqOperator, + AstEqualsOperatorNodeOutputLeft_GtOperator, + AstEqualsOperatorNodeOutputLeft_GteOperator, + AstEqualsOperatorNodeOutputLeft_Llm, + AstEqualsOperatorNodeOutputLeft_LtOperator, + AstEqualsOperatorNodeOutputLeft_LteOperator, + AstEqualsOperatorNodeOutputLeft_NeqOperator, + AstEqualsOperatorNodeOutputLeft_NumberLiteral, + AstEqualsOperatorNodeOutputLeft_OrOperator, + AstEqualsOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_equals_operator_node_output_right.py new file mode 100644 index 00000000..b38f9889 --- /dev/null +++ b/src/elevenlabs/types/ast_equals_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstEqualsOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstEqualsOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstEqualsOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstEqualsOperatorNodeOutputRight_AndOperator, + AstEqualsOperatorNodeOutputRight_BooleanLiteral, + AstEqualsOperatorNodeOutputRight_DynamicVariable, + AstEqualsOperatorNodeOutputRight_EqOperator, + AstEqualsOperatorNodeOutputRight_GtOperator, + AstEqualsOperatorNodeOutputRight_GteOperator, + AstEqualsOperatorNodeOutputRight_Llm, + AstEqualsOperatorNodeOutputRight_LtOperator, + AstEqualsOperatorNodeOutputRight_LteOperator, + AstEqualsOperatorNodeOutputRight_NeqOperator, + AstEqualsOperatorNodeOutputRight_NumberLiteral, + AstEqualsOperatorNodeOutputRight_OrOperator, + AstEqualsOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstEqualsOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstEqualsOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_right.py b/src/elevenlabs/types/ast_equals_operator_node_right.py deleted file mode 100644 index 46fa1a04..00000000 --- a/src/elevenlabs/types/ast_equals_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstEqualsOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstEqualsOperatorNodeRight_AndOperator, - AstEqualsOperatorNodeRight_BooleanLiteral, - AstEqualsOperatorNodeRight_DynamicVariable, - AstEqualsOperatorNodeRight_EqOperator, - AstEqualsOperatorNodeRight_GtOperator, - AstEqualsOperatorNodeRight_GteOperator, - AstEqualsOperatorNodeRight_Llm, - AstEqualsOperatorNodeRight_LtOperator, - AstEqualsOperatorNodeRight_LteOperator, - AstEqualsOperatorNodeRight_NeqOperator, - AstEqualsOperatorNodeRight_NumberLiteral, - AstEqualsOperatorNodeRight_OrOperator, - AstEqualsOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstEqualsOperatorNodeRight_AndOperator) -update_forward_refs(AstEqualsOperatorNodeRight_EqOperator) -update_forward_refs(AstEqualsOperatorNodeRight_GtOperator) -update_forward_refs(AstEqualsOperatorNodeRight_GteOperator) -update_forward_refs(AstEqualsOperatorNodeRight_LtOperator) -update_forward_refs(AstEqualsOperatorNodeRight_LteOperator) -update_forward_refs(AstEqualsOperatorNodeRight_NeqOperator) -update_forward_refs(AstEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node.py b/src/elevenlabs/types/ast_greater_than_operator_node.py deleted file mode 100644 index 643f23c4..00000000 --- a/src/elevenlabs/types/ast_greater_than_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstGreaterThanOperatorNode(UncheckedBaseModel): - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOperatorNode) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input.py b/src/elevenlabs/types/ast_greater_than_operator_node_input.py new file mode 100644 index 00000000..2b8b161b --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOperatorNodeInput(UncheckedBaseModel): + left: "AstGreaterThanOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstGreaterThanOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py new file mode 100644 index 00000000..e5e9c80a --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeInputLeft_AndOperator, + AstGreaterThanOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOperatorNodeInputLeft_EqOperator, + AstGreaterThanOperatorNodeInputLeft_GtOperator, + AstGreaterThanOperatorNodeInputLeft_GteOperator, + AstGreaterThanOperatorNodeInputLeft_Llm, + AstGreaterThanOperatorNodeInputLeft_LtOperator, + AstGreaterThanOperatorNodeInputLeft_LteOperator, + AstGreaterThanOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOperatorNodeInputLeft_OrOperator, + AstGreaterThanOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py new file mode 100644 index 00000000..3bbf349b --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeInputRight_AndOperator, + AstGreaterThanOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOperatorNodeInputRight_EqOperator, + AstGreaterThanOperatorNodeInputRight_GtOperator, + AstGreaterThanOperatorNodeInputRight_GteOperator, + AstGreaterThanOperatorNodeInputRight_Llm, + AstGreaterThanOperatorNodeInputRight_LtOperator, + AstGreaterThanOperatorNodeInputRight_LteOperator, + AstGreaterThanOperatorNodeInputRight_NeqOperator, + AstGreaterThanOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOperatorNodeInputRight_OrOperator, + AstGreaterThanOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeInputRight_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_left.py deleted file mode 100644 index 28334255..00000000 --- a/src/elevenlabs/types/ast_greater_than_operator_node_left.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstGreaterThanOperatorNodeLeft_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeLeft_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstGreaterThanOperatorNodeLeft_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstGreaterThanOperatorNodeLeft = typing_extensions.Annotated[ - typing.Union[ - AstGreaterThanOperatorNodeLeft_AndOperator, - AstGreaterThanOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOperatorNodeLeft_DynamicVariable, - AstGreaterThanOperatorNodeLeft_EqOperator, - AstGreaterThanOperatorNodeLeft_GtOperator, - AstGreaterThanOperatorNodeLeft_GteOperator, - AstGreaterThanOperatorNodeLeft_Llm, - AstGreaterThanOperatorNodeLeft_LtOperator, - AstGreaterThanOperatorNodeLeft_LteOperator, - AstGreaterThanOperatorNodeLeft_NeqOperator, - AstGreaterThanOperatorNodeLeft_NumberLiteral, - AstGreaterThanOperatorNodeLeft_OrOperator, - AstGreaterThanOperatorNodeLeft_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOperatorNodeLeft_AndOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_EqOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_GtOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_GteOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_LtOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_LteOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_NeqOperator) -update_forward_refs(AstGreaterThanOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output.py b/src/elevenlabs/types/ast_greater_than_operator_node_output.py new file mode 100644 index 00000000..aabac66f --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOperatorNodeOutput(UncheckedBaseModel): + left: "AstGreaterThanOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstGreaterThanOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py new file mode 100644 index 00000000..d0b19b56 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOperatorNodeOutputLeft_Llm, + AstGreaterThanOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py new file mode 100644 index 00000000..66c2cc39 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstGreaterThanOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOperatorNodeOutputRight_AndOperator, + AstGreaterThanOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOperatorNodeOutputRight_EqOperator, + AstGreaterThanOperatorNodeOutputRight_GtOperator, + AstGreaterThanOperatorNodeOutputRight_GteOperator, + AstGreaterThanOperatorNodeOutputRight_Llm, + AstGreaterThanOperatorNodeOutputRight_LtOperator, + AstGreaterThanOperatorNodeOutputRight_LteOperator, + AstGreaterThanOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOperatorNodeOutputRight_OrOperator, + AstGreaterThanOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstGreaterThanOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_right.py deleted file mode 100644 index ddfbd00c..00000000 --- a/src/elevenlabs/types/ast_greater_than_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstGreaterThanOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstGreaterThanOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstGreaterThanOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstGreaterThanOperatorNodeRight_AndOperator, - AstGreaterThanOperatorNodeRight_BooleanLiteral, - AstGreaterThanOperatorNodeRight_DynamicVariable, - AstGreaterThanOperatorNodeRight_EqOperator, - AstGreaterThanOperatorNodeRight_GtOperator, - AstGreaterThanOperatorNodeRight_GteOperator, - AstGreaterThanOperatorNodeRight_Llm, - AstGreaterThanOperatorNodeRight_LtOperator, - AstGreaterThanOperatorNodeRight_LteOperator, - AstGreaterThanOperatorNodeRight_NeqOperator, - AstGreaterThanOperatorNodeRight_NumberLiteral, - AstGreaterThanOperatorNodeRight_OrOperator, - AstGreaterThanOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOperatorNodeRight_AndOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_EqOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_GtOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_GteOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_LtOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_LteOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_NeqOperator) -update_forward_refs(AstGreaterThanOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py deleted file mode 100644 index 88fcd936..00000000 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstGreaterThanOrEqualsOperatorNode(UncheckedBaseModel): - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOrEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py new file mode 100644 index 00000000..17ab197d --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOrEqualsOperatorNodeInput(UncheckedBaseModel): + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py new file mode 100644 index 00000000..a91dee4f --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py new file mode 100644 index 00000000..cb9d9aac --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py deleted file mode 100644 index 8c9a8628..00000000 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_left.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstGreaterThanOrEqualsOperatorNodeLeft = typing_extensions.Annotated[ - typing.Union[ - AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_Llm, - AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator, - AstGreaterThanOrEqualsOperatorNodeLeft_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_AndOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_EqOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_GtOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_GteOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_LtOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_LteOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_NeqOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py new file mode 100644 index 00000000..8b879478 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstGreaterThanOrEqualsOperatorNodeOutput(UncheckedBaseModel): + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py new file mode 100644 index 00000000..c19c321a --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py new file mode 100644 index 00000000..743bd1f3 --- /dev/null +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstGreaterThanOrEqualsOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_Llm, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py deleted file mode 100644 index 966f7df2..00000000 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstGreaterThanOrEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstGreaterThanOrEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstGreaterThanOrEqualsOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstGreaterThanOrEqualsOperatorNodeRight_AndOperator, - AstGreaterThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_DynamicVariable, - AstGreaterThanOrEqualsOperatorNodeRight_EqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_GteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_Llm, - AstGreaterThanOrEqualsOperatorNodeRight_LtOperator, - AstGreaterThanOrEqualsOperatorNodeRight_LteOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator, - AstGreaterThanOrEqualsOperatorNodeRight_NumberLiteral, - AstGreaterThanOrEqualsOperatorNodeRight_OrOperator, - AstGreaterThanOrEqualsOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_AndOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_EqOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_GtOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_GteOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_LtOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_LteOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_NeqOperator) -update_forward_refs(AstGreaterThanOrEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node.py b/src/elevenlabs/types/ast_less_than_operator_node.py deleted file mode 100644 index 43ed309b..00000000 --- a/src/elevenlabs/types/ast_less_than_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstLessThanOperatorNode(UncheckedBaseModel): - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOperatorNode) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input.py b/src/elevenlabs/types/ast_less_than_operator_node_input.py new file mode 100644 index 00000000..3e9e770a --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOperatorNodeInput(UncheckedBaseModel): + left: "AstLessThanOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstLessThanOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input_left.py b/src/elevenlabs/types/ast_less_than_operator_node_input_left.py new file mode 100644 index 00000000..9912e4f5 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeInputLeft_AndOperator, + AstLessThanOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOperatorNodeInputLeft_DynamicVariable, + AstLessThanOperatorNodeInputLeft_EqOperator, + AstLessThanOperatorNodeInputLeft_GtOperator, + AstLessThanOperatorNodeInputLeft_GteOperator, + AstLessThanOperatorNodeInputLeft_Llm, + AstLessThanOperatorNodeInputLeft_LtOperator, + AstLessThanOperatorNodeInputLeft_LteOperator, + AstLessThanOperatorNodeInputLeft_NeqOperator, + AstLessThanOperatorNodeInputLeft_NumberLiteral, + AstLessThanOperatorNodeInputLeft_OrOperator, + AstLessThanOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input_right.py b/src/elevenlabs/types/ast_less_than_operator_node_input_right.py new file mode 100644 index 00000000..cb1de1d6 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeInputRight_AndOperator, + AstLessThanOperatorNodeInputRight_BooleanLiteral, + AstLessThanOperatorNodeInputRight_DynamicVariable, + AstLessThanOperatorNodeInputRight_EqOperator, + AstLessThanOperatorNodeInputRight_GtOperator, + AstLessThanOperatorNodeInputRight_GteOperator, + AstLessThanOperatorNodeInputRight_Llm, + AstLessThanOperatorNodeInputRight_LtOperator, + AstLessThanOperatorNodeInputRight_LteOperator, + AstLessThanOperatorNodeInputRight_NeqOperator, + AstLessThanOperatorNodeInputRight_NumberLiteral, + AstLessThanOperatorNodeInputRight_OrOperator, + AstLessThanOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeInputRight_AndOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_EqOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_GtOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_GteOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_LtOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_LteOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_left.py b/src/elevenlabs/types/ast_less_than_operator_node_left.py deleted file mode 100644 index b38f762e..00000000 --- a/src/elevenlabs/types/ast_less_than_operator_node_left.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstLessThanOperatorNodeLeft_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeLeft_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstLessThanOperatorNodeLeft_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstLessThanOperatorNodeLeft = typing_extensions.Annotated[ - typing.Union[ - AstLessThanOperatorNodeLeft_AndOperator, - AstLessThanOperatorNodeLeft_BooleanLiteral, - AstLessThanOperatorNodeLeft_DynamicVariable, - AstLessThanOperatorNodeLeft_EqOperator, - AstLessThanOperatorNodeLeft_GtOperator, - AstLessThanOperatorNodeLeft_GteOperator, - AstLessThanOperatorNodeLeft_Llm, - AstLessThanOperatorNodeLeft_LtOperator, - AstLessThanOperatorNodeLeft_LteOperator, - AstLessThanOperatorNodeLeft_NeqOperator, - AstLessThanOperatorNodeLeft_NumberLiteral, - AstLessThanOperatorNodeLeft_OrOperator, - AstLessThanOperatorNodeLeft_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOperatorNodeLeft_AndOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_EqOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_GtOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_GteOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_LtOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_LteOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_NeqOperator) -update_forward_refs(AstLessThanOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output.py b/src/elevenlabs/types/ast_less_than_operator_node_output.py new file mode 100644 index 00000000..00afccdc --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOperatorNodeOutput(UncheckedBaseModel): + left: "AstLessThanOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstLessThanOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output_left.py b/src/elevenlabs/types/ast_less_than_operator_node_output_left.py new file mode 100644 index 00000000..cc3e684d --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeOutputLeft_AndOperator, + AstLessThanOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOperatorNodeOutputLeft_EqOperator, + AstLessThanOperatorNodeOutputLeft_GtOperator, + AstLessThanOperatorNodeOutputLeft_GteOperator, + AstLessThanOperatorNodeOutputLeft_Llm, + AstLessThanOperatorNodeOutputLeft_LtOperator, + AstLessThanOperatorNodeOutputLeft_LteOperator, + AstLessThanOperatorNodeOutputLeft_NeqOperator, + AstLessThanOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOperatorNodeOutputLeft_OrOperator, + AstLessThanOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output_right.py b/src/elevenlabs/types/ast_less_than_operator_node_output_right.py new file mode 100644 index 00000000..993f9337 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstLessThanOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOperatorNodeOutputRight_AndOperator, + AstLessThanOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOperatorNodeOutputRight_DynamicVariable, + AstLessThanOperatorNodeOutputRight_EqOperator, + AstLessThanOperatorNodeOutputRight_GtOperator, + AstLessThanOperatorNodeOutputRight_GteOperator, + AstLessThanOperatorNodeOutputRight_Llm, + AstLessThanOperatorNodeOutputRight_LtOperator, + AstLessThanOperatorNodeOutputRight_LteOperator, + AstLessThanOperatorNodeOutputRight_NeqOperator, + AstLessThanOperatorNodeOutputRight_NumberLiteral, + AstLessThanOperatorNodeOutputRight_OrOperator, + AstLessThanOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstLessThanOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_right.py b/src/elevenlabs/types/ast_less_than_operator_node_right.py deleted file mode 100644 index 6a535dab..00000000 --- a/src/elevenlabs/types/ast_less_than_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstLessThanOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstLessThanOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstLessThanOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstLessThanOperatorNodeRight_AndOperator, - AstLessThanOperatorNodeRight_BooleanLiteral, - AstLessThanOperatorNodeRight_DynamicVariable, - AstLessThanOperatorNodeRight_EqOperator, - AstLessThanOperatorNodeRight_GtOperator, - AstLessThanOperatorNodeRight_GteOperator, - AstLessThanOperatorNodeRight_Llm, - AstLessThanOperatorNodeRight_LtOperator, - AstLessThanOperatorNodeRight_LteOperator, - AstLessThanOperatorNodeRight_NeqOperator, - AstLessThanOperatorNodeRight_NumberLiteral, - AstLessThanOperatorNodeRight_OrOperator, - AstLessThanOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOperatorNodeRight_AndOperator) -update_forward_refs(AstLessThanOperatorNodeRight_EqOperator) -update_forward_refs(AstLessThanOperatorNodeRight_GtOperator) -update_forward_refs(AstLessThanOperatorNodeRight_GteOperator) -update_forward_refs(AstLessThanOperatorNodeRight_LtOperator) -update_forward_refs(AstLessThanOperatorNodeRight_LteOperator) -update_forward_refs(AstLessThanOperatorNodeRight_NeqOperator) -update_forward_refs(AstLessThanOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py deleted file mode 100644 index 5f812246..00000000 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstLessThanOrEqualsOperatorNode(UncheckedBaseModel): - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOrEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py new file mode 100644 index 00000000..6e243f44 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOrEqualsOperatorNodeInput(UncheckedBaseModel): + left: "AstLessThanOrEqualsOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstLessThanOrEqualsOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py new file mode 100644 index 00000000..3feb468a --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_Llm, + AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py new file mode 100644 index 00000000..e761f2a1 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeInputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeInputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeInputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_Llm, + AstLessThanOrEqualsOperatorNodeInputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeInputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeInputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeInputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py new file mode 100644 index 00000000..e6e45da1 --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstLessThanOrEqualsOperatorNodeOutput(UncheckedBaseModel): + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstLessThanOrEqualsOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py new file mode 100644 index 00000000..2206d65f --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_Llm, + AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py new file mode 100644 index 00000000..582578ed --- /dev/null +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstLessThanOrEqualsOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_BooleanLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_DynamicVariable, + AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_Llm, + AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_NumberLiteral, + AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator, + AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py deleted file mode 100644 index 6b6d6be7..00000000 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstLessThanOrEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstLessThanOrEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstLessThanOrEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstLessThanOrEqualsOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstLessThanOrEqualsOperatorNodeRight_AndOperator, - AstLessThanOrEqualsOperatorNodeRight_BooleanLiteral, - AstLessThanOrEqualsOperatorNodeRight_DynamicVariable, - AstLessThanOrEqualsOperatorNodeRight_EqOperator, - AstLessThanOrEqualsOperatorNodeRight_GtOperator, - AstLessThanOrEqualsOperatorNodeRight_GteOperator, - AstLessThanOrEqualsOperatorNodeRight_Llm, - AstLessThanOrEqualsOperatorNodeRight_LtOperator, - AstLessThanOrEqualsOperatorNodeRight_LteOperator, - AstLessThanOrEqualsOperatorNodeRight_NeqOperator, - AstLessThanOrEqualsOperatorNodeRight_NumberLiteral, - AstLessThanOrEqualsOperatorNodeRight_OrOperator, - AstLessThanOrEqualsOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_AndOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_EqOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_GtOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_GteOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_LtOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_LteOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_NeqOperator) -update_forward_refs(AstLessThanOrEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node.py b/src/elevenlabs/types/ast_not_equals_operator_node.py deleted file mode 100644 index 5f986a48..00000000 --- a/src/elevenlabs/types/ast_not_equals_operator_node.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstNotEqualsOperatorNode(UncheckedBaseModel): - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstNotEqualsOperatorNode) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input.py b/src/elevenlabs/types/ast_not_equals_operator_node_input.py new file mode 100644 index 00000000..952a5c31 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNotEqualsOperatorNodeInput(UncheckedBaseModel): + left: "AstNotEqualsOperatorNodeInputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstNotEqualsOperatorNodeInputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py new file mode 100644 index 00000000..8f062154 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeInputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeInputLeft = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeInputLeft_AndOperator, + AstNotEqualsOperatorNodeInputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeInputLeft_DynamicVariable, + AstNotEqualsOperatorNodeInputLeft_EqOperator, + AstNotEqualsOperatorNodeInputLeft_GtOperator, + AstNotEqualsOperatorNodeInputLeft_GteOperator, + AstNotEqualsOperatorNodeInputLeft_Llm, + AstNotEqualsOperatorNodeInputLeft_LtOperator, + AstNotEqualsOperatorNodeInputLeft_LteOperator, + AstNotEqualsOperatorNodeInputLeft_NeqOperator, + AstNotEqualsOperatorNodeInputLeft_NumberLiteral, + AstNotEqualsOperatorNodeInputLeft_OrOperator, + AstNotEqualsOperatorNodeInputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py new file mode 100644 index 00000000..3bf92b15 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeInputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeInputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeInputRight = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeInputRight_AndOperator, + AstNotEqualsOperatorNodeInputRight_BooleanLiteral, + AstNotEqualsOperatorNodeInputRight_DynamicVariable, + AstNotEqualsOperatorNodeInputRight_EqOperator, + AstNotEqualsOperatorNodeInputRight_GtOperator, + AstNotEqualsOperatorNodeInputRight_GteOperator, + AstNotEqualsOperatorNodeInputRight_Llm, + AstNotEqualsOperatorNodeInputRight_LtOperator, + AstNotEqualsOperatorNodeInputRight_LteOperator, + AstNotEqualsOperatorNodeInputRight_NeqOperator, + AstNotEqualsOperatorNodeInputRight_NumberLiteral, + AstNotEqualsOperatorNodeInputRight_OrOperator, + AstNotEqualsOperatorNodeInputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeInputRight_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeInputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_left.py deleted file mode 100644 index fce535f4..00000000 --- a/src/elevenlabs/types/ast_not_equals_operator_node_left.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstNotEqualsOperatorNodeLeft_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeLeft_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstNotEqualsOperatorNodeLeft_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstNotEqualsOperatorNodeLeft = typing_extensions.Annotated[ - typing.Union[ - AstNotEqualsOperatorNodeLeft_AndOperator, - AstNotEqualsOperatorNodeLeft_BooleanLiteral, - AstNotEqualsOperatorNodeLeft_DynamicVariable, - AstNotEqualsOperatorNodeLeft_EqOperator, - AstNotEqualsOperatorNodeLeft_GtOperator, - AstNotEqualsOperatorNodeLeft_GteOperator, - AstNotEqualsOperatorNodeLeft_Llm, - AstNotEqualsOperatorNodeLeft_LtOperator, - AstNotEqualsOperatorNodeLeft_LteOperator, - AstNotEqualsOperatorNodeLeft_NeqOperator, - AstNotEqualsOperatorNodeLeft_NumberLiteral, - AstNotEqualsOperatorNodeLeft_OrOperator, - AstNotEqualsOperatorNodeLeft_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstNotEqualsOperatorNodeLeft_AndOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_EqOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_GtOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_GteOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_LtOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_LteOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_NeqOperator) -update_forward_refs(AstNotEqualsOperatorNodeLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output.py b/src/elevenlabs/types/ast_not_equals_operator_node_output.py new file mode 100644 index 00000000..235bc762 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNotEqualsOperatorNodeOutput(UncheckedBaseModel): + left: "AstNotEqualsOperatorNodeOutputLeft" = pydantic.Field() + """ + Left operand of the binary operator. + """ + + right: "AstNotEqualsOperatorNodeOutputRight" = pydantic.Field() + """ + Right operand of the binary operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py new file mode 100644 index 00000000..845d74e3 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeOutputLeft_AndOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_DynamicVariable(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_EqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_GtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_GteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_Llm(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_LtOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_LteOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_NeqOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_NumberLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputLeft_OrOperator(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): + """ + Left operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeOutputLeft = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeOutputLeft_AndOperator, + AstNotEqualsOperatorNodeOutputLeft_BooleanLiteral, + AstNotEqualsOperatorNodeOutputLeft_DynamicVariable, + AstNotEqualsOperatorNodeOutputLeft_EqOperator, + AstNotEqualsOperatorNodeOutputLeft_GtOperator, + AstNotEqualsOperatorNodeOutputLeft_GteOperator, + AstNotEqualsOperatorNodeOutputLeft_Llm, + AstNotEqualsOperatorNodeOutputLeft_LtOperator, + AstNotEqualsOperatorNodeOutputLeft_LteOperator, + AstNotEqualsOperatorNodeOutputLeft_NeqOperator, + AstNotEqualsOperatorNodeOutputLeft_NumberLiteral, + AstNotEqualsOperatorNodeOutputLeft_OrOperator, + AstNotEqualsOperatorNodeOutputLeft_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py new file mode 100644 index 00000000..e3005fb2 --- /dev/null +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py @@ -0,0 +1,302 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstNotEqualsOperatorNodeOutputRight_AndOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_BooleanLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_DynamicVariable(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_EqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_GtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_GteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_Llm(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_LtOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_LteOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_NeqOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_NumberLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstNotEqualsOperatorNodeOutputRight_OrOperator(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstNotEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): + """ + Right operand of the binary operator. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstNotEqualsOperatorNodeOutputRight = typing_extensions.Annotated[ + typing.Union[ + AstNotEqualsOperatorNodeOutputRight_AndOperator, + AstNotEqualsOperatorNodeOutputRight_BooleanLiteral, + AstNotEqualsOperatorNodeOutputRight_DynamicVariable, + AstNotEqualsOperatorNodeOutputRight_EqOperator, + AstNotEqualsOperatorNodeOutputRight_GtOperator, + AstNotEqualsOperatorNodeOutputRight_GteOperator, + AstNotEqualsOperatorNodeOutputRight_Llm, + AstNotEqualsOperatorNodeOutputRight_LtOperator, + AstNotEqualsOperatorNodeOutputRight_LteOperator, + AstNotEqualsOperatorNodeOutputRight_NeqOperator, + AstNotEqualsOperatorNodeOutputRight_NumberLiteral, + AstNotEqualsOperatorNodeOutputRight_OrOperator, + AstNotEqualsOperatorNodeOutputRight_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_AndOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_EqOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_GtOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_GteOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_LtOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_LteOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_NeqOperator) +update_forward_refs(AstNotEqualsOperatorNodeOutputRight_OrOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_right.py deleted file mode 100644 index 6b448a15..00000000 --- a/src/elevenlabs/types/ast_not_equals_operator_node_right.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstNotEqualsOperatorNodeRight_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstNotEqualsOperatorNodeRight_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstNotEqualsOperatorNodeRight_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstNotEqualsOperatorNodeRight = typing_extensions.Annotated[ - typing.Union[ - AstNotEqualsOperatorNodeRight_AndOperator, - AstNotEqualsOperatorNodeRight_BooleanLiteral, - AstNotEqualsOperatorNodeRight_DynamicVariable, - AstNotEqualsOperatorNodeRight_EqOperator, - AstNotEqualsOperatorNodeRight_GtOperator, - AstNotEqualsOperatorNodeRight_GteOperator, - AstNotEqualsOperatorNodeRight_Llm, - AstNotEqualsOperatorNodeRight_LtOperator, - AstNotEqualsOperatorNodeRight_LteOperator, - AstNotEqualsOperatorNodeRight_NeqOperator, - AstNotEqualsOperatorNodeRight_NumberLiteral, - AstNotEqualsOperatorNodeRight_OrOperator, - AstNotEqualsOperatorNodeRight_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstNotEqualsOperatorNodeRight_AndOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_EqOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_GtOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_GteOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_LtOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_LteOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_NeqOperator) -update_forward_refs(AstNotEqualsOperatorNodeRight_OrOperator) diff --git a/src/elevenlabs/types/ast_number_node_input.py b/src/elevenlabs/types/ast_number_node_input.py new file mode 100644 index 00000000..33705361 --- /dev/null +++ b/src/elevenlabs/types/ast_number_node_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNumberNodeInput(UncheckedBaseModel): + value: float = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_number_node_output.py b/src/elevenlabs/types/ast_number_node_output.py new file mode 100644 index 00000000..e2543f2d --- /dev/null +++ b/src/elevenlabs/types/ast_number_node_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstNumberNodeOutput(UncheckedBaseModel): + value: float = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_or_operator_node.py b/src/elevenlabs/types/ast_or_operator_node.py deleted file mode 100644 index 80423e28..00000000 --- a/src/elevenlabs/types/ast_or_operator_node.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel - - -class AstOrOperatorNode(UncheckedBaseModel): - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - -update_forward_refs(AstOrOperatorNode) diff --git a/src/elevenlabs/types/ast_or_operator_node_children_item.py b/src/elevenlabs/types/ast_or_operator_node_children_item.py deleted file mode 100644 index b4fe2386..00000000 --- a/src/elevenlabs/types/ast_or_operator_node_children_item.py +++ /dev/null @@ -1,250 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AstOrOperatorNodeChildrenItem_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class AstOrOperatorNodeChildrenItem_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - - -class AstOrOperatorNodeChildrenItem_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -AstOrOperatorNodeChildrenItem = typing_extensions.Annotated[ - typing.Union[ - AstOrOperatorNodeChildrenItem_AndOperator, - AstOrOperatorNodeChildrenItem_BooleanLiteral, - AstOrOperatorNodeChildrenItem_DynamicVariable, - AstOrOperatorNodeChildrenItem_EqOperator, - AstOrOperatorNodeChildrenItem_GtOperator, - AstOrOperatorNodeChildrenItem_GteOperator, - AstOrOperatorNodeChildrenItem_Llm, - AstOrOperatorNodeChildrenItem_LtOperator, - AstOrOperatorNodeChildrenItem_LteOperator, - AstOrOperatorNodeChildrenItem_NeqOperator, - AstOrOperatorNodeChildrenItem_NumberLiteral, - AstOrOperatorNodeChildrenItem_OrOperator, - AstOrOperatorNodeChildrenItem_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 - -update_forward_refs(AstOrOperatorNodeChildrenItem_AndOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_EqOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_GtOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_GteOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_LtOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_LteOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_NeqOperator) -update_forward_refs(AstOrOperatorNodeChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_or_operator_node_input.py b/src/elevenlabs/types/ast_or_operator_node_input.py new file mode 100644 index 00000000..40ff4759 --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node_input.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstOrOperatorNodeInput(UncheckedBaseModel): + children: typing.List["AstOrOperatorNodeInputChildrenItem"] = pydantic.Field() + """ + Child nodes of the logical operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_or_operator_node_input_children_item.py b/src/elevenlabs/types/ast_or_operator_node_input_children_item.py new file mode 100644 index 00000000..efa1c4e1 --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node_input_children_item.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstOrOperatorNodeInputChildrenItem_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeInputChildrenItem_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class AstOrOperatorNodeInputChildrenItem_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstOrOperatorNodeInputChildrenItem = typing_extensions.Annotated[ + typing.Union[ + AstOrOperatorNodeInputChildrenItem_AndOperator, + AstOrOperatorNodeInputChildrenItem_BooleanLiteral, + AstOrOperatorNodeInputChildrenItem_DynamicVariable, + AstOrOperatorNodeInputChildrenItem_EqOperator, + AstOrOperatorNodeInputChildrenItem_GtOperator, + AstOrOperatorNodeInputChildrenItem_GteOperator, + AstOrOperatorNodeInputChildrenItem_Llm, + AstOrOperatorNodeInputChildrenItem_LtOperator, + AstOrOperatorNodeInputChildrenItem_LteOperator, + AstOrOperatorNodeInputChildrenItem_NeqOperator, + AstOrOperatorNodeInputChildrenItem_NumberLiteral, + AstOrOperatorNodeInputChildrenItem_OrOperator, + AstOrOperatorNodeInputChildrenItem_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNodeInputChildrenItem_AndOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_EqOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_GtOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_GteOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_LtOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_LteOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_NeqOperator) +update_forward_refs(AstOrOperatorNodeInputChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_or_operator_node_output.py b/src/elevenlabs/types/ast_or_operator_node_output.py new file mode 100644 index 00000000..f1d2eeda --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node_output.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstOrOperatorNodeOutput(UncheckedBaseModel): + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] = pydantic.Field() + """ + Child nodes of the logical operator. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_or_operator_node_output_children_item.py b/src/elevenlabs/types/ast_or_operator_node_output_children_item.py new file mode 100644 index 00000000..70c671c8 --- /dev/null +++ b/src/elevenlabs/types/ast_or_operator_node_output_children_item.py @@ -0,0 +1,250 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AstOrOperatorNodeOutputChildrenItem_AndOperator(UncheckedBaseModel): + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_BooleanLiteral(UncheckedBaseModel): + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_DynamicVariable(UncheckedBaseModel): + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_EqOperator(UncheckedBaseModel): + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_GtOperator(UncheckedBaseModel): + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_GteOperator(UncheckedBaseModel): + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_LtOperator(UncheckedBaseModel): + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_LteOperator(UncheckedBaseModel): + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_NeqOperator(UncheckedBaseModel): + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_NumberLiteral(UncheckedBaseModel): + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AstOrOperatorNodeOutputChildrenItem_OrOperator(UncheckedBaseModel): + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class AstOrOperatorNodeOutputChildrenItem_StringLiteral(UncheckedBaseModel): + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AstOrOperatorNodeOutputChildrenItem = typing_extensions.Annotated[ + typing.Union[ + AstOrOperatorNodeOutputChildrenItem_AndOperator, + AstOrOperatorNodeOutputChildrenItem_BooleanLiteral, + AstOrOperatorNodeOutputChildrenItem_DynamicVariable, + AstOrOperatorNodeOutputChildrenItem_EqOperator, + AstOrOperatorNodeOutputChildrenItem_GtOperator, + AstOrOperatorNodeOutputChildrenItem_GteOperator, + AstOrOperatorNodeOutputChildrenItem_Llm, + AstOrOperatorNodeOutputChildrenItem_LtOperator, + AstOrOperatorNodeOutputChildrenItem_LteOperator, + AstOrOperatorNodeOutputChildrenItem_NeqOperator, + AstOrOperatorNodeOutputChildrenItem_NumberLiteral, + AstOrOperatorNodeOutputChildrenItem_OrOperator, + AstOrOperatorNodeOutputChildrenItem_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_AndOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_EqOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_GtOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_GteOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_LtOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_LteOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_NeqOperator) +update_forward_refs(AstOrOperatorNodeOutputChildrenItem_OrOperator) diff --git a/src/elevenlabs/types/ast_string_node_input.py b/src/elevenlabs/types/ast_string_node_input.py new file mode 100644 index 00000000..3b709b5a --- /dev/null +++ b/src/elevenlabs/types/ast_string_node_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstStringNodeInput(UncheckedBaseModel): + value: str = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_string_node_output.py b/src/elevenlabs/types/ast_string_node_output.py new file mode 100644 index 00000000..2e061444 --- /dev/null +++ b/src/elevenlabs/types/ast_string_node_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstStringNodeOutput(UncheckedBaseModel): + value: str = pydantic.Field() + """ + Value of this literal. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/astllm_node_input.py b/src/elevenlabs/types/astllm_node_input.py new file mode 100644 index 00000000..1ccbf108 --- /dev/null +++ b/src/elevenlabs/types/astllm_node_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstllmNodeInput(UncheckedBaseModel): + prompt: str = pydantic.Field() + """ + The prompt to evaluate to a boolean value. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/astllm_node_output.py b/src/elevenlabs/types/astllm_node_output.py new file mode 100644 index 00000000..5c024162 --- /dev/null +++ b/src/elevenlabs/types/astllm_node_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AstllmNodeOutput(UncheckedBaseModel): + prompt: str = pydantic.Field() + """ + The prompt to evaluate to a boolean value. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/async_conversation_metadata.py b/src/elevenlabs/types/async_conversation_metadata.py new file mode 100644 index 00000000..5ccc0ef5 --- /dev/null +++ b/src/elevenlabs/types/async_conversation_metadata.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .async_conversation_metadata_delivery_status import AsyncConversationMetadataDeliveryStatus + + +class AsyncConversationMetadata(UncheckedBaseModel): + """ + Metadata for async conversation delivery (Zendesk, Slack, etc.). + """ + + delivery_status: AsyncConversationMetadataDeliveryStatus + delivery_timestamp: int + delivery_error: typing.Optional[str] = None + external_system: str + external_id: str + retry_count: typing.Optional[int] = None + last_retry_timestamp: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/async_conversation_metadata_delivery_status.py b/src/elevenlabs/types/async_conversation_metadata_delivery_status.py new file mode 100644 index 00000000..da452811 --- /dev/null +++ b/src/elevenlabs/types/async_conversation_metadata_delivery_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AsyncConversationMetadataDeliveryStatus = typing.Union[typing.Literal["pending", "success", "failed"], typing.Any] diff --git a/src/elevenlabs/types/astllm_node.py b/src/elevenlabs/types/backup_llm_default.py similarity index 90% rename from src/elevenlabs/types/astllm_node.py rename to src/elevenlabs/types/backup_llm_default.py index 2294df6b..34b6d5ad 100644 --- a/src/elevenlabs/types/astllm_node.py +++ b/src/elevenlabs/types/backup_llm_default.py @@ -7,9 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class AstllmNode(UncheckedBaseModel): - prompt: str - +class BackupLlmDefault(UncheckedBaseModel): if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/ast_string_node.py b/src/elevenlabs/types/backup_llm_disabled.py similarity index 89% rename from src/elevenlabs/types/ast_string_node.py rename to src/elevenlabs/types/backup_llm_disabled.py index 06692840..01e07355 100644 --- a/src/elevenlabs/types/ast_string_node.py +++ b/src/elevenlabs/types/backup_llm_disabled.py @@ -7,9 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class AstStringNode(UncheckedBaseModel): - value: str - +class BackupLlmDisabled(UncheckedBaseModel): if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/backup_llm_override.py b/src/elevenlabs/types/backup_llm_override.py new file mode 100644 index 00000000..ecf36c7a --- /dev/null +++ b/src/elevenlabs/types/backup_llm_override.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .llm import Llm + + +class BackupLlmOverride(UncheckedBaseModel): + order: typing.List[Llm] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/built_in_tools_workflow_override.py b/src/elevenlabs/types/built_in_tools_workflow_override_input.py similarity index 96% rename from src/elevenlabs/types/built_in_tools_workflow_override.py rename to src/elevenlabs/types/built_in_tools_workflow_override_input.py index d113ff54..0b458f74 100644 --- a/src/elevenlabs/types/built_in_tools_workflow_override.py +++ b/src/elevenlabs/types/built_in_tools_workflow_override_input.py @@ -8,7 +8,7 @@ from .system_tool_config_input import SystemToolConfigInput -class BuiltInToolsWorkflowOverride(UncheckedBaseModel): +class BuiltInToolsWorkflowOverrideInput(UncheckedBaseModel): end_call: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) """ The end call tool diff --git a/src/elevenlabs/types/built_in_tools_workflow_override_output.py b/src/elevenlabs/types/built_in_tools_workflow_override_output.py new file mode 100644 index 00000000..b1b13389 --- /dev/null +++ b/src/elevenlabs/types/built_in_tools_workflow_override_output.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .system_tool_config_output import SystemToolConfigOutput + + +class BuiltInToolsWorkflowOverrideOutput(UncheckedBaseModel): + end_call: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The end call tool + """ + + language_detection: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The language detection tool + """ + + transfer_to_agent: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The transfer to agent tool + """ + + transfer_to_number: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The transfer to number tool + """ + + skip_turn: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The skip turn tool + """ + + play_keypad_touch_tone: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The play DTMF tool + """ + + voicemail_detection: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None) + """ + The voicemail detection tool + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/conv_ai_webhooks.py b/src/elevenlabs/types/conv_ai_webhooks.py index 51acad3b..1bb5110a 100644 --- a/src/elevenlabs/types/conv_ai_webhooks.py +++ b/src/elevenlabs/types/conv_ai_webhooks.py @@ -5,13 +5,19 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .webhook_event_type import WebhookEventType class ConvAiWebhooks(UncheckedBaseModel): post_call_webhook_id: typing.Optional[str] = None + events: typing.Optional[typing.List[WebhookEventType]] = pydantic.Field(default=None) + """ + List of event types to send via webhook. Options: transcript, audio, call_initiation_failure. + """ + send_audio: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to send audio data with post-call webhooks for ConvAI conversations + DEPRECATED: Use 'events' field instead. Whether to send audio data with post-call webhooks for ConvAI conversations """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/conversation_config_client_override_input.py b/src/elevenlabs/types/conversation_config_client_override_input.py index da261002..c8eaeeec 100644 --- a/src/elevenlabs/types/conversation_config_client_override_input.py +++ b/src/elevenlabs/types/conversation_config_client_override_input.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .agent_config_override import AgentConfigOverride +from .agent_config_override_input import AgentConfigOverrideInput from .conversation_config_override import ConversationConfigOverride from .tts_conversational_config_override import TtsConversationalConfigOverride @@ -21,7 +21,7 @@ class ConversationConfigClientOverrideInput(UncheckedBaseModel): Configuration for conversational events """ - agent: typing.Optional[AgentConfigOverride] = pydantic.Field(default=None) + agent: typing.Optional[AgentConfigOverrideInput] = pydantic.Field(default=None) """ Agent specific configuration """ diff --git a/src/elevenlabs/types/conversation_config_client_override_output.py b/src/elevenlabs/types/conversation_config_client_override_output.py index 18dc0389..ce918274 100644 --- a/src/elevenlabs/types/conversation_config_client_override_output.py +++ b/src/elevenlabs/types/conversation_config_client_override_output.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .agent_config_override import AgentConfigOverride +from .agent_config_override_output import AgentConfigOverrideOutput from .conversation_config_override import ConversationConfigOverride from .tts_conversational_config_override import TtsConversationalConfigOverride @@ -21,7 +21,7 @@ class ConversationConfigClientOverrideOutput(UncheckedBaseModel): Configuration for conversational events """ - agent: typing.Optional[AgentConfigOverride] = pydantic.Field(default=None) + agent: typing.Optional[AgentConfigOverrideOutput] = pydantic.Field(default=None) """ Agent specific configuration """ diff --git a/src/elevenlabs/types/conversation_history_metadata_common_model.py b/src/elevenlabs/types/conversation_history_metadata_common_model.py index fd720376..ecfa6f0d 100644 --- a/src/elevenlabs/types/conversation_history_metadata_common_model.py +++ b/src/elevenlabs/types/conversation_history_metadata_common_model.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .async_conversation_metadata import AsyncConversationMetadata from .authorization_method import AuthorizationMethod from .conversation_charging_common_model import ConversationChargingCommonModel from .conversation_deletion_settings import ConversationDeletionSettings @@ -12,6 +13,9 @@ from .conversation_history_eleven_assistant_common_model import ConversationHistoryElevenAssistantCommonModel from .conversation_history_error_common_model import ConversationHistoryErrorCommonModel from .conversation_history_feedback_common_model import ConversationHistoryFeedbackCommonModel +from .conversation_history_metadata_common_model_initiation_trigger import ( + ConversationHistoryMetadataCommonModelInitiationTrigger, +) from .conversation_history_metadata_common_model_phone_call import ConversationHistoryMetadataCommonModelPhoneCall from .conversation_history_rag_usage_common_model import ConversationHistoryRagUsageCommonModel from .conversation_initiation_source import ConversationInitiationSource @@ -40,6 +44,8 @@ class ConversationHistoryMetadataCommonModel(UncheckedBaseModel): conversation_initiation_source: typing.Optional[ConversationInitiationSource] = None conversation_initiation_source_version: typing.Optional[str] = None timezone: typing.Optional[str] = None + initiation_trigger: typing.Optional[ConversationHistoryMetadataCommonModelInitiationTrigger] = None + async_metadata: typing.Optional[AsyncConversationMetadata] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/conversation_history_metadata_common_model_initiation_trigger.py b/src/elevenlabs/types/conversation_history_metadata_common_model_initiation_trigger.py new file mode 100644 index 00000000..150db45b --- /dev/null +++ b/src/elevenlabs/types/conversation_history_metadata_common_model_initiation_trigger.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class ConversationHistoryMetadataCommonModelInitiationTrigger_Default(UncheckedBaseModel): + trigger_type: typing.Literal["default"] = "default" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk(UncheckedBaseModel): + trigger_type: typing.Literal["zendesk"] = "zendesk" + ticket_id: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationHistoryMetadataCommonModelInitiationTrigger = typing_extensions.Annotated[ + typing.Union[ + ConversationHistoryMetadataCommonModelInitiationTrigger_Default, + ConversationHistoryMetadataCommonModelInitiationTrigger_Zendesk, + ], + UnionMetadata(discriminant="trigger_type"), +] diff --git a/src/elevenlabs/types/conversation_initiation_source.py b/src/elevenlabs/types/conversation_initiation_source.py index c628942c..d44015d8 100644 --- a/src/elevenlabs/types/conversation_initiation_source.py +++ b/src/elevenlabs/types/conversation_initiation_source.py @@ -16,6 +16,7 @@ "twilio", "genesys", "swift_sdk", + "whatsapp", ], typing.Any, ] diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py similarity index 83% rename from src/elevenlabs/types/conversational_config_api_model_workflow_override.py rename to src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py index a0802045..db10edb1 100644 --- a/src/elevenlabs/types/conversational_config_api_model_workflow_override.py +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py @@ -7,16 +7,16 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .agent_config_api_model_workflow_override import AgentConfigApiModelWorkflowOverride +from .agent_config_api_model_workflow_override_input import AgentConfigApiModelWorkflowOverrideInput from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride from .conversation_config_workflow_override import ConversationConfigWorkflowOverride from .language_preset_input import LanguagePresetInput -from .tts_conversational_config_workflow_override import TtsConversationalConfigWorkflowOverride +from .tts_conversational_config_workflow_override_input import TtsConversationalConfigWorkflowOverrideInput from .turn_config_workflow_override import TurnConfigWorkflowOverride from .vad_config_workflow_override import VadConfigWorkflowOverride -class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): +class ConversationalConfigApiModelWorkflowOverrideInput(UncheckedBaseModel): asr: typing.Optional[AsrConversationalConfigWorkflowOverride] = pydantic.Field(default=None) """ Configuration for conversational transcription @@ -27,7 +27,7 @@ class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): Configuration for turn detection """ - tts: typing.Optional[TtsConversationalConfigWorkflowOverride] = pydantic.Field(default=None) + tts: typing.Optional[TtsConversationalConfigWorkflowOverrideInput] = pydantic.Field(default=None) """ Configuration for conversational text to speech """ @@ -49,7 +49,7 @@ class ConversationalConfigApiModelWorkflowOverride(UncheckedBaseModel): Configuration for voice activity detection """ - agent: typing.Optional[AgentConfigApiModelWorkflowOverride] = pydantic.Field(default=None) + agent: typing.Optional[AgentConfigApiModelWorkflowOverrideInput] = pydantic.Field(default=None) """ Agent specific configuration """ @@ -67,4 +67,4 @@ class Config: from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 -update_forward_refs(ConversationalConfigApiModelWorkflowOverride) +update_forward_refs(ConversationalConfigApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py new file mode 100644 index 00000000..b8b8addd --- /dev/null +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_config_api_model_workflow_override_output import AgentConfigApiModelWorkflowOverrideOutput +from .asr_conversational_config_workflow_override import AsrConversationalConfigWorkflowOverride +from .conversation_config_workflow_override import ConversationConfigWorkflowOverride +from .language_preset_output import LanguagePresetOutput +from .tts_conversational_config_workflow_override_output import TtsConversationalConfigWorkflowOverrideOutput +from .turn_config_workflow_override import TurnConfigWorkflowOverride +from .vad_config_workflow_override import VadConfigWorkflowOverride + + +class ConversationalConfigApiModelWorkflowOverrideOutput(UncheckedBaseModel): + asr: typing.Optional[AsrConversationalConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for conversational transcription + """ + + turn: typing.Optional[TurnConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for turn detection + """ + + tts: typing.Optional[TtsConversationalConfigWorkflowOverrideOutput] = pydantic.Field(default=None) + """ + Configuration for conversational text to speech + """ + + conversation: typing.Optional[ConversationConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for conversational events + """ + + language_presets: typing.Optional[typing.Dict[str, typing.Optional[LanguagePresetOutput]]] = pydantic.Field( + default=None + ) + """ + Language presets for conversations + """ + + vad: typing.Optional[VadConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for voice activity detection + """ + + agent: typing.Optional[AgentConfigApiModelWorkflowOverrideOutput] = pydantic.Field(default=None) + """ + Agent specific configuration + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(ConversationalConfigApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/create_agent_response_model.py b/src/elevenlabs/types/create_agent_response_model.py index 3c66211d..0bb4b437 100644 --- a/src/elevenlabs/types/create_agent_response_model.py +++ b/src/elevenlabs/types/create_agent_response_model.py @@ -13,6 +13,16 @@ class CreateAgentResponseModel(UncheckedBaseModel): ID of the created agent """ + main_branch_id: typing.Optional[str] = pydantic.Field(default=None) + """ + INTERNAL + """ + + initial_version_id: typing.Optional[str] = pydantic.Field(default=None) + """ + INTERNAL + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/default_conversation_initiation_trigger.py b/src/elevenlabs/types/default_conversation_initiation_trigger.py new file mode 100644 index 00000000..23177e36 --- /dev/null +++ b/src/elevenlabs/types/default_conversation_initiation_trigger.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class DefaultConversationInitiationTrigger(UncheckedBaseModel): + """ + Default trigger for standard conversation initiation. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/extended_subscription_response_model_currency.py b/src/elevenlabs/types/extended_subscription_response_model_currency.py index 3f566794..54d3b077 100644 --- a/src/elevenlabs/types/extended_subscription_response_model_currency.py +++ b/src/elevenlabs/types/extended_subscription_response_model_currency.py @@ -2,4 +2,4 @@ import typing -ExtendedSubscriptionResponseModelCurrency = typing.Union[typing.Literal["usd", "eur"], typing.Any] +ExtendedSubscriptionResponseModelCurrency = typing.Union[typing.Literal["usd", "eur", "inr"], typing.Any] diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py index c8be5bba..e42ab210 100644 --- a/src/elevenlabs/types/get_agent_response_model.py +++ b/src/elevenlabs/types/get_agent_response_model.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .agent_metadata_response_model import AgentMetadataResponseModel from .agent_platform_settings_response_model import AgentPlatformSettingsResponseModel +from .agent_workflow_response_model import AgentWorkflowResponseModel from .conversational_config import ConversationalConfig from .get_agent_response_model_phone_numbers_item import GetAgentResponseModelPhoneNumbersItem from .resource_access_info import ResourceAccessInfo @@ -45,7 +46,11 @@ class GetAgentResponseModel(UncheckedBaseModel): The phone numbers of the agent """ - workflow: typing.Optional[typing.Optional[typing.Any]] = None + workflow: typing.Optional[AgentWorkflowResponseModel] = pydantic.Field(default=None) + """ + The workflow of the agent + """ + access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None) """ The access information of the agent for the user @@ -56,6 +61,11 @@ class GetAgentResponseModel(UncheckedBaseModel): Agent tags used to categorize the agent """ + version_id: typing.Optional[str] = pydantic.Field(default=None) + """ + INTERNAL + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -68,5 +78,13 @@ class Config: from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 update_forward_refs(GetAgentResponseModel) diff --git a/src/elevenlabs/types/normalized_alignment.py b/src/elevenlabs/types/normalized_alignment.py index 0ff62b8e..29913180 100644 --- a/src/elevenlabs/types/normalized_alignment.py +++ b/src/elevenlabs/types/normalized_alignment.py @@ -24,8 +24,8 @@ class NormalizedAlignment(UncheckedBaseModel): full audio response. """ - chars_durations_ms: typing_extensions.Annotated[ - typing.Optional[typing.List[int]], FieldMetadata(alias="charsDurationsMs") + char_durations_ms: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], FieldMetadata(alias="charDurationsMs") ] = pydantic.Field(default=None) """ A list of durations (in milliseconds) for each character in the normalized text as it @@ -38,7 +38,7 @@ class NormalizedAlignment(UncheckedBaseModel): """ A list of characters in the normalized text sequence. For instance, the first character is 'H'. Note that this list may contain spaces, punctuation, and other special characters. - The length of this list should be the same as the lengths of `charStartTimesMs` and `charsDurationsMs`. + The length of this list should be the same as the lengths of `charStartTimesMs` and `charDurationsMs`. """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/position.py b/src/elevenlabs/types/position_input.py similarity index 93% rename from src/elevenlabs/types/position.py rename to src/elevenlabs/types/position_input.py index d1b131e9..9e9b1994 100644 --- a/src/elevenlabs/types/position.py +++ b/src/elevenlabs/types/position_input.py @@ -7,7 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class Position(UncheckedBaseModel): +class PositionInput(UncheckedBaseModel): x: typing.Optional[float] = None y: typing.Optional[float] = None diff --git a/src/elevenlabs/types/ast_dynamic_variable_node.py b/src/elevenlabs/types/position_output.py similarity index 88% rename from src/elevenlabs/types/ast_dynamic_variable_node.py rename to src/elevenlabs/types/position_output.py index 83e2783b..dfa95fec 100644 --- a/src/elevenlabs/types/ast_dynamic_variable_node.py +++ b/src/elevenlabs/types/position_output.py @@ -7,8 +7,9 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class AstDynamicVariableNode(UncheckedBaseModel): - name: str +class PositionOutput(UncheckedBaseModel): + x: float + y: float if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/project_extended_response.py b/src/elevenlabs/types/project_extended_response.py index 8340348a..df64419b 100644 --- a/src/elevenlabs/types/project_extended_response.py +++ b/src/elevenlabs/types/project_extended_response.py @@ -10,6 +10,7 @@ from .project_creation_meta_response_model import ProjectCreationMetaResponseModel from .project_extended_response_model_access_level import ProjectExtendedResponseModelAccessLevel from .project_extended_response_model_apply_text_normalization import ProjectExtendedResponseModelApplyTextNormalization +from .project_extended_response_model_aspect_ratio import ProjectExtendedResponseModelAspectRatio from .project_extended_response_model_fiction import ProjectExtendedResponseModelFiction from .project_extended_response_model_quality_preset import ProjectExtendedResponseModelQualityPreset from .project_extended_response_model_source_type import ProjectExtendedResponseModelSourceType @@ -175,6 +176,11 @@ class ProjectExtendedResponse(UncheckedBaseModel): The public share ID of the project. """ + aspect_ratio: typing.Optional[ProjectExtendedResponseModelAspectRatio] = pydantic.Field(default=None) + """ + The aspect ratio of the project. + """ + quality_preset: ProjectExtendedResponseModelQualityPreset = pydantic.Field() """ The quality preset level of the project. diff --git a/src/elevenlabs/types/project_extended_response_model_aspect_ratio.py b/src/elevenlabs/types/project_extended_response_model_aspect_ratio.py new file mode 100644 index 00000000..66ca1b8c --- /dev/null +++ b/src/elevenlabs/types/project_extended_response_model_aspect_ratio.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProjectExtendedResponseModelAspectRatio = typing.Union[typing.Literal["16:9", "9:16", "4:5", "1:1"], typing.Any] diff --git a/src/elevenlabs/types/project_response.py b/src/elevenlabs/types/project_response.py index 93def094..05bccb35 100644 --- a/src/elevenlabs/types/project_response.py +++ b/src/elevenlabs/types/project_response.py @@ -8,6 +8,7 @@ from .caption_style_model import CaptionStyleModel from .project_creation_meta_response_model import ProjectCreationMetaResponseModel from .project_response_model_access_level import ProjectResponseModelAccessLevel +from .project_response_model_aspect_ratio import ProjectResponseModelAspectRatio from .project_response_model_fiction import ProjectResponseModelFiction from .project_response_model_source_type import ProjectResponseModelSourceType from .project_response_model_target_audience import ProjectResponseModelTargetAudience @@ -170,6 +171,11 @@ class ProjectResponse(UncheckedBaseModel): The public share ID of the project. """ + aspect_ratio: typing.Optional[ProjectResponseModelAspectRatio] = pydantic.Field(default=None) + """ + The aspect ratio of the project. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/project_response_model_aspect_ratio.py b/src/elevenlabs/types/project_response_model_aspect_ratio.py new file mode 100644 index 00000000..ea8ac812 --- /dev/null +++ b/src/elevenlabs/types/project_response_model_aspect_ratio.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProjectResponseModelAspectRatio = typing.Union[typing.Literal["16:9", "9:16", "4:5", "1:1"], typing.Any] diff --git a/src/elevenlabs/types/prompt_agent_api_model_input.py b/src/elevenlabs/types/prompt_agent_api_model_input.py index 11a482d5..4cababa7 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input.py @@ -12,6 +12,7 @@ from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm from .llm_reasoning_effort import LlmReasoningEffort +from .prompt_agent_api_model_input_backup_llm_config import PromptAgentApiModelInputBackupLlmConfig from .prompt_agent_api_model_input_tools_item import PromptAgentApiModelInputToolsItem from .rag_config import RagConfig @@ -32,6 +33,11 @@ class PromptAgentApiModelInput(UncheckedBaseModel): Reasoning effort of the model. Only available for some models. """ + thinking_budget: typing.Optional[int] = pydantic.Field(default=None) + """ + Max number of tokens used for thinking. Use 0 to turn off if supported by the model. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM @@ -87,6 +93,11 @@ class PromptAgentApiModelInput(UncheckedBaseModel): Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). """ + backup_llm_config: typing.Optional[PromptAgentApiModelInputBackupLlmConfig] = pydantic.Field(default=None) + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + tools: typing.Optional[typing.List[PromptAgentApiModelInputToolsItem]] = pydantic.Field(default=None) """ A list of tools that the agent can use over the course of the conversation, use tool_ids instead diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_backup_llm_config.py b/src/elevenlabs/types/prompt_agent_api_model_input_backup_llm_config.py new file mode 100644 index 00000000..d9c0625c --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_input_backup_llm_config.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .llm import Llm + + +class PromptAgentApiModelInputBackupLlmConfig_Default(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["default"] = "default" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelInputBackupLlmConfig_Disabled(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["disabled"] = "disabled" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelInputBackupLlmConfig_Override(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["override"] = "override" + order: typing.List[Llm] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PromptAgentApiModelInputBackupLlmConfig = typing_extensions.Annotated[ + typing.Union[ + PromptAgentApiModelInputBackupLlmConfig_Default, + PromptAgentApiModelInputBackupLlmConfig_Disabled, + PromptAgentApiModelInputBackupLlmConfig_Override, + ], + UnionMetadata(discriminant="preference"), +] diff --git a/src/elevenlabs/types/prompt_agent_api_model_output.py b/src/elevenlabs/types/prompt_agent_api_model_output.py index f5ce2836..3748253e 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output.py @@ -12,6 +12,7 @@ from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm from .llm_reasoning_effort import LlmReasoningEffort +from .prompt_agent_api_model_output_backup_llm_config import PromptAgentApiModelOutputBackupLlmConfig from .prompt_agent_api_model_output_tools_item import PromptAgentApiModelOutputToolsItem from .rag_config import RagConfig @@ -32,6 +33,11 @@ class PromptAgentApiModelOutput(UncheckedBaseModel): Reasoning effort of the model. Only available for some models. """ + thinking_budget: typing.Optional[int] = pydantic.Field(default=None) + """ + Max number of tokens used for thinking. Use 0 to turn off if supported by the model. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM @@ -87,6 +93,11 @@ class PromptAgentApiModelOutput(UncheckedBaseModel): Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). """ + backup_llm_config: typing.Optional[PromptAgentApiModelOutputBackupLlmConfig] = pydantic.Field(default=None) + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + tools: typing.Optional[typing.List[PromptAgentApiModelOutputToolsItem]] = pydantic.Field(default=None) """ A list of tools that the agent can use over the course of the conversation, use tool_ids instead diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_backup_llm_config.py b/src/elevenlabs/types/prompt_agent_api_model_output_backup_llm_config.py new file mode 100644 index 00000000..082788a1 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_output_backup_llm_config.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .llm import Llm + + +class PromptAgentApiModelOutputBackupLlmConfig_Default(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["default"] = "default" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelOutputBackupLlmConfig_Disabled(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["disabled"] = "disabled" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelOutputBackupLlmConfig_Override(UncheckedBaseModel): + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + preference: typing.Literal["override"] = "override" + order: typing.List[Llm] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PromptAgentApiModelOutputBackupLlmConfig = typing_extensions.Annotated[ + typing.Union[ + PromptAgentApiModelOutputBackupLlmConfig_Default, + PromptAgentApiModelOutputBackupLlmConfig_Disabled, + PromptAgentApiModelOutputBackupLlmConfig_Override, + ], + UnionMetadata(discriminant="preference"), +] diff --git a/src/elevenlabs/types/prompt_agent_api_model_override.py b/src/elevenlabs/types/prompt_agent_api_model_override.py index 7480f737..27d8bdfe 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_override.py +++ b/src/elevenlabs/types/prompt_agent_api_model_override.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .llm import Llm class PromptAgentApiModelOverride(UncheckedBaseModel): @@ -13,6 +14,11 @@ class PromptAgentApiModelOverride(UncheckedBaseModel): The prompt for the agent """ + llm: typing.Optional[Llm] = pydantic.Field(default=None) + """ + The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment + """ + native_mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ A list of Native MCP server ids to be used by the agent diff --git a/src/elevenlabs/types/prompt_agent_api_model_override_config.py b/src/elevenlabs/types/prompt_agent_api_model_override_config.py index 2d016cb1..28a1d705 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_override_config.py +++ b/src/elevenlabs/types/prompt_agent_api_model_override_config.py @@ -13,6 +13,11 @@ class PromptAgentApiModelOverrideConfig(UncheckedBaseModel): Whether to allow overriding the prompt field. """ + llm: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to allow overriding the llm field. + """ + native_mcp_server_ids: typing.Optional[bool] = pydantic.Field(default=None) """ Whether to allow overriding the native_mcp_server_ids field. diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py similarity index 77% rename from src/elevenlabs/types/prompt_agent_api_model_workflow_override.py rename to src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py index 02cf8107..8801645a 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py @@ -7,16 +7,19 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .built_in_tools_workflow_override import BuiltInToolsWorkflowOverride +from .built_in_tools_workflow_override_input import BuiltInToolsWorkflowOverrideInput from .custom_llm import CustomLlm from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm from .llm_reasoning_effort import LlmReasoningEffort -from .prompt_agent_api_model_workflow_override_tools_item import PromptAgentApiModelWorkflowOverrideToolsItem +from .prompt_agent_api_model_workflow_override_input_backup_llm_config import ( + PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig, +) +from .prompt_agent_api_model_workflow_override_input_tools_item import PromptAgentApiModelWorkflowOverrideInputToolsItem from .rag_config_workflow_override import RagConfigWorkflowOverride -class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): +class PromptAgentApiModelWorkflowOverrideInput(UncheckedBaseModel): prompt: typing.Optional[str] = pydantic.Field(default=None) """ The prompt for the agent @@ -32,6 +35,11 @@ class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): Reasoning effort of the model. Only available for some models. """ + thinking_budget: typing.Optional[int] = pydantic.Field(default=None) + """ + Max number of tokens used for thinking. Use 0 to turn off if supported by the model. + """ + temperature: typing.Optional[float] = pydantic.Field(default=None) """ The temperature for the LLM @@ -47,7 +55,7 @@ class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): A list of IDs of tools used by the agent """ - built_in_tools: typing.Optional[BuiltInToolsWorkflowOverride] = pydantic.Field(default=None) + built_in_tools: typing.Optional[BuiltInToolsWorkflowOverrideInput] = pydantic.Field(default=None) """ Built-in system tools to be used by the agent """ @@ -87,7 +95,16 @@ class PromptAgentApiModelWorkflowOverride(UncheckedBaseModel): Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). """ - tools: typing.Optional[typing.List[PromptAgentApiModelWorkflowOverrideToolsItem]] = pydantic.Field(default=None) + backup_llm_config: typing.Optional[PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig] = pydantic.Field( + default=None + ) + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + tools: typing.Optional[typing.List[PromptAgentApiModelWorkflowOverrideInputToolsItem]] = pydantic.Field( + default=None + ) """ A list of tools that the agent can use over the course of the conversation, use tool_ids instead """ @@ -105,4 +122,4 @@ class Config: from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 -update_forward_refs(PromptAgentApiModelWorkflowOverride) +update_forward_refs(PromptAgentApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_backup_llm_config.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_backup_llm_config.py new file mode 100644 index 00000000..fb589510 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_backup_llm_config.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .backup_llm_default import BackupLlmDefault +from .backup_llm_disabled import BackupLlmDisabled +from .backup_llm_override import BackupLlmOverride + +PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig = typing.Union[ + BackupLlmDefault, BackupLlmDisabled, BackupLlmOverride +] diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py similarity index 80% rename from src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py rename to src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py index bbbca393..ad9809fa 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py @@ -14,7 +14,7 @@ from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput -class PromptAgentApiModelWorkflowOverrideToolsItem_Client(UncheckedBaseModel): +class PromptAgentApiModelWorkflowOverrideInputToolsItem_Client(UncheckedBaseModel): """ The type of tool """ @@ -40,7 +40,7 @@ class Config: extra = pydantic.Extra.allow -class PromptAgentApiModelWorkflowOverrideToolsItem_Mcp(UncheckedBaseModel): +class PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp(UncheckedBaseModel): value: typing.Optional[typing.Any] = None type: typing.Literal["mcp"] = "mcp" @@ -53,7 +53,7 @@ class Config: smart_union = True -class PromptAgentApiModelWorkflowOverrideToolsItem_System(UncheckedBaseModel): +class PromptAgentApiModelWorkflowOverrideInputToolsItem_System(UncheckedBaseModel): """ The type of tool """ @@ -77,7 +77,7 @@ class Config: extra = pydantic.Extra.allow -class PromptAgentApiModelWorkflowOverrideToolsItem_Webhook(UncheckedBaseModel): +class PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook(UncheckedBaseModel): """ The type of tool """ @@ -105,14 +105,14 @@ class Config: from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 -PromptAgentApiModelWorkflowOverrideToolsItem = typing_extensions.Annotated[ +PromptAgentApiModelWorkflowOverrideInputToolsItem = typing_extensions.Annotated[ typing.Union[ - PromptAgentApiModelWorkflowOverrideToolsItem_Client, - PromptAgentApiModelWorkflowOverrideToolsItem_Mcp, - PromptAgentApiModelWorkflowOverrideToolsItem_System, - PromptAgentApiModelWorkflowOverrideToolsItem_Webhook, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideInputToolsItem_System, + PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook, ], UnionMetadata(discriminant="type"), ] -update_forward_refs(PromptAgentApiModelWorkflowOverrideToolsItem_Client) -update_forward_refs(PromptAgentApiModelWorkflowOverrideToolsItem_Webhook) +update_forward_refs(PromptAgentApiModelWorkflowOverrideInputToolsItem_Client) +update_forward_refs(PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py new file mode 100644 index 00000000..26b57988 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .built_in_tools_workflow_override_output import BuiltInToolsWorkflowOverrideOutput +from .custom_llm import CustomLlm +from .knowledge_base_locator import KnowledgeBaseLocator +from .llm import Llm +from .llm_reasoning_effort import LlmReasoningEffort +from .prompt_agent_api_model_workflow_override_output_backup_llm_config import ( + PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig, +) +from .prompt_agent_api_model_workflow_override_output_tools_item import ( + PromptAgentApiModelWorkflowOverrideOutputToolsItem, +) +from .rag_config_workflow_override import RagConfigWorkflowOverride + + +class PromptAgentApiModelWorkflowOverrideOutput(UncheckedBaseModel): + prompt: typing.Optional[str] = pydantic.Field(default=None) + """ + The prompt for the agent + """ + + llm: typing.Optional[Llm] = pydantic.Field(default=None) + """ + The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment + """ + + reasoning_effort: typing.Optional[LlmReasoningEffort] = pydantic.Field(default=None) + """ + Reasoning effort of the model. Only available for some models. + """ + + thinking_budget: typing.Optional[int] = pydantic.Field(default=None) + """ + Max number of tokens used for thinking. Use 0 to turn off if supported by the model. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + The temperature for the LLM + """ + + max_tokens: typing.Optional[int] = pydantic.Field(default=None) + """ + If greater than 0, maximum number of tokens the LLM can predict + """ + + tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of IDs of tools used by the agent + """ + + built_in_tools: typing.Optional[BuiltInToolsWorkflowOverrideOutput] = pydantic.Field(default=None) + """ + Built-in system tools to be used by the agent + """ + + mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of MCP server ids to be used by the agent + """ + + native_mcp_server_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of Native MCP server ids to be used by the agent + """ + + knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = pydantic.Field(default=None) + """ + A list of knowledge bases to be used by the agent + """ + + custom_llm: typing.Optional[CustomLlm] = pydantic.Field(default=None) + """ + Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM' + """ + + ignore_default_personality: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to remove the default personality lines from the system prompt + """ + + rag: typing.Optional[RagConfigWorkflowOverride] = pydantic.Field(default=None) + """ + Configuration for RAG + """ + + timezone: typing.Optional[str] = pydantic.Field(default=None) + """ + Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). + """ + + backup_llm_config: typing.Optional[PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig] = pydantic.Field( + default=None + ) + """ + Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. + """ + + tools: typing.Optional[typing.List[PromptAgentApiModelWorkflowOverrideOutputToolsItem]] = pydantic.Field( + default=None + ) + """ + A list of tools that the agent can use over the course of the conversation, use tool_ids instead + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(PromptAgentApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_backup_llm_config.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_backup_llm_config.py new file mode 100644 index 00000000..441e1d4f --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_backup_llm_config.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .backup_llm_default import BackupLlmDefault +from .backup_llm_disabled import BackupLlmDisabled +from .backup_llm_override import BackupLlmOverride + +PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig = typing.Union[ + BackupLlmDefault, BackupLlmDisabled, BackupLlmOverride +] diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py new file mode 100644 index 00000000..a3790e62 --- /dev/null +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py @@ -0,0 +1,118 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .dynamic_variable_assignment import DynamicVariableAssignment +from .dynamic_variables_config import DynamicVariablesConfig +from .system_tool_config_output_params import SystemToolConfigOutputParams +from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput + + +class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["client"] = "client" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None + expects_response: typing.Optional[bool] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp(UncheckedBaseModel): + value: typing.Optional[typing.Any] = None + type: typing.Literal["mcp"] = "mcp" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + + +class PromptAgentApiModelWorkflowOverrideOutputToolsItem_System(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["system"] = "system" + name: str + description: typing.Optional[str] = None + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + params: SystemToolConfigOutputParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["webhook"] = "webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + api_schema: WebhookToolApiSchemaConfigOutput + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +PromptAgentApiModelWorkflowOverrideOutputToolsItem = typing_extensions.Annotated[ + typing.Union[ + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client) +update_forward_refs(PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook) diff --git a/src/elevenlabs/types/section_source.py b/src/elevenlabs/types/section_source.py new file mode 100644 index 00000000..c91a391c --- /dev/null +++ b/src/elevenlabs/types/section_source.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .time_range import TimeRange + + +class SectionSource(UncheckedBaseModel): + song_id: str = pydantic.Field() + """ + The ID of the song to source the section from. You can find the song ID in the response headers when you generate a song. + """ + + range: TimeRange = pydantic.Field() + """ + The range to extract from the source song. + """ + + negative_ranges: typing.Optional[typing.List[TimeRange]] = pydantic.Field(default=None) + """ + The ranges to exclude from the 'range'. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/song_section.py b/src/elevenlabs/types/song_section.py index 22d41f82..79ef3c72 100644 --- a/src/elevenlabs/types/song_section.py +++ b/src/elevenlabs/types/song_section.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .section_source import SectionSource class SongSection(UncheckedBaseModel): @@ -33,6 +34,11 @@ class SongSection(UncheckedBaseModel): The lyrics of the section. """ + source_from: typing.Optional[SectionSource] = pydantic.Field(default=None) + """ + Optional source to extract the section from. Used for inpainting. Only available to enterprise clients with access to the inpainting API. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/subscription_response_model_currency.py b/src/elevenlabs/types/subscription_response_model_currency.py index 9cba2c8d..8968ce43 100644 --- a/src/elevenlabs/types/subscription_response_model_currency.py +++ b/src/elevenlabs/types/subscription_response_model_currency.py @@ -2,4 +2,4 @@ import typing -SubscriptionResponseModelCurrency = typing.Union[typing.Literal["usd", "eur"], typing.Any] +SubscriptionResponseModelCurrency = typing.Union[typing.Literal["usd", "eur", "inr"], typing.Any] diff --git a/src/elevenlabs/types/time_range.py b/src/elevenlabs/types/time_range.py new file mode 100644 index 00000000..a86f3746 --- /dev/null +++ b/src/elevenlabs/types/time_range.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TimeRange(UncheckedBaseModel): + start_ms: int + end_ms: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/tts_conversational_config_workflow_override.py b/src/elevenlabs/types/tts_conversational_config_workflow_override_input.py similarity index 96% rename from src/elevenlabs/types/tts_conversational_config_workflow_override.py rename to src/elevenlabs/types/tts_conversational_config_workflow_override_input.py index f32bbf28..d8256459 100644 --- a/src/elevenlabs/types/tts_conversational_config_workflow_override.py +++ b/src/elevenlabs/types/tts_conversational_config_workflow_override_input.py @@ -12,7 +12,7 @@ from .tts_output_format import TtsOutputFormat -class TtsConversationalConfigWorkflowOverride(UncheckedBaseModel): +class TtsConversationalConfigWorkflowOverrideInput(UncheckedBaseModel): model_id: typing.Optional[TtsConversationalModel] = pydantic.Field(default=None) """ The model to use for TTS diff --git a/src/elevenlabs/types/tts_conversational_config_workflow_override_output.py b/src/elevenlabs/types/tts_conversational_config_workflow_override_output.py new file mode 100644 index 00000000..c2973a62 --- /dev/null +++ b/src/elevenlabs/types/tts_conversational_config_workflow_override_output.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pydantic_pronunciation_dictionary_version_locator import PydanticPronunciationDictionaryVersionLocator +from .supported_voice import SupportedVoice +from .tts_conversational_model import TtsConversationalModel +from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency +from .tts_output_format import TtsOutputFormat + + +class TtsConversationalConfigWorkflowOverrideOutput(UncheckedBaseModel): + model_id: typing.Optional[TtsConversationalModel] = pydantic.Field(default=None) + """ + The model to use for TTS + """ + + voice_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The voice ID to use for TTS + """ + + supported_voices: typing.Optional[typing.List[SupportedVoice]] = pydantic.Field(default=None) + """ + Additional supported voices for the agent + """ + + agent_output_audio_format: typing.Optional[TtsOutputFormat] = pydantic.Field(default=None) + """ + The audio format to use for TTS + """ + + optimize_streaming_latency: typing.Optional[TtsOptimizeStreamingLatency] = pydantic.Field(default=None) + """ + The optimization for streaming latency + """ + + stability: typing.Optional[float] = pydantic.Field(default=None) + """ + The stability of generated speech + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + The speed of generated speech + """ + + similarity_boost: typing.Optional[float] = pydantic.Field(default=None) + """ + The similarity boost for generated speech + """ + + pronunciation_dictionary_locators: typing.Optional[typing.List[PydanticPronunciationDictionaryVersionLocator]] = ( + pydantic.Field(default=None) + ) + """ + The pronunciation dictionary locators + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/unit_test_common_model.py b/src/elevenlabs/types/unit_test_common_model.py new file mode 100644 index 00000000..a678eb62 --- /dev/null +++ b/src/elevenlabs/types/unit_test_common_model.py @@ -0,0 +1,74 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_failure_response_example import AgentFailureResponseExample +from .agent_successful_response_example import AgentSuccessfulResponseExample +from .conversation_history_transcript_common_model_output import ConversationHistoryTranscriptCommonModelOutput +from .test_from_conversation_metadata_output import TestFromConversationMetadataOutput +from .unit_test_common_model_dynamic_variables_value import UnitTestCommonModelDynamicVariablesValue +from .unit_test_common_model_type import UnitTestCommonModelType +from .unit_test_tool_call_evaluation_model_output import UnitTestToolCallEvaluationModelOutput + + +class UnitTestCommonModel(UncheckedBaseModel): + """ + A test case for evaluating the agent's response to a specific chat scenario. + """ + + chat_history: typing.List[ConversationHistoryTranscriptCommonModelOutput] + success_condition: str = pydantic.Field() + """ + A prompt that evaluates whether the agent's response is successful. Should return True or False. + """ + + success_examples: typing.List[AgentSuccessfulResponseExample] = pydantic.Field() + """ + Non-empty list of example responses that should be considered successful + """ + + failure_examples: typing.List[AgentFailureResponseExample] = pydantic.Field() + """ + Non-empty list of example responses that should be considered failures + """ + + tool_call_parameters: typing.Optional[UnitTestToolCallEvaluationModelOutput] = pydantic.Field(default=None) + """ + How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. + """ + + dynamic_variables: typing.Optional[typing.Dict[str, typing.Optional[UnitTestCommonModelDynamicVariablesValue]]] = ( + pydantic.Field(default=None) + ) + """ + Dynamic variables to replace in the agent config during testing + """ + + type: typing.Optional[UnitTestCommonModelType] = None + from_conversation_metadata: typing.Optional[TestFromConversationMetadataOutput] = pydantic.Field(default=None) + """ + Metadata of a conversation this test was created from (if applicable). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .conversation_history_transcript_workflow_tools_result_common_model_output import ( + ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, +) # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 + +update_forward_refs(UnitTestCommonModel) diff --git a/src/elevenlabs/types/unit_test_common_model_dynamic_variables_value.py b/src/elevenlabs/types/unit_test_common_model_dynamic_variables_value.py new file mode 100644 index 00000000..c7e3b03a --- /dev/null +++ b/src/elevenlabs/types/unit_test_common_model_dynamic_variables_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UnitTestCommonModelDynamicVariablesValue = typing.Union[str, float, int, bool] diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py index d83e75a9..99913ced 100644 --- a/src/elevenlabs/types/unit_test_run_response_model.py +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -11,10 +11,12 @@ from .test_condition_result_common_model import TestConditionResultCommonModel from .test_run_metadata import TestRunMetadata from .test_run_status import TestRunStatus +from .unit_test_common_model import UnitTestCommonModel class UnitTestRunResponseModel(UncheckedBaseModel): test_run_id: str + test_info: typing.Optional[UnitTestCommonModel] = None test_invocation_id: str agent_id: str workflow_node_id: typing.Optional[str] = None diff --git a/src/elevenlabs/types/webhook_event_type.py b/src/elevenlabs/types/webhook_event_type.py new file mode 100644 index 00000000..d344fb37 --- /dev/null +++ b/src/elevenlabs/types/webhook_event_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WebhookEventType = typing.Union[typing.Literal["transcript", "audio", "call_initiation_failure"], typing.Any] diff --git a/src/elevenlabs/types/whats_app_business_account.py b/src/elevenlabs/types/whats_app_business_account.py new file mode 100644 index 00000000..49a6f022 --- /dev/null +++ b/src/elevenlabs/types/whats_app_business_account.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .whats_app_business_account_changes_item import WhatsAppBusinessAccountChangesItem + + +class WhatsAppBusinessAccount(UncheckedBaseModel): + id: str + changes: typing.List[WhatsAppBusinessAccountChangesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_business_account_changes_item.py b/src/elevenlabs/types/whats_app_business_account_changes_item.py new file mode 100644 index 00000000..c0da244f --- /dev/null +++ b/src/elevenlabs/types/whats_app_business_account_changes_item.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .whats_app_calls import WhatsAppCalls + + +class WhatsAppBusinessAccountChangesItem_Calls(UncheckedBaseModel): + field: typing.Literal["calls"] = "calls" + value: WhatsAppCalls + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WhatsAppBusinessAccountChangesItem_Messages(UncheckedBaseModel): + field: typing.Literal["messages"] = "messages" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WhatsAppBusinessAccountChangesItem = typing_extensions.Annotated[ + typing.Union[WhatsAppBusinessAccountChangesItem_Calls, WhatsAppBusinessAccountChangesItem_Messages], + UnionMetadata(discriminant="field"), +] diff --git a/src/elevenlabs/types/whats_app_call.py b/src/elevenlabs/types/whats_app_call.py new file mode 100644 index 00000000..00b54002 --- /dev/null +++ b/src/elevenlabs/types/whats_app_call.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .whats_app_call_direction import WhatsAppCallDirection +from .whats_app_session import WhatsAppSession + + +class WhatsAppCall(UncheckedBaseModel): + id: str + event: str + from_: typing_extensions.Annotated[str, FieldMetadata(alias="from")] + to: str + direction: WhatsAppCallDirection + session: typing.Optional[WhatsAppSession] = None + status: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_call_direction.py b/src/elevenlabs/types/whats_app_call_direction.py new file mode 100644 index 00000000..d9fdbcea --- /dev/null +++ b/src/elevenlabs/types/whats_app_call_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WhatsAppCallDirection = typing.Union[typing.Literal["USER_INITIATED", "BUSINESS_INITIATED"], typing.Any] diff --git a/src/elevenlabs/types/whats_app_calls.py b/src/elevenlabs/types/whats_app_calls.py new file mode 100644 index 00000000..74648906 --- /dev/null +++ b/src/elevenlabs/types/whats_app_calls.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .whats_app_call import WhatsAppCall +from .whats_app_metadata import WhatsAppMetadata + + +class WhatsAppCalls(UncheckedBaseModel): + metadata: WhatsAppMetadata + calls: typing.List[WhatsAppCall] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_change_calls.py b/src/elevenlabs/types/whats_app_change_calls.py new file mode 100644 index 00000000..b35977c6 --- /dev/null +++ b/src/elevenlabs/types/whats_app_change_calls.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .whats_app_calls import WhatsAppCalls + + +class WhatsAppChangeCalls(UncheckedBaseModel): + value: WhatsAppCalls + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_boolean_node.py b/src/elevenlabs/types/whats_app_change_messages.py similarity index 89% rename from src/elevenlabs/types/ast_boolean_node.py rename to src/elevenlabs/types/whats_app_change_messages.py index dcfe7401..06d999c5 100644 --- a/src/elevenlabs/types/ast_boolean_node.py +++ b/src/elevenlabs/types/whats_app_change_messages.py @@ -7,9 +7,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class AstBooleanNode(UncheckedBaseModel): - value: bool - +class WhatsAppChangeMessages(UncheckedBaseModel): if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/whats_app_event_request.py b/src/elevenlabs/types/whats_app_event_request.py new file mode 100644 index 00000000..f49555c3 --- /dev/null +++ b/src/elevenlabs/types/whats_app_event_request.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .whats_app_business_account import WhatsAppBusinessAccount + + +class WhatsAppEventRequest(UncheckedBaseModel): + object: typing.Literal["whatsapp_business_account"] = "whatsapp_business_account" + entry: typing.List[WhatsAppBusinessAccount] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/ast_number_node.py b/src/elevenlabs/types/whats_app_metadata.py similarity index 87% rename from src/elevenlabs/types/ast_number_node.py rename to src/elevenlabs/types/whats_app_metadata.py index 7da03f97..0501981a 100644 --- a/src/elevenlabs/types/ast_number_node.py +++ b/src/elevenlabs/types/whats_app_metadata.py @@ -7,8 +7,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class AstNumberNode(UncheckedBaseModel): - value: float +class WhatsAppMetadata(UncheckedBaseModel): + phone_number_id: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/whats_app_session.py b/src/elevenlabs/types/whats_app_session.py new file mode 100644 index 00000000..61593643 --- /dev/null +++ b/src/elevenlabs/types/whats_app_session.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WhatsAppSession(UncheckedBaseModel): + sdp_type: str + sdp: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_edge_model.py b/src/elevenlabs/types/workflow_edge_model.py deleted file mode 100644 index ceb3387c..00000000 --- a/src/elevenlabs/types/workflow_edge_model.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .workflow_edge_model_backward_condition import WorkflowEdgeModelBackwardCondition -from .workflow_edge_model_forward_condition import WorkflowEdgeModelForwardCondition - - -class WorkflowEdgeModel(UncheckedBaseModel): - source: str - target: str - forward_condition: typing.Optional[WorkflowEdgeModelForwardCondition] = pydantic.Field(default=None) - """ - Condition that must be met for the edge to be traversed in the forward direction. - """ - - backward_condition: typing.Optional[WorkflowEdgeModelBackwardCondition] = pydantic.Field(default=None) - """ - Condition that must be met for the edge to be traversed in the backward direction. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - -update_forward_refs(WorkflowEdgeModel) diff --git a/src/elevenlabs/types/workflow_edge_model_input.py b/src/elevenlabs/types/workflow_edge_model_input.py new file mode 100644 index 00000000..1be36d58 --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_input.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_edge_model_input_backward_condition import WorkflowEdgeModelInputBackwardCondition +from .workflow_edge_model_input_forward_condition import WorkflowEdgeModelInputForwardCondition + + +class WorkflowEdgeModelInput(UncheckedBaseModel): + source: str = pydantic.Field() + """ + ID of the source node. + """ + + target: str = pydantic.Field() + """ + ID of the target node. + """ + + forward_condition: typing.Optional[WorkflowEdgeModelInputForwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the forward direction (source to target). + """ + + backward_condition: typing.Optional[WorkflowEdgeModelInputBackwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the backward direction (target to source). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowEdgeModelInput) diff --git a/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py new file mode 100644 index 00000000..3a1ea626 --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .workflow_expression_condition_model_input_expression import WorkflowExpressionConditionModelInputExpression + + +class WorkflowEdgeModelInputBackwardCondition_Expression(UncheckedBaseModel): + type: typing.Literal["expression"] = "expression" + label: typing.Optional[str] = None + expression: WorkflowExpressionConditionModelInputExpression + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + + +class WorkflowEdgeModelInputBackwardCondition_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + label: typing.Optional[str] = None + condition: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelInputBackwardCondition_Result(UncheckedBaseModel): + type: typing.Literal["result"] = "result" + label: typing.Optional[str] = None + successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelInputBackwardCondition_Unconditional(UncheckedBaseModel): + type: typing.Literal["unconditional"] = "unconditional" + label: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowEdgeModelInputBackwardCondition = typing_extensions.Annotated[ + typing.Union[ + WorkflowEdgeModelInputBackwardCondition_Expression, + WorkflowEdgeModelInputBackwardCondition_Llm, + WorkflowEdgeModelInputBackwardCondition_Result, + WorkflowEdgeModelInputBackwardCondition_Unconditional, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowEdgeModelInputBackwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_edge_model_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py similarity index 54% rename from src/elevenlabs/types/workflow_edge_model_backward_condition.py rename to src/elevenlabs/types/workflow_edge_model_input_forward_condition.py index a98f9712..8ec133f8 100644 --- a/src/elevenlabs/types/workflow_edge_model_backward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py @@ -8,13 +8,13 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression +from .workflow_expression_condition_model_input_expression import WorkflowExpressionConditionModelInputExpression -class WorkflowEdgeModelBackwardCondition_Expression(UncheckedBaseModel): +class WorkflowEdgeModelInputForwardCondition_Expression(UncheckedBaseModel): type: typing.Literal["expression"] = "expression" label: typing.Optional[str] = None - expression: WorkflowExpressionConditionModelExpression + expression: WorkflowExpressionConditionModelInputExpression if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -26,17 +26,17 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -class WorkflowEdgeModelBackwardCondition_Llm(UncheckedBaseModel): +class WorkflowEdgeModelInputForwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None condition: str @@ -51,7 +51,7 @@ class Config: extra = pydantic.Extra.allow -class WorkflowEdgeModelBackwardCondition_Result(UncheckedBaseModel): +class WorkflowEdgeModelInputForwardCondition_Result(UncheckedBaseModel): type: typing.Literal["result"] = "result" label: typing.Optional[str] = None successful: bool @@ -66,7 +66,7 @@ class Config: extra = pydantic.Extra.allow -class WorkflowEdgeModelBackwardCondition_Unconditional(UncheckedBaseModel): +class WorkflowEdgeModelInputForwardCondition_Unconditional(UncheckedBaseModel): type: typing.Literal["unconditional"] = "unconditional" label: typing.Optional[str] = None @@ -80,13 +80,13 @@ class Config: extra = pydantic.Extra.allow -WorkflowEdgeModelBackwardCondition = typing_extensions.Annotated[ +WorkflowEdgeModelInputForwardCondition = typing_extensions.Annotated[ typing.Union[ - WorkflowEdgeModelBackwardCondition_Expression, - WorkflowEdgeModelBackwardCondition_Llm, - WorkflowEdgeModelBackwardCondition_Result, - WorkflowEdgeModelBackwardCondition_Unconditional, + WorkflowEdgeModelInputForwardCondition_Expression, + WorkflowEdgeModelInputForwardCondition_Llm, + WorkflowEdgeModelInputForwardCondition_Result, + WorkflowEdgeModelInputForwardCondition_Unconditional, ], UnionMetadata(discriminant="type"), ] -update_forward_refs(WorkflowEdgeModelBackwardCondition_Expression) +update_forward_refs(WorkflowEdgeModelInputForwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_edge_model_output.py b/src/elevenlabs/types/workflow_edge_model_output.py new file mode 100644 index 00000000..fc4a8b0b --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_output.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_edge_model_output_backward_condition import WorkflowEdgeModelOutputBackwardCondition +from .workflow_edge_model_output_forward_condition import WorkflowEdgeModelOutputForwardCondition + + +class WorkflowEdgeModelOutput(UncheckedBaseModel): + source: str = pydantic.Field() + """ + ID of the source node. + """ + + target: str = pydantic.Field() + """ + ID of the target node. + """ + + forward_condition: typing.Optional[WorkflowEdgeModelOutputForwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the forward direction (source to target). + """ + + backward_condition: typing.Optional[WorkflowEdgeModelOutputBackwardCondition] = pydantic.Field(default=None) + """ + Condition that must be met for the edge to be traversed in the backward direction (target to source). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowEdgeModelOutput) diff --git a/src/elevenlabs/types/workflow_edge_model_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py similarity index 54% rename from src/elevenlabs/types/workflow_edge_model_forward_condition.py rename to src/elevenlabs/types/workflow_edge_model_output_backward_condition.py index c24cd836..24c07504 100644 --- a/src/elevenlabs/types/workflow_edge_model_forward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py @@ -8,13 +8,13 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression +from .workflow_expression_condition_model_output_expression import WorkflowExpressionConditionModelOutputExpression -class WorkflowEdgeModelForwardCondition_Expression(UncheckedBaseModel): +class WorkflowEdgeModelOutputBackwardCondition_Expression(UncheckedBaseModel): type: typing.Literal["expression"] = "expression" label: typing.Optional[str] = None - expression: WorkflowExpressionConditionModelExpression + expression: WorkflowExpressionConditionModelOutputExpression if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -26,17 +26,17 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -class WorkflowEdgeModelForwardCondition_Llm(UncheckedBaseModel): +class WorkflowEdgeModelOutputBackwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None condition: str @@ -51,7 +51,7 @@ class Config: extra = pydantic.Extra.allow -class WorkflowEdgeModelForwardCondition_Result(UncheckedBaseModel): +class WorkflowEdgeModelOutputBackwardCondition_Result(UncheckedBaseModel): type: typing.Literal["result"] = "result" label: typing.Optional[str] = None successful: bool @@ -66,7 +66,7 @@ class Config: extra = pydantic.Extra.allow -class WorkflowEdgeModelForwardCondition_Unconditional(UncheckedBaseModel): +class WorkflowEdgeModelOutputBackwardCondition_Unconditional(UncheckedBaseModel): type: typing.Literal["unconditional"] = "unconditional" label: typing.Optional[str] = None @@ -80,13 +80,13 @@ class Config: extra = pydantic.Extra.allow -WorkflowEdgeModelForwardCondition = typing_extensions.Annotated[ +WorkflowEdgeModelOutputBackwardCondition = typing_extensions.Annotated[ typing.Union[ - WorkflowEdgeModelForwardCondition_Expression, - WorkflowEdgeModelForwardCondition_Llm, - WorkflowEdgeModelForwardCondition_Result, - WorkflowEdgeModelForwardCondition_Unconditional, + WorkflowEdgeModelOutputBackwardCondition_Expression, + WorkflowEdgeModelOutputBackwardCondition_Llm, + WorkflowEdgeModelOutputBackwardCondition_Result, + WorkflowEdgeModelOutputBackwardCondition_Unconditional, ], UnionMetadata(discriminant="type"), ] -update_forward_refs(WorkflowEdgeModelForwardCondition_Expression) +update_forward_refs(WorkflowEdgeModelOutputBackwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py new file mode 100644 index 00000000..6f59214f --- /dev/null +++ b/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .workflow_expression_condition_model_output_expression import WorkflowExpressionConditionModelOutputExpression + + +class WorkflowEdgeModelOutputForwardCondition_Expression(UncheckedBaseModel): + type: typing.Literal["expression"] = "expression" + label: typing.Optional[str] = None + expression: WorkflowExpressionConditionModelOutputExpression + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + + +class WorkflowEdgeModelOutputForwardCondition_Llm(UncheckedBaseModel): + type: typing.Literal["llm"] = "llm" + label: typing.Optional[str] = None + condition: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelOutputForwardCondition_Result(UncheckedBaseModel): + type: typing.Literal["result"] = "result" + label: typing.Optional[str] = None + successful: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowEdgeModelOutputForwardCondition_Unconditional(UncheckedBaseModel): + type: typing.Literal["unconditional"] = "unconditional" + label: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowEdgeModelOutputForwardCondition = typing_extensions.Annotated[ + typing.Union[ + WorkflowEdgeModelOutputForwardCondition_Expression, + WorkflowEdgeModelOutputForwardCondition_Llm, + WorkflowEdgeModelOutputForwardCondition_Result, + WorkflowEdgeModelOutputForwardCondition_Unconditional, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowEdgeModelOutputForwardCondition_Expression) diff --git a/src/elevenlabs/types/workflow_end_node_model.py b/src/elevenlabs/types/workflow_end_node_model_input.py similarity index 81% rename from src/elevenlabs/types/workflow_end_node_model.py rename to src/elevenlabs/types/workflow_end_node_model_input.py index 1414027b..82a52541 100644 --- a/src/elevenlabs/types/workflow_end_node_model.py +++ b/src/elevenlabs/types/workflow_end_node_model_input.py @@ -5,11 +5,11 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .position import Position +from .position_input import PositionInput -class WorkflowEndNodeModel(UncheckedBaseModel): - position: typing.Optional[Position] = pydantic.Field(default=None) +class WorkflowEndNodeModelInput(UncheckedBaseModel): + position: typing.Optional[PositionInput] = pydantic.Field(default=None) """ Position of the node in the workflow. """ diff --git a/src/elevenlabs/types/workflow_standalone_agent_node_model.py b/src/elevenlabs/types/workflow_end_node_model_output.py similarity index 60% rename from src/elevenlabs/types/workflow_standalone_agent_node_model.py rename to src/elevenlabs/types/workflow_end_node_model_output.py index 90ad2d1a..7289d386 100644 --- a/src/elevenlabs/types/workflow_standalone_agent_node_model.py +++ b/src/elevenlabs/types/workflow_end_node_model_output.py @@ -5,25 +5,20 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .position import Position +from .position_output import PositionOutput -class WorkflowStandaloneAgentNodeModel(UncheckedBaseModel): - position: typing.Optional[Position] = pydantic.Field(default=None) +class WorkflowEndNodeModelOutput(UncheckedBaseModel): + position: PositionOutput = pydantic.Field() """ Position of the node in the workflow. """ - edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + edge_order: typing.List[str] = pydantic.Field() """ The ids of outgoing edges in the order they should be evaluated. """ - agent_id: str - delay_ms: typing.Optional[int] = None - transfer_message: typing.Optional[str] = None - enable_transferred_agent_first_message: typing.Optional[bool] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/workflow_expression_condition_model.py b/src/elevenlabs/types/workflow_expression_condition_model.py deleted file mode 100644 index 28fdc53c..00000000 --- a/src/elevenlabs/types/workflow_expression_condition_model.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .workflow_expression_condition_model_expression import WorkflowExpressionConditionModelExpression - - -class WorkflowExpressionConditionModel(UncheckedBaseModel): - label: typing.Optional[str] = None - expression: WorkflowExpressionConditionModelExpression - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 - -update_forward_refs(WorkflowExpressionConditionModel) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_expression.py deleted file mode 100644 index 0b6f8872..00000000 --- a/src/elevenlabs/types/workflow_expression_condition_model_expression.py +++ /dev/null @@ -1,264 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class WorkflowExpressionConditionModelExpression_AndOperator(UncheckedBaseModel): - type: typing.Literal["and_operator"] = "and_operator" - children: typing.List["AstAndOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node_children_item import AstAndOperatorNodeChildrenItem # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_BooleanLiteral(UncheckedBaseModel): - type: typing.Literal["boolean_literal"] = "boolean_literal" - value: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class WorkflowExpressionConditionModelExpression_DynamicVariable(UncheckedBaseModel): - type: typing.Literal["dynamic_variable"] = "dynamic_variable" - name: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class WorkflowExpressionConditionModelExpression_EqOperator(UncheckedBaseModel): - type: typing.Literal["eq_operator"] = "eq_operator" - left: "AstEqualsOperatorNodeLeft" - right: "AstEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_equals_operator_node_left import AstEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_right import AstEqualsOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_GtOperator(UncheckedBaseModel): - type: typing.Literal["gt_operator"] = "gt_operator" - left: "AstGreaterThanOperatorNodeLeft" - right: "AstGreaterThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_greater_than_operator_node_left import AstGreaterThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_right import AstGreaterThanOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_GteOperator(UncheckedBaseModel): - type: typing.Literal["gte_operator"] = "gte_operator" - left: "AstGreaterThanOrEqualsOperatorNodeLeft" - right: "AstGreaterThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_greater_than_or_equals_operator_node_left import AstGreaterThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_right import AstGreaterThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_Llm(UncheckedBaseModel): - type: typing.Literal["llm"] = "llm" - prompt: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class WorkflowExpressionConditionModelExpression_LtOperator(UncheckedBaseModel): - type: typing.Literal["lt_operator"] = "lt_operator" - left: "AstLessThanOperatorNodeLeft" - right: "AstLessThanOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_LteOperator(UncheckedBaseModel): - type: typing.Literal["lte_operator"] = "lte_operator" - left: "AstLessThanOrEqualsOperatorNodeLeft" - right: "AstLessThanOrEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_less_than_or_equals_operator_node_left import AstLessThanOrEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_NeqOperator(UncheckedBaseModel): - type: typing.Literal["neq_operator"] = "neq_operator" - left: "AstNotEqualsOperatorNodeLeft" - right: "AstNotEqualsOperatorNodeRight" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_not_equals_operator_node_left import AstNotEqualsOperatorNodeLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_right import AstNotEqualsOperatorNodeRight # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_NumberLiteral(UncheckedBaseModel): - type: typing.Literal["number_literal"] = "number_literal" - value: float - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class WorkflowExpressionConditionModelExpression_OrOperator(UncheckedBaseModel): - type: typing.Literal["or_operator"] = "or_operator" - children: typing.List["AstOrOperatorNodeChildrenItem"] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .ast_and_operator_node import AstAndOperatorNode # noqa: E402, F401, I001 -from .ast_equals_operator_node import AstEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_operator_node import AstGreaterThanOperatorNode # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node import AstGreaterThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_operator_node import AstLessThanOperatorNode # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node import AstLessThanOrEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_not_equals_operator_node import AstNotEqualsOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node import AstOrOperatorNode # noqa: E402, F401, I001 -from .ast_or_operator_node_children_item import AstOrOperatorNodeChildrenItem # noqa: E402, F401, I001 - - -class WorkflowExpressionConditionModelExpression_StringLiteral(UncheckedBaseModel): - type: typing.Literal["string_literal"] = "string_literal" - value: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -WorkflowExpressionConditionModelExpression = typing_extensions.Annotated[ - typing.Union[ - WorkflowExpressionConditionModelExpression_AndOperator, - WorkflowExpressionConditionModelExpression_BooleanLiteral, - WorkflowExpressionConditionModelExpression_DynamicVariable, - WorkflowExpressionConditionModelExpression_EqOperator, - WorkflowExpressionConditionModelExpression_GtOperator, - WorkflowExpressionConditionModelExpression_GteOperator, - WorkflowExpressionConditionModelExpression_Llm, - WorkflowExpressionConditionModelExpression_LtOperator, - WorkflowExpressionConditionModelExpression_LteOperator, - WorkflowExpressionConditionModelExpression_NeqOperator, - WorkflowExpressionConditionModelExpression_NumberLiteral, - WorkflowExpressionConditionModelExpression_OrOperator, - WorkflowExpressionConditionModelExpression_StringLiteral, - ], - UnionMetadata(discriminant="type"), -] -update_forward_refs(WorkflowExpressionConditionModelExpression_AndOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_EqOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_GtOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_GteOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_LtOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_LteOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_NeqOperator) -update_forward_refs(WorkflowExpressionConditionModelExpression_OrOperator) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_input.py b/src/elevenlabs/types/workflow_expression_condition_model_input.py new file mode 100644 index 00000000..551c37c3 --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model_input.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_expression_condition_model_input_expression import WorkflowExpressionConditionModelInputExpression + + +class WorkflowExpressionConditionModelInput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + expression: WorkflowExpressionConditionModelInputExpression = pydantic.Field() + """ + Expression to evaluate. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowExpressionConditionModelInput) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py new file mode 100644 index 00000000..ad5d3674 --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py @@ -0,0 +1,316 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowExpressionConditionModelInputExpression_AndOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_BooleanLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelInputExpression_DynamicVariable(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelInputExpression_EqOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeInputLeft" + right: "AstEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_GtOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeInputLeft" + right: "AstGreaterThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_GteOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeInputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_Llm(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelInputExpression_LtOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeInputLeft" + right: "AstLessThanOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_LteOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeInputLeft" + right: "AstLessThanOrEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_NeqOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeInputLeft" + right: "AstNotEqualsOperatorNodeInputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_NumberLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelInputExpression_OrOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeInputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 +from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelInputExpression_StringLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowExpressionConditionModelInputExpression = typing_extensions.Annotated[ + typing.Union[ + WorkflowExpressionConditionModelInputExpression_AndOperator, + WorkflowExpressionConditionModelInputExpression_BooleanLiteral, + WorkflowExpressionConditionModelInputExpression_DynamicVariable, + WorkflowExpressionConditionModelInputExpression_EqOperator, + WorkflowExpressionConditionModelInputExpression_GtOperator, + WorkflowExpressionConditionModelInputExpression_GteOperator, + WorkflowExpressionConditionModelInputExpression_Llm, + WorkflowExpressionConditionModelInputExpression_LtOperator, + WorkflowExpressionConditionModelInputExpression_LteOperator, + WorkflowExpressionConditionModelInputExpression_NeqOperator, + WorkflowExpressionConditionModelInputExpression_NumberLiteral, + WorkflowExpressionConditionModelInputExpression_OrOperator, + WorkflowExpressionConditionModelInputExpression_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowExpressionConditionModelInputExpression_AndOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_EqOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_GtOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_GteOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_LtOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_LteOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_NeqOperator) +update_forward_refs(WorkflowExpressionConditionModelInputExpression_OrOperator) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_output.py b/src/elevenlabs/types/workflow_expression_condition_model_output.py new file mode 100644 index 00000000..6bb13d77 --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model_output.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_expression_condition_model_output_expression import WorkflowExpressionConditionModelOutputExpression + + +class WorkflowExpressionConditionModelOutput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + expression: WorkflowExpressionConditionModelOutputExpression = pydantic.Field() + """ + Expression to evaluate. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowExpressionConditionModelOutput) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py new file mode 100644 index 00000000..542228da --- /dev/null +++ b/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py @@ -0,0 +1,316 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowExpressionConditionModelOutputExpression_AndOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["and_operator"] = "and_operator" + children: typing.List["AstAndOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_BooleanLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["boolean_literal"] = "boolean_literal" + value: bool + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelOutputExpression_DynamicVariable(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["dynamic_variable"] = "dynamic_variable" + name: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelOutputExpression_EqOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["eq_operator"] = "eq_operator" + left: "AstEqualsOperatorNodeOutputLeft" + right: "AstEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_GtOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["gt_operator"] = "gt_operator" + left: "AstGreaterThanOperatorNodeOutputLeft" + right: "AstGreaterThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_GteOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["gte_operator"] = "gte_operator" + left: "AstGreaterThanOrEqualsOperatorNodeOutputLeft" + right: "AstGreaterThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_Llm(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["llm"] = "llm" + prompt: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelOutputExpression_LtOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["lt_operator"] = "lt_operator" + left: "AstLessThanOperatorNodeOutputLeft" + right: "AstLessThanOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_LteOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["lte_operator"] = "lte_operator" + left: "AstLessThanOrEqualsOperatorNodeOutputLeft" + right: "AstLessThanOrEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_NeqOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["neq_operator"] = "neq_operator" + left: "AstNotEqualsOperatorNodeOutputLeft" + right: "AstNotEqualsOperatorNodeOutputRight" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_NumberLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["number_literal"] = "number_literal" + value: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowExpressionConditionModelOutputExpression_OrOperator(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["or_operator"] = "or_operator" + children: typing.List["AstOrOperatorNodeOutputChildrenItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 + + +class WorkflowExpressionConditionModelOutputExpression_StringLiteral(UncheckedBaseModel): + """ + Expression to evaluate. + """ + + type: typing.Literal["string_literal"] = "string_literal" + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowExpressionConditionModelOutputExpression = typing_extensions.Annotated[ + typing.Union[ + WorkflowExpressionConditionModelOutputExpression_AndOperator, + WorkflowExpressionConditionModelOutputExpression_BooleanLiteral, + WorkflowExpressionConditionModelOutputExpression_DynamicVariable, + WorkflowExpressionConditionModelOutputExpression_EqOperator, + WorkflowExpressionConditionModelOutputExpression_GtOperator, + WorkflowExpressionConditionModelOutputExpression_GteOperator, + WorkflowExpressionConditionModelOutputExpression_Llm, + WorkflowExpressionConditionModelOutputExpression_LtOperator, + WorkflowExpressionConditionModelOutputExpression_LteOperator, + WorkflowExpressionConditionModelOutputExpression_NeqOperator, + WorkflowExpressionConditionModelOutputExpression_NumberLiteral, + WorkflowExpressionConditionModelOutputExpression_OrOperator, + WorkflowExpressionConditionModelOutputExpression_StringLiteral, + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_AndOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_EqOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_GtOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_GteOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_LtOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_LteOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_NeqOperator) +update_forward_refs(WorkflowExpressionConditionModelOutputExpression_OrOperator) diff --git a/src/elevenlabs/types/workflow_features_usage_common_model.py b/src/elevenlabs/types/workflow_features_usage_common_model.py index 82553a23..55266e9b 100644 --- a/src/elevenlabs/types/workflow_features_usage_common_model.py +++ b/src/elevenlabs/types/workflow_features_usage_common_model.py @@ -11,6 +11,9 @@ class WorkflowFeaturesUsageCommonModel(UncheckedBaseModel): enabled: typing.Optional[bool] = None tool_node: typing.Optional[FeatureStatusCommonModel] = None + standalone_agent_node: typing.Optional[FeatureStatusCommonModel] = None + phone_number_node: typing.Optional[FeatureStatusCommonModel] = None + end_node: typing.Optional[FeatureStatusCommonModel] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/workflow_llm_condition_model.py b/src/elevenlabs/types/workflow_llm_condition_model.py deleted file mode 100644 index e07dbc2e..00000000 --- a/src/elevenlabs/types/workflow_llm_condition_model.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class WorkflowLlmConditionModel(UncheckedBaseModel): - label: typing.Optional[str] = None - condition: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_llm_condition_model_input.py b/src/elevenlabs/types/workflow_llm_condition_model_input.py new file mode 100644 index 00000000..2ecf9584 --- /dev/null +++ b/src/elevenlabs/types/workflow_llm_condition_model_input.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowLlmConditionModelInput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + condition: str = pydantic.Field() + """ + Condition to evaluate + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_llm_condition_model_output.py b/src/elevenlabs/types/workflow_llm_condition_model_output.py new file mode 100644 index 00000000..430c669b --- /dev/null +++ b/src/elevenlabs/types/workflow_llm_condition_model_output.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowLlmConditionModelOutput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + condition: str = pydantic.Field() + """ + Condition to evaluate + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_override_agent_node_model.py b/src/elevenlabs/types/workflow_override_agent_node_model.py deleted file mode 100644 index 10084de7..00000000 --- a/src/elevenlabs/types/workflow_override_agent_node_model.py +++ /dev/null @@ -1,45 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .conversational_config_api_model_workflow_override import ConversationalConfigApiModelWorkflowOverride -from .knowledge_base_locator import KnowledgeBaseLocator -from .position import Position - - -class WorkflowOverrideAgentNodeModel(UncheckedBaseModel): - conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverride] = None - additional_prompt: typing.Optional[str] = None - additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = None - additional_tool_ids: typing.Optional[typing.List[str]] = None - position: typing.Optional[Position] = pydantic.Field(default=None) - """ - Position of the node in the workflow. - """ - - edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - The ids of outgoing edges in the order they should be evaluated. - """ - - label: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - -update_forward_refs(WorkflowOverrideAgentNodeModel) diff --git a/src/elevenlabs/types/workflow_override_agent_node_model_input.py b/src/elevenlabs/types/workflow_override_agent_node_model_input.py new file mode 100644 index 00000000..f571dbba --- /dev/null +++ b/src/elevenlabs/types/workflow_override_agent_node_model_input.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversational_config_api_model_workflow_override_input import ConversationalConfigApiModelWorkflowOverrideInput +from .knowledge_base_locator import KnowledgeBaseLocator +from .position_input import PositionInput + + +class WorkflowOverrideAgentNodeModelInput(UncheckedBaseModel): + conversation_config: typing.Optional[ConversationalConfigApiModelWorkflowOverrideInput] = pydantic.Field( + default=None + ) + """ + Configuration overrides applied while the subagent is conducting the conversation. + """ + + additional_prompt: typing.Optional[str] = pydantic.Field(default=None) + """ + Specific goal for this subagent. It will be added to the system prompt and can be used to further refine the agent's behavior in this specific context. + """ + + additional_knowledge_base: typing.Optional[typing.List[KnowledgeBaseLocator]] = pydantic.Field(default=None) + """ + Additional knowledge base documents that the subagent has access to. These will be used in addition to the main agent's documents. + """ + + additional_tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + IDs of additional tools that the subagent has access to. These will be used in addition to the main agent's tools. + """ + + position: typing.Optional[PositionInput] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + label: str = pydantic.Field() + """ + Human-readable label for the node used throughout the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowOverrideAgentNodeModelInput) diff --git a/src/elevenlabs/types/workflow_override_agent_node_model_output.py b/src/elevenlabs/types/workflow_override_agent_node_model_output.py new file mode 100644 index 00000000..db491424 --- /dev/null +++ b/src/elevenlabs/types/workflow_override_agent_node_model_output.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversational_config_api_model_workflow_override_output import ConversationalConfigApiModelWorkflowOverrideOutput +from .knowledge_base_locator import KnowledgeBaseLocator +from .position_output import PositionOutput + + +class WorkflowOverrideAgentNodeModelOutput(UncheckedBaseModel): + conversation_config: ConversationalConfigApiModelWorkflowOverrideOutput = pydantic.Field() + """ + Configuration overrides applied while the subagent is conducting the conversation. + """ + + additional_prompt: str = pydantic.Field() + """ + Specific goal for this subagent. It will be added to the system prompt and can be used to further refine the agent's behavior in this specific context. + """ + + additional_knowledge_base: typing.List[KnowledgeBaseLocator] = pydantic.Field() + """ + Additional knowledge base documents that the subagent has access to. These will be used in addition to the main agent's documents. + """ + + additional_tool_ids: typing.List[str] = pydantic.Field() + """ + IDs of additional tools that the subagent has access to. These will be used in addition to the main agent's tools. + """ + + position: PositionOutput = pydantic.Field() + """ + Position of the node in the workflow. + """ + + edge_order: typing.List[str] = pydantic.Field() + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + label: str = pydantic.Field() + """ + Human-readable label for the node used throughout the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 + +update_forward_refs(WorkflowOverrideAgentNodeModelOutput) diff --git a/src/elevenlabs/types/workflow_phone_number_node_model.py b/src/elevenlabs/types/workflow_phone_number_node_model_input.py similarity index 68% rename from src/elevenlabs/types/workflow_phone_number_node_model.py rename to src/elevenlabs/types/workflow_phone_number_node_model_input.py index 1529e4fc..dd9cb2c6 100644 --- a/src/elevenlabs/types/workflow_phone_number_node_model.py +++ b/src/elevenlabs/types/workflow_phone_number_node_model_input.py @@ -5,13 +5,15 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .position import Position +from .position_input import PositionInput from .transfer_type_enum import TransferTypeEnum -from .workflow_phone_number_node_model_transfer_destination import WorkflowPhoneNumberNodeModelTransferDestination +from .workflow_phone_number_node_model_input_transfer_destination import ( + WorkflowPhoneNumberNodeModelInputTransferDestination, +) -class WorkflowPhoneNumberNodeModel(UncheckedBaseModel): - position: typing.Optional[Position] = pydantic.Field(default=None) +class WorkflowPhoneNumberNodeModelInput(UncheckedBaseModel): + position: typing.Optional[PositionInput] = pydantic.Field(default=None) """ Position of the node in the workflow. """ @@ -21,7 +23,7 @@ class WorkflowPhoneNumberNodeModel(UncheckedBaseModel): The ids of outgoing edges in the order they should be evaluated. """ - transfer_destination: WorkflowPhoneNumberNodeModelTransferDestination + transfer_destination: WorkflowPhoneNumberNodeModelInputTransferDestination transfer_type: typing.Optional[TransferTypeEnum] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py b/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py similarity index 73% rename from src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py rename to src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py index 3370c4ba..778c15cc 100644 --- a/src/elevenlabs/types/workflow_phone_number_node_model_transfer_destination.py +++ b/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py @@ -10,7 +10,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -class WorkflowPhoneNumberNodeModelTransferDestination_Phone(UncheckedBaseModel): +class WorkflowPhoneNumberNodeModelInputTransferDestination_Phone(UncheckedBaseModel): type: typing.Literal["phone"] = "phone" phone_number: str @@ -24,7 +24,7 @@ class Config: extra = pydantic.Extra.allow -class WorkflowPhoneNumberNodeModelTransferDestination_SipUri(UncheckedBaseModel): +class WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri(UncheckedBaseModel): type: typing.Literal["sip_uri"] = "sip_uri" sip_uri: str @@ -38,9 +38,10 @@ class Config: extra = pydantic.Extra.allow -WorkflowPhoneNumberNodeModelTransferDestination = typing_extensions.Annotated[ +WorkflowPhoneNumberNodeModelInputTransferDestination = typing_extensions.Annotated[ typing.Union[ - WorkflowPhoneNumberNodeModelTransferDestination_Phone, WorkflowPhoneNumberNodeModelTransferDestination_SipUri + WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_output.py b/src/elevenlabs/types/workflow_phone_number_node_model_output.py new file mode 100644 index 00000000..8e31e4ac --- /dev/null +++ b/src/elevenlabs/types/workflow_phone_number_node_model_output.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position_output import PositionOutput +from .transfer_type_enum import TransferTypeEnum +from .workflow_phone_number_node_model_output_transfer_destination import ( + WorkflowPhoneNumberNodeModelOutputTransferDestination, +) + + +class WorkflowPhoneNumberNodeModelOutput(UncheckedBaseModel): + position: PositionOutput = pydantic.Field() + """ + Position of the node in the workflow. + """ + + edge_order: typing.List[str] = pydantic.Field() + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + transfer_destination: WorkflowPhoneNumberNodeModelOutputTransferDestination + transfer_type: TransferTypeEnum + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py b/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py new file mode 100644 index 00000000..0913c2dd --- /dev/null +++ b/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone(UncheckedBaseModel): + type: typing.Literal["phone"] = "phone" + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri(UncheckedBaseModel): + type: typing.Literal["sip_uri"] = "sip_uri" + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowPhoneNumberNodeModelOutputTransferDestination = typing_extensions.Annotated[ + typing.Union[ + WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/elevenlabs/types/workflow_result_condition_model.py b/src/elevenlabs/types/workflow_result_condition_model.py deleted file mode 100644 index bab48c79..00000000 --- a/src/elevenlabs/types/workflow_result_condition_model.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class WorkflowResultConditionModel(UncheckedBaseModel): - label: typing.Optional[str] = None - successful: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_result_condition_model_input.py b/src/elevenlabs/types/workflow_result_condition_model_input.py new file mode 100644 index 00000000..c0091a93 --- /dev/null +++ b/src/elevenlabs/types/workflow_result_condition_model_input.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowResultConditionModelInput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + successful: bool = pydantic.Field() + """ + Whether all tools in the previously executed tool node were executed successfully. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_result_condition_model_output.py b/src/elevenlabs/types/workflow_result_condition_model_output.py new file mode 100644 index 00000000..66efd4f8 --- /dev/null +++ b/src/elevenlabs/types/workflow_result_condition_model_output.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowResultConditionModelOutput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + successful: bool = pydantic.Field() + """ + Whether all tools in the previously executed tool node were executed successfully. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_standalone_agent_node_model_input.py b/src/elevenlabs/types/workflow_standalone_agent_node_model_input.py new file mode 100644 index 00000000..41cab90e --- /dev/null +++ b/src/elevenlabs/types/workflow_standalone_agent_node_model_input.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position_input import PositionInput + + +class WorkflowStandaloneAgentNodeModelInput(UncheckedBaseModel): + position: typing.Optional[PositionInput] = pydantic.Field(default=None) + """ + Position of the node in the workflow. + """ + + edge_order: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + agent_id: str = pydantic.Field() + """ + The ID of the agent to transfer the conversation to. + """ + + delay_ms: typing.Optional[int] = pydantic.Field(default=None) + """ + Artificial delay in milliseconds applied before transferring the conversation. + """ + + transfer_message: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional message sent to the user before the transfer is initiated. + """ + + enable_transferred_agent_first_message: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to enable the transferred agent to send its configured first message after the transfer. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_standalone_agent_node_model_output.py b/src/elevenlabs/types/workflow_standalone_agent_node_model_output.py new file mode 100644 index 00000000..c0eb3017 --- /dev/null +++ b/src/elevenlabs/types/workflow_standalone_agent_node_model_output.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position_output import PositionOutput + + +class WorkflowStandaloneAgentNodeModelOutput(UncheckedBaseModel): + position: PositionOutput = pydantic.Field() + """ + Position of the node in the workflow. + """ + + edge_order: typing.List[str] = pydantic.Field() + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + agent_id: str = pydantic.Field() + """ + The ID of the agent to transfer the conversation to. + """ + + delay_ms: int = pydantic.Field() + """ + Artificial delay in milliseconds applied before transferring the conversation. + """ + + transfer_message: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional message sent to the user before the transfer is initiated. + """ + + enable_transferred_agent_first_message: bool = pydantic.Field() + """ + Whether to enable the transferred agent to send its configured first message after the transfer. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_start_node_model.py b/src/elevenlabs/types/workflow_start_node_model_input.py similarity index 80% rename from src/elevenlabs/types/workflow_start_node_model.py rename to src/elevenlabs/types/workflow_start_node_model_input.py index e20d8a73..6f1dfef1 100644 --- a/src/elevenlabs/types/workflow_start_node_model.py +++ b/src/elevenlabs/types/workflow_start_node_model_input.py @@ -5,11 +5,11 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .position import Position +from .position_input import PositionInput -class WorkflowStartNodeModel(UncheckedBaseModel): - position: typing.Optional[Position] = pydantic.Field(default=None) +class WorkflowStartNodeModelInput(UncheckedBaseModel): + position: typing.Optional[PositionInput] = pydantic.Field(default=None) """ Position of the node in the workflow. """ diff --git a/src/elevenlabs/types/workflow_start_node_model_output.py b/src/elevenlabs/types/workflow_start_node_model_output.py new file mode 100644 index 00000000..6eda84e0 --- /dev/null +++ b/src/elevenlabs/types/workflow_start_node_model_output.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position_output import PositionOutput + + +class WorkflowStartNodeModelOutput(UncheckedBaseModel): + position: PositionOutput = pydantic.Field() + """ + Position of the node in the workflow. + """ + + edge_order: typing.List[str] = pydantic.Field() + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_tool_node_model.py b/src/elevenlabs/types/workflow_tool_node_model_input.py similarity index 66% rename from src/elevenlabs/types/workflow_tool_node_model.py rename to src/elevenlabs/types/workflow_tool_node_model_input.py index 662ae49e..b22ce935 100644 --- a/src/elevenlabs/types/workflow_tool_node_model.py +++ b/src/elevenlabs/types/workflow_tool_node_model_input.py @@ -5,12 +5,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .position import Position +from .position_input import PositionInput from .workflow_tool_locator import WorkflowToolLocator -class WorkflowToolNodeModel(UncheckedBaseModel): - position: typing.Optional[Position] = pydantic.Field(default=None) +class WorkflowToolNodeModelInput(UncheckedBaseModel): + position: typing.Optional[PositionInput] = pydantic.Field(default=None) """ Position of the node in the workflow. """ @@ -20,7 +20,10 @@ class WorkflowToolNodeModel(UncheckedBaseModel): The ids of outgoing edges in the order they should be evaluated. """ - tools: typing.Optional[typing.List[WorkflowToolLocator]] = None + tools: typing.Optional[typing.List[WorkflowToolLocator]] = pydantic.Field(default=None) + """ + List of tools to execute in parallel. The entire node is considered successful if all tools are executed successfully. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/workflow_tool_node_model_output.py b/src/elevenlabs/types/workflow_tool_node_model_output.py new file mode 100644 index 00000000..63e688f7 --- /dev/null +++ b/src/elevenlabs/types/workflow_tool_node_model_output.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .position_output import PositionOutput +from .workflow_tool_locator import WorkflowToolLocator + + +class WorkflowToolNodeModelOutput(UncheckedBaseModel): + position: PositionOutput = pydantic.Field() + """ + Position of the node in the workflow. + """ + + edge_order: typing.List[str] = pydantic.Field() + """ + The ids of outgoing edges in the order they should be evaluated. + """ + + tools: typing.List[WorkflowToolLocator] = pydantic.Field() + """ + List of tools to execute in parallel. The entire node is considered successful if all tools are executed successfully. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_unconditional_model.py b/src/elevenlabs/types/workflow_unconditional_model.py deleted file mode 100644 index 14cc925a..00000000 --- a/src/elevenlabs/types/workflow_unconditional_model.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class WorkflowUnconditionalModel(UncheckedBaseModel): - label: typing.Optional[str] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_unconditional_model_input.py b/src/elevenlabs/types/workflow_unconditional_model_input.py new file mode 100644 index 00000000..31232cf6 --- /dev/null +++ b/src/elevenlabs/types/workflow_unconditional_model_input.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowUnconditionalModelInput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workflow_unconditional_model_output.py b/src/elevenlabs/types/workflow_unconditional_model_output.py new file mode 100644 index 00000000..d4508c66 --- /dev/null +++ b/src/elevenlabs/types/workflow_unconditional_model_output.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowUnconditionalModelOutput(UncheckedBaseModel): + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional human-readable label for the condition used throughout the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 6b6a6a6c..2223cdc0 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -17,6 +17,7 @@ "workspace_auth_connections", "convai_phone_numbers", "convai_mcp_servers", + "convai_api_integration_connections", "convai_batch_calls", "convai_agent_response_tests", "convai_test_suite_invocations", diff --git a/src/elevenlabs/types/zendesk_conversation_initiation_trigger.py b/src/elevenlabs/types/zendesk_conversation_initiation_trigger.py new file mode 100644 index 00000000..25bc7d00 --- /dev/null +++ b/src/elevenlabs/types/zendesk_conversation_initiation_trigger.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ZendeskConversationInitiationTrigger(UncheckedBaseModel): + """ + Trigger for Zendesk-initiated conversations. + """ + + ticket_id: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow From a2ba67ed502c788a04f17db8cd992517cac49a07 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Mon, 20 Oct 2025 16:10:10 +0200 Subject: [PATCH 24/34] [ASR] Helper method for scribe realtime (#648) * Helper method for scribe realtime * Add new event and model_id * fix typing * Simplify event logic * fix examples --- .fernignore | 2 + src/elevenlabs/__init__.py | 12 + src/elevenlabs/client.py | 14 +- src/elevenlabs/realtime/__init__.py | 20 ++ src/elevenlabs/realtime/connection.py | 203 +++++++++++++ src/elevenlabs/realtime/scribe.py | 360 ++++++++++++++++++++++++ src/elevenlabs/speech_to_text_custom.py | 100 +++++++ 7 files changed, 705 insertions(+), 6 deletions(-) create mode 100644 src/elevenlabs/realtime/__init__.py create mode 100644 src/elevenlabs/realtime/connection.py create mode 100644 src/elevenlabs/realtime/scribe.py create mode 100644 src/elevenlabs/speech_to_text_custom.py diff --git a/.fernignore b/.fernignore index 5979d745..961ca7bb 100644 --- a/.fernignore +++ b/.fernignore @@ -8,6 +8,8 @@ src/elevenlabs/realtime_tts.py src/elevenlabs/play.py src/elevenlabs/webhooks_custom.py src/elevenlabs/music_custom.py +src/elevenlabs/speech_to_text_custom.py +src/elevenlabs/realtime/ # Ignore CI files .github/ diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index ff062217..50ffc948 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -2960,6 +2960,12 @@ "voices": ".voices", "webhooks": ".webhooks", "workspace": ".workspace", + "RealtimeConnection": ".realtime", + "RealtimeEvents": ".realtime", + "AudioFormat": ".realtime", + "CommitStrategy": ".realtime", + "RealtimeAudioOptions": ".realtime", + "RealtimeUrlOptions": ".realtime", } @@ -2988,6 +2994,8 @@ def __dir__(): "AddChapterResponseModel", "AddKnowledgeBaseResponseModel", "AddProjectRequest", + "AudioFormat", + "RealtimeAudioOptions", "AddProjectResponseModel", "AddPronunciationDictionaryResponseModel", "AddPronunciationDictionaryResponseModelPermissionOnResource", @@ -3562,6 +3570,7 @@ def __dir__(): "ClientEvent", "ClientToolConfigInput", "ClientToolConfigOutput", + "CommitStrategy", "CloseConnection", "CloseContext", "CloseSocket", @@ -4040,6 +4049,8 @@ def __dir__(): "RagRetrievalInfo", "ReaderResourceResponseModel", "ReaderResourceResponseModelResourceType", + "RealtimeConnection", + "RealtimeEvents", "RealtimeVoiceSettings", "ReceiveMessage", "ReceiveMessageMulti", @@ -4238,6 +4249,7 @@ def __dir__(): "UpdatePronunciationDictionariesRequest", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", + "RealtimeUrlOptions", "UsageAggregationInterval", "UsageCharactersResponseModel", "User", diff --git a/src/elevenlabs/client.py b/src/elevenlabs/client.py index 9ab0472c..6fd75a53 100644 --- a/src/elevenlabs/client.py +++ b/src/elevenlabs/client.py @@ -1,14 +1,14 @@ -import typing import os +import typing + import httpx -from functools import wraps -from .base_client import \ - BaseElevenLabs, AsyncBaseElevenLabs +from .base_client import AsyncBaseElevenLabs, BaseElevenLabs from .environment import ElevenLabsEnvironment +from .music_custom import AsyncMusicClient, MusicClient from .realtime_tts import RealtimeTextToSpeechClient -from .webhooks_custom import WebhooksClient, AsyncWebhooksClient -from .music_custom import MusicClient, AsyncMusicClient +from .speech_to_text_custom import AsyncSpeechToTextClient, SpeechToTextClient +from .webhooks_custom import AsyncWebhooksClient, WebhooksClient # this is used as the default value for optional parameters @@ -61,6 +61,7 @@ def __init__( self._text_to_speech = RealtimeTextToSpeechClient(client_wrapper=self._client_wrapper) self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper) self._music = MusicClient(client_wrapper=self._client_wrapper) + self._speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) class AsyncElevenLabs(AsyncBaseElevenLabs): @@ -105,3 +106,4 @@ def __init__( ) self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) self._music = AsyncMusicClient(client_wrapper=self._client_wrapper) + self._speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) diff --git a/src/elevenlabs/realtime/__init__.py b/src/elevenlabs/realtime/__init__.py new file mode 100644 index 00000000..3ae37320 --- /dev/null +++ b/src/elevenlabs/realtime/__init__.py @@ -0,0 +1,20 @@ +""" +Real-time speech-to-text WebSocket helpers for ElevenLabs API. + +This module provides classes for streaming audio to the ElevenLabs +speech-to-text API and receiving real-time transcription results. +""" + +from .connection import RealtimeConnection, RealtimeEvents +from .scribe import ScribeRealtime, AudioFormat, CommitStrategy, RealtimeAudioOptions, RealtimeUrlOptions + +__all__ = [ + "RealtimeConnection", + "RealtimeEvents", + "ScribeRealtime", + "AudioFormat", + "CommitStrategy", + "RealtimeAudioOptions", + "RealtimeUrlOptions", +] + diff --git a/src/elevenlabs/realtime/connection.py b/src/elevenlabs/realtime/connection.py new file mode 100644 index 00000000..0f575662 --- /dev/null +++ b/src/elevenlabs/realtime/connection.py @@ -0,0 +1,203 @@ +import asyncio +import json +import subprocess +import typing +from enum import Enum + + +class RealtimeEvents(str, Enum): + """Events emitted by the RealtimeConnection""" + OPEN = "open" + CLOSE = "close" + SESSION_STARTED = "session_started" + PARTIAL_TRANSCRIPT = "partial_transcript" + FINAL_TRANSCRIPT = "final_transcript" + FINAL_TRANSCRIPT_WITH_TIMESTAMPS = "final_transcript_with_timestamps" + ERROR = "error" + + +class RealtimeConnection: + """ + A WebSocket connection for real-time speech-to-text transcription. + + This class handles bidirectional WebSocket communication with the ElevenLabs + speech-to-text API, managing audio streaming and receiving transcription results. + + Example: + ```python + connection = await client.speech_to_text.realtime.connect({ + "audio_format": AudioFormat.PCM_16000, + "sample_rate": 16000 + }) + + connection.on(RealtimeEvents.PARTIAL_TRANSCRIPT, lambda data: print(data)) + connection.on(RealtimeEvents.FINAL_TRANSCRIPT, lambda data: print(data)) + + # Send audio + connection.send({"audioBase64": audio_chunk}) + + # When done + connection.commit() + await connection.close() + ``` + """ + + def __init__(self, websocket, current_sample_rate: int, ffmpeg_process: typing.Optional[subprocess.Popen] = None): + self.websocket = websocket + self.current_sample_rate = current_sample_rate + self.ffmpeg_process = ffmpeg_process + self._event_handlers: typing.Dict[str, typing.List[typing.Callable]] = {} + self._message_task: typing.Optional[asyncio.Task] = None + + def on(self, event: str, callback: typing.Callable) -> None: + """ + Register an event handler for a specific event type. + + Args: + event: The event type to listen for (from RealtimeEvents enum) + callback: The function to call when the event occurs + + Example: + ```python + def handle_transcript(data): + print(f"Transcript: {data['transcript']}") + + connection.on(RealtimeEvents.PARTIAL_TRANSCRIPT, handle_transcript) + ``` + """ + if event not in self._event_handlers: + self._event_handlers[event] = [] + self._event_handlers[event].append(callback) + + def _emit(self, event: str, *args) -> None: + """Emit an event to all registered handlers""" + if event in self._event_handlers: + for handler in self._event_handlers[event]: + try: + handler(*args) + except Exception as e: + print(f"Error in event handler for {event}: {e}") + + async def _start_message_handler(self) -> None: + """Start handling incoming WebSocket messages""" + try: + async for message in self.websocket: + try: + data = json.loads(message) + message_type = data.get("message_type") + + # Try to match message_type to a known event + try: + event = RealtimeEvents(message_type) + self._emit(event, data) + except ValueError: + # Unknown message type, ignore + pass + except json.JSONDecodeError as e: + self._emit(RealtimeEvents.ERROR, {"error": f"Failed to parse message: {e}"}) + except Exception as e: + self._emit(RealtimeEvents.ERROR, {"error": str(e)}) + finally: + self._emit(RealtimeEvents.CLOSE) + + async def send(self, data: typing.Dict[str, typing.Any]) -> None: + """ + Send an audio chunk to the server for transcription. + + Args: + data: Dictionary containing audio_base_64 key with base64-encoded audio + + Raises: + RuntimeError: If the WebSocket connection is not open + + Example: + ```python + # Send audio chunk + connection.send({ + "audio_base_64": base64_encoded_audio + }) + ``` + """ + if not self.websocket: + raise RuntimeError("WebSocket is not connected") + + message = { + "message_type": "input_audio_chunk", + "audio_base_64": data.get("audio_base_64", ""), + "commit": False, + "sample_rate": self.current_sample_rate, + } + + await self.websocket.send(json.dumps(message)) + + async def commit(self) -> None: + """ + Commits the transcription, signaling that all audio has been sent. + This finalizes the transcription and triggers a FINAL_TRANSCRIPT event. + + Raises: + RuntimeError: If the WebSocket connection is not open + + Remarks: + Only needed when using CommitStrategy.MANUAL. + When using CommitStrategy.VAD, commits are handled automatically by the server. + + Example: + ```python + # Send all audio chunks + for chunk in audio_chunks: + connection.send({"audioBase64": chunk}) + + # Finalize the transcription + await connection.commit() + ``` + """ + if not self.websocket: + raise RuntimeError("WebSocket is not connected") + + message = { + "message_type": "input_audio_chunk", + "audio_base_64": "", + "commit": True, + "sample_rate": self.current_sample_rate, + } + + await self.websocket.send(json.dumps(message)) + + async def close(self) -> None: + """ + Closes the WebSocket connection and cleans up resources. + This will terminate any ongoing transcription and stop ffmpeg processes if running. + + Remarks: + After calling close(), this connection cannot be reused. + Create a new connection if you need to start transcribing again. + + Example: + ```python + connection.on(RealtimeEvents.FINAL_TRANSCRIPT, async lambda data: ( + print("Final:", data["transcript"]), + await connection.close() + )) + ``` + """ + await self._cleanup() + if self.websocket: + await self.websocket.close() + if self._message_task and not self._message_task.done(): + self._message_task.cancel() + try: + await self._message_task + except asyncio.CancelledError: + pass + + async def _cleanup(self) -> None: + """Clean up resources like ffmpeg processes""" + if self.ffmpeg_process: + self.ffmpeg_process.kill() + try: + self.ffmpeg_process.wait(timeout=1) + except subprocess.TimeoutExpired: + self.ffmpeg_process.kill() + self.ffmpeg_process = None + diff --git a/src/elevenlabs/realtime/scribe.py b/src/elevenlabs/realtime/scribe.py new file mode 100644 index 00000000..70e3be84 --- /dev/null +++ b/src/elevenlabs/realtime/scribe.py @@ -0,0 +1,360 @@ +import asyncio +import base64 +import subprocess +import typing +from enum import Enum + +try: + import websockets +except ImportError: + raise ImportError( + "The websockets package is required for realtime speech-to-text. " + "Install it with: pip install websockets" + ) + +from .connection import RealtimeConnection + + +class AudioFormat(str, Enum): + """Audio format options for realtime transcription""" + PCM_16000 = "pcm_16000" + PCM_22050 = "pcm_22050" + PCM_24000 = "pcm_24000" + PCM_44100 = "pcm_44100" + + +class CommitStrategy(str, Enum): + """ + Strategy for committing transcription results. + + VAD: Voice Activity Detection - automatically commits when speech ends + MANUAL: Manual commit - requires calling commit() to finalize transcription + """ + VAD = "vad" + MANUAL = "manual" + + +class RealtimeAudioOptions(typing.TypedDict, total=False): + """ + Options for providing audio chunks manually. + + Attributes: + model_id: The model ID to use for transcription (required) + audio_format: The audio format (required) + sample_rate: The sample rate in Hz (required) + commit_strategy: Strategy for committing transcriptions (optional, defaults to MANUAL) + vad_silence_threshold_secs: Silence threshold in seconds for VAD (must be between 0.3 and 3.0) + vad_threshold: Threshold for voice activity detection (must be between 0.1 and 0.9) + min_speech_duration_ms: Minimum speech duration in milliseconds (must be between 50 and 2000) + min_silence_duration_ms: Minimum silence duration in milliseconds (must be between 50 and 2000) + """ + model_id: str + audio_format: AudioFormat + sample_rate: int + commit_strategy: CommitStrategy + vad_silence_threshold_secs: float + vad_threshold: float + min_speech_duration_ms: int + min_silence_duration_ms: int + + +class RealtimeUrlOptions(typing.TypedDict, total=False): + """ + Options for streaming audio from a URL. + + Attributes: + model_id: The model ID to use for transcription (required) + url: The URL of the audio stream (required) + commit_strategy: Strategy for committing transcriptions (optional, defaults to MANUAL) + vad_silence_threshold_secs: Silence threshold in seconds for VAD (must be between 0.3 and 3.0) + vad_threshold: Threshold for voice activity detection (must be between 0.1 and 0.9) + min_speech_duration_ms: Minimum speech duration in milliseconds (must be between 50 and 2000) + min_silence_duration_ms: Minimum silence duration in milliseconds (must be between 50 and 2000) + """ + model_id: str + url: str + commit_strategy: CommitStrategy + vad_silence_threshold_secs: float + vad_threshold: float + min_speech_duration_ms: int + min_silence_duration_ms: int + + +class ScribeRealtime: + """ + Helper class for creating realtime speech-to-text connections. + + Supports two modes: + 1. URL-based: Stream audio from a URL (uses ffmpeg for conversion) + 2. Manual: Send audio chunks yourself + + Example (URL-based): + ```python + connection = await elevenlabs.speech_to_text.realtime.connect({ + "model_id": "scribe_realtime_v2", + "url": "https://stream.example.com/audio.mp3" + }) + ``` + + Example (Manual chunks): + ```python + connection = await elevenlabs.speech_to_text.realtime.connect({ + "model_id": "scribe_realtime_v2", + "audio_format": AudioFormat.PCM_16000, + "sample_rate": 16000 + }) + + # Send audio chunks + await connection.send({"audio_base_64": chunk}) + ``` + """ + + def __init__(self, api_key: str, base_url: str = "wss://api.elevenlabs.io"): + self.api_key = api_key + self.base_url = base_url + + async def connect( + self, + options: typing.Union[RealtimeAudioOptions, RealtimeUrlOptions] + ) -> RealtimeConnection: + """ + Create a realtime transcription connection. + + Args: + options: Either RealtimeAudioOptions for manual chunk sending or RealtimeUrlOptions for URL streaming + + Returns: + RealtimeConnection instance ready to send/receive data + + Raises: + ValueError: If invalid options are provided + RuntimeError: If ffmpeg is not available (for URL-based streaming) + + Example: + ```python + # URL-based streaming + connection = await elevenlabs.speech_to_text.realtime.connect({ + "model_id": "scribe_realtime_v2", + "url": "https://stream.example.com/audio.mp3", + }) + + # Manual chunks + connection = await elevenlabs.speech_to_text.realtime.connect({ + "model_id": "scribe_realtime_v2", + "audio_format": AudioFormat.PCM_16000, + "sample_rate": 16000, + "commit_strategy": CommitStrategy.MANUAL + }) + ``` + """ + # Determine if this is URL-based or manual mode + is_url_mode = "url" in options + + if "model_id" not in options: + raise ValueError("model_id is required for realtime transcription") + + if is_url_mode: + return await self._connect_url(http://github.com/typing.cast(RealtimeUrlOptions,%20options)) + else: + return await self._connect_audio(typing.cast(RealtimeAudioOptions, options)) + + async def _connect_audio(self, options: RealtimeAudioOptions) -> RealtimeConnection: + """Connect with manual audio chunk sending""" + model_id = options["model_id"] + audio_format = options.get("audio_format") + sample_rate = options.get("sample_rate") + commit_strategy = options.get("commit_strategy", CommitStrategy.MANUAL) + vad_silence_threshold_secs = options.get("vad_silence_threshold_secs") + vad_threshold = options.get("vad_threshold") + min_speech_duration_ms = options.get("min_speech_duration_ms") + min_silence_duration_ms = options.get("min_silence_duration_ms") + + if not audio_format or not sample_rate: + raise ValueError("audio_format and sample_rate are required for manual audio mode") + + # Build WebSocket URL with query parameters + ws_url = self._build_websocket_url( + model_id=model_id, + encoding=audio_format.value, + sample_rate=sample_rate, + commit_strategy=commit_strategy.value, + vad_silence_threshold_secs=vad_silence_threshold_secs, + vad_threshold=vad_threshold, + min_speech_duration_ms=min_speech_duration_ms, + min_silence_duration_ms=min_silence_duration_ms + ) + + # Connect to WebSocket + websocket = await websockets.connect( + ws_url, + additional_headers={"xi-api-key": self.api_key} + ) + + # Create connection object + connection = RealtimeConnection( + websocket=websocket, + current_sample_rate=sample_rate, + ffmpeg_process=None + ) + + # Start message handler + connection._message_task = asyncio.create_task(connection._start_message_handler()) + connection._emit("open") + + return connection + + async def _connect_url(http://github.com/self,%20options:%20RealtimeUrlOptions) -> RealtimeConnection: + """Connect with URL-based audio streaming using ffmpeg""" + model_id = options["model_id"] + url = options.get("url") + commit_strategy = options.get("commit_strategy", CommitStrategy.MANUAL) + vad_silence_threshold_secs = options.get("vad_silence_threshold_secs") + vad_threshold = options.get("vad_threshold") + min_speech_duration_ms = options.get("min_speech_duration_ms") + min_silence_duration_ms = options.get("min_silence_duration_ms") + + if not url: + raise ValueError("url is required for URL mode") + + # Default to 16kHz for URL streaming + sample_rate = 16000 + encoding = "pcm_16000" + + # Build WebSocket URL + ws_url = self._build_websocket_url( + model_id=model_id, + encoding=encoding, + sample_rate=sample_rate, + commit_strategy=commit_strategy.value, + vad_silence_threshold_secs=vad_silence_threshold_secs, + vad_threshold=vad_threshold, + min_speech_duration_ms=min_speech_duration_ms, + min_silence_duration_ms=min_silence_duration_ms + ) + + # Connect to WebSocket + websocket = await websockets.connect( + ws_url, + additional_headers={"xi-api-key": self.api_key} + ) + + # Start ffmpeg process to convert stream to PCM + try: + ffmpeg_process = subprocess.Popen( + [ + "ffmpeg", + "-i", url, + "-f", "s16le", + "-ar", str(sample_rate), + "-ac", "1", + "-" + ], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + bufsize=0 + ) + except FileNotFoundError: + await websocket.close() + raise RuntimeError( + "ffmpeg is required for URL-based audio streaming. " + "Please install ffmpeg: https://ffmpeg.org/download.html" + ) + + # Create connection object + connection = RealtimeConnection( + websocket=websocket, + current_sample_rate=sample_rate, + ffmpeg_process=ffmpeg_process + ) + + # Start message handler + connection._message_task = asyncio.create_task(connection._start_message_handler()) + connection._emit("open") + + # Start streaming audio from ffmpeg to websocket + asyncio.create_task(self._stream_ffmpeg_to_websocket(connection)) + + return connection + + async def _stream_ffmpeg_to_websocket(self, connection: RealtimeConnection) -> None: + """Stream audio from ffmpeg process to WebSocket""" + if not connection.ffmpeg_process or not connection.ffmpeg_process.stdout: + return + + try: + # Read chunks from ffmpeg and send to websocket + chunk_size = 8192 # 8KB chunks + + loop = asyncio.get_event_loop() + + while True: + # Read from ffmpeg stdout in a non-blocking way + chunk = await loop.run_in_executor( + None, + connection.ffmpeg_process.stdout.read, + chunk_size + ) + + if not chunk: + # Stream ended + break + + # Convert to base64 and send + chunk_base64 = base64.b64encode(chunk).decode('utf-8') + + try: + await connection.send({"audio_base_64": chunk_base64}) + except Exception as e: + connection._emit("error", {"error": f"Failed to send audio: {e}"}) + break + + # Small delay to prevent overwhelming the connection + await asyncio.sleep(0.01) + + except Exception as e: + connection._emit("error", {"error": f"FFmpeg streaming error: {e}"}) + finally: + # Clean up ffmpeg process + if connection.ffmpeg_process: + connection.ffmpeg_process.kill() + try: + connection.ffmpeg_process.wait(timeout=1) + except subprocess.TimeoutExpired: + connection.ffmpeg_process.kill() + + def _build_websocket_url( + self, + model_id: str, + encoding: str, + sample_rate: int, + commit_strategy: str, + vad_silence_threshold_secs: typing.Optional[float] = None, + vad_threshold: typing.Optional[float] = None, + min_speech_duration_ms: typing.Optional[int] = None, + min_silence_duration_ms: typing.Optional[int] = None + ) -> str: + """Build the WebSocket URL with query parameters""" + # Extract base domain + base = self.base_url.replace("https://", "wss://").replace("http://", "ws://") + + # Build query parameters + params = [ + f"model_id={model_id}", + f"encoding={encoding}", + f"sample_rate={sample_rate}", + f"commit_strategy={commit_strategy}" + ] + + # Add optional VAD parameters + if vad_silence_threshold_secs is not None: + params.append(f"vad_silence_threshold_secs={vad_silence_threshold_secs}") + if vad_threshold is not None: + params.append(f"vad_threshold={vad_threshold}") + if min_speech_duration_ms is not None: + params.append(f"min_speech_duration_ms={min_speech_duration_ms}") + if min_silence_duration_ms is not None: + params.append(f"min_silence_duration_ms={min_silence_duration_ms}") + + query_string = "&".join(params) + return f"{base}/v1/speech-to-text/realtime-beta?{query_string}" + diff --git a/src/elevenlabs/speech_to_text_custom.py b/src/elevenlabs/speech_to_text_custom.py new file mode 100644 index 00000000..45013c06 --- /dev/null +++ b/src/elevenlabs/speech_to_text_custom.py @@ -0,0 +1,100 @@ +import typing + +from elevenlabs.speech_to_text.client import SpeechToTextClient as AutogeneratedSpeechToTextClient +from elevenlabs.speech_to_text.client import AsyncSpeechToTextClient as AutogeneratedAsyncSpeechToTextClient +from elevenlabs.realtime import ScribeRealtime + + +class SpeechToTextClient(AutogeneratedSpeechToTextClient): + """ + A client to handle ElevenLabs speech-to-text functionality. + Extends the autogenerated client to include realtime transcription. + """ + + def __init__(self, **kwargs: typing.Any) -> None: + super().__init__(**kwargs) + self._realtime: typing.Optional[ScribeRealtime] = None + + @property + def realtime(self) -> ScribeRealtime: + """ + Access the realtime speech-to-text transcription API. + + Returns: + ScribeRealtime instance for creating WebSocket connections + + Example: + ```python + from elevenlabs import ElevenLabs, RealtimeEvents, AudioFormat + + client = ElevenLabs(api_key="your-api-key") + + # URL-based streaming + connection = await client.speech_to_text.realtime.connect({ + "url": "https://stream.example.com/audio.mp3" + }) + + connection.on(RealtimeEvents.PARTIAL_TRANSCRIPT, lambda data: print(data)) + + # Manual audio chunks + connection = await client.speech_to_text.realtime.connect({ + "audio_format": AudioFormat.PCM_16000, + "sample_rate": 16000 + }) + ``` + """ + if not self._realtime: + # Extract API key from client wrapper + api_key = self._client_wrapper.get_headers().get("xi-api-key", "") + base_url = self._client_wrapper.get_base_url() + + self._realtime = ScribeRealtime(api_key=api_key, base_url=base_url) + return self._realtime + + +class AsyncSpeechToTextClient(AutogeneratedAsyncSpeechToTextClient): + """ + An async client to handle ElevenLabs speech-to-text functionality. + Extends the autogenerated async client to include realtime transcription. + """ + + def __init__(self, **kwargs: typing.Any) -> None: + super().__init__(**kwargs) + self._realtime: typing.Optional[ScribeRealtime] = None + + @property + def realtime(self) -> ScribeRealtime: + """ + Access the realtime speech-to-text transcription API. + + Returns: + ScribeRealtime instance for creating WebSocket connections + + Example: + ```python + from elevenlabs import AsyncElevenLabs, RealtimeEvents, AudioFormat + + client = AsyncElevenLabs(api_key="your-api-key") + + # URL-based streaming + connection = await client.speech_to_text.realtime.connect({ + "url": "https://stream.example.com/audio.mp3" + }) + + connection.on(RealtimeEvents.PARTIAL_TRANSCRIPT, lambda data: print(data)) + + # Manual audio chunks + connection = await client.speech_to_text.realtime.connect({ + "audio_format": AudioFormat.PCM_16000, + "sample_rate": 16000 + }) + ``` + """ + if not self._realtime: + # Extract API key from client wrapper + api_key = self._client_wrapper.get_headers().get("xi-api-key", "") + base_url = self._client_wrapper.get_base_url() + + self._realtime = ScribeRealtime(api_key=api_key, base_url=base_url) + return self._realtime + From 4e7745987dab79c8addc342d26e6ad10c6ed2dae Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 16:31:59 +0200 Subject: [PATCH 25/34] SDK regeneration (#651) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 27 ++++++--- src/elevenlabs/__init__.py | 57 +++---------------- .../conversational_ai/agents/client.py | 38 ++++++------- .../conversational_ai/agents/raw_client.py | 34 ++++------- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/studio/client.py | 12 ++++ src/elevenlabs/studio/raw_client.py | 10 ++++ src/elevenlabs/types/__init__.py | 47 +++------------ .../types/agent_definition_source.py | 5 ++ .../types/agent_summary_response_model.py | 5 ++ .../types/client_tool_config_input.py | 6 ++ .../types/client_tool_config_output.py | 6 ++ ...versation_history_metadata_common_model.py | 5 ++ .../types/create_agent_response_model.py | 10 ---- .../types/get_agent_response_model.py | 5 -- .../types/project_extended_response.py | 5 ++ src/elevenlabs/types/project_response.py | 5 ++ ...prompt_agent_api_model_input_tools_item.py | 3 + ...rompt_agent_api_model_output_tools_item.py | 3 + ...odel_workflow_override_input_tools_item.py | 3 + ...del_workflow_override_output_tools_item.py | 3 + src/elevenlabs/types/tool_execution_mode.py | 5 ++ .../types/tool_request_model_tool_config.py | 3 + .../types/tool_response_model_tool_config.py | 3 + .../types/webhook_tool_config_input.py | 6 ++ .../types/webhook_tool_config_output.py | 6 ++ .../types/whats_app_business_account.py | 22 ------- ...whats_app_business_account_changes_item.py | 44 -------------- src/elevenlabs/types/whats_app_call.py | 30 ---------- .../types/whats_app_call_direction.py | 5 -- src/elevenlabs/types/whats_app_calls.py | 23 -------- .../types/whats_app_change_calls.py | 21 ------- .../types/whats_app_change_messages.py | 18 ------ ...data.py => whats_app_conversation_info.py} | 5 +- .../types/whats_app_event_request.py | 22 ------- src/elevenlabs/types/whats_app_session.py | 21 ------- 37 files changed, 164 insertions(+), 365 deletions(-) create mode 100644 src/elevenlabs/types/agent_definition_source.py create mode 100644 src/elevenlabs/types/tool_execution_mode.py delete mode 100644 src/elevenlabs/types/whats_app_business_account.py delete mode 100644 src/elevenlabs/types/whats_app_business_account_changes_item.py delete mode 100644 src/elevenlabs/types/whats_app_call.py delete mode 100644 src/elevenlabs/types/whats_app_call_direction.py delete mode 100644 src/elevenlabs/types/whats_app_calls.py delete mode 100644 src/elevenlabs/types/whats_app_change_calls.py delete mode 100644 src/elevenlabs/types/whats_app_change_messages.py rename src/elevenlabs/types/{whats_app_metadata.py => whats_app_conversation_info.py} (81%) delete mode 100644 src/elevenlabs/types/whats_app_event_request.py delete mode 100644 src/elevenlabs/types/whats_app_session.py diff --git a/pyproject.toml b/pyproject.toml index 62dbf786..4c79f1ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.18.0" +version = "v2.19.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 1a0e0e8f..65bfbeed 100644 --- a/reference.md +++ b/reference.md @@ -3668,6 +3668,7 @@ client = ElevenLabs( api_key="YOUR_API_KEY", ) client.studio.create_podcast( + safety_identifier="safety-identifier", model_id="eleven_multilingual_v2", mode=BodyCreatePodcastV1StudioPodcastsPostMode_Conversation( conversation=PodcastConversationModeData( @@ -3718,6 +3719,14 @@ client.studio.create_podcast(
+**safety_identifier:** `typing.Optional[str]` — Used for moderation. Your workspace must be allowlisted to use this feature. + +
+
+ +
+
+ **quality_preset:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]` Output quality of the generated audio. Must be one of: @@ -7243,7 +7252,6 @@ client = ElevenLabs( ) client.conversational_ai.agents.get( agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", - version_id="version_id", ) ``` @@ -7268,14 +7276,6 @@ client.conversational_ai.agents.get(
-**version_id:** `typing.Optional[str]` — The ID of the agent version to use - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7503,6 +7503,7 @@ client = ElevenLabs( client.conversational_ai.agents.list( page_size=1, search="search", + archived=True, sort_direction="asc", sort_by="name", cursor="cursor", @@ -7538,6 +7539,14 @@ client.conversational_ai.agents.list(
+**archived:** `typing.Optional[bool]` — Filter agents by archived status + +
+
+ +
+
+ **sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 50ffc948..a3ec4258 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -29,6 +29,7 @@ AgentConfigOverrideConfig, AgentConfigOverrideInput, AgentConfigOverrideOutput, + AgentDefinitionSource, AgentFailureResponseExample, AgentMetadata, AgentMetadataResponseModel, @@ -1136,6 +1137,7 @@ TokenResponseModel, Tool, ToolAnnotations, + ToolExecutionMode, ToolMockConfig, ToolRequestModel, ToolRequestModelToolConfig, @@ -1239,18 +1241,7 @@ WebhookUsageType, WebsocketTtsClientMessageMulti, WebsocketTtsServerMessageMulti, - WhatsAppBusinessAccount, - WhatsAppBusinessAccountChangesItem, - WhatsAppBusinessAccountChangesItem_Calls, - WhatsAppBusinessAccountChangesItem_Messages, - WhatsAppCall, - WhatsAppCallDirection, - WhatsAppCalls, - WhatsAppChangeCalls, - WhatsAppChangeMessages, - WhatsAppEventRequest, - WhatsAppMetadata, - WhatsAppSession, + WhatsAppConversationInfo, WidgetConfig, WidgetConfigInputAvatar, WidgetConfigInputAvatar_Image, @@ -1514,6 +1505,7 @@ "AgentConfigOverrideConfig": ".types", "AgentConfigOverrideInput": ".types", "AgentConfigOverrideOutput": ".types", + "AgentDefinitionSource": ".types", "AgentFailureResponseExample": ".types", "AgentMetadata": ".types", "AgentMetadataResponseModel": ".types", @@ -2684,6 +2676,7 @@ "TooEarlyError": ".errors", "Tool": ".types", "ToolAnnotations": ".types", + "ToolExecutionMode": ".types", "ToolMockConfig": ".types", "ToolRequestModel": ".types", "ToolRequestModelToolConfig": ".types", @@ -2791,18 +2784,7 @@ "WebhookUsageType": ".types", "WebsocketTtsClientMessageMulti": ".types", "WebsocketTtsServerMessageMulti": ".types", - "WhatsAppBusinessAccount": ".types", - "WhatsAppBusinessAccountChangesItem": ".types", - "WhatsAppBusinessAccountChangesItem_Calls": ".types", - "WhatsAppBusinessAccountChangesItem_Messages": ".types", - "WhatsAppCall": ".types", - "WhatsAppCallDirection": ".types", - "WhatsAppCalls": ".types", - "WhatsAppChangeCalls": ".types", - "WhatsAppChangeMessages": ".types", - "WhatsAppEventRequest": ".types", - "WhatsAppMetadata": ".types", - "WhatsAppSession": ".types", + "WhatsAppConversationInfo": ".types", "WidgetConfig": ".types", "WidgetConfigInputAvatar": ".types", "WidgetConfigInputAvatar_Image": ".types", @@ -2960,12 +2942,6 @@ "voices": ".voices", "webhooks": ".webhooks", "workspace": ".workspace", - "RealtimeConnection": ".realtime", - "RealtimeEvents": ".realtime", - "AudioFormat": ".realtime", - "CommitStrategy": ".realtime", - "RealtimeAudioOptions": ".realtime", - "RealtimeUrlOptions": ".realtime", } @@ -2994,8 +2970,6 @@ def __dir__(): "AddChapterResponseModel", "AddKnowledgeBaseResponseModel", "AddProjectRequest", - "AudioFormat", - "RealtimeAudioOptions", "AddProjectResponseModel", "AddPronunciationDictionaryResponseModel", "AddPronunciationDictionaryResponseModelPermissionOnResource", @@ -3015,6 +2989,7 @@ def __dir__(): "AgentConfigOverrideConfig", "AgentConfigOverrideInput", "AgentConfigOverrideOutput", + "AgentDefinitionSource", "AgentFailureResponseExample", "AgentMetadata", "AgentMetadataResponseModel", @@ -3570,7 +3545,6 @@ def __dir__(): "ClientEvent", "ClientToolConfigInput", "ClientToolConfigOutput", - "CommitStrategy", "CloseConnection", "CloseContext", "CloseSocket", @@ -4049,8 +4023,6 @@ def __dir__(): "RagRetrievalInfo", "ReaderResourceResponseModel", "ReaderResourceResponseModelResourceType", - "RealtimeConnection", - "RealtimeEvents", "RealtimeVoiceSettings", "ReceiveMessage", "ReceiveMessageMulti", @@ -4188,6 +4160,7 @@ def __dir__(): "TooEarlyError", "Tool", "ToolAnnotations", + "ToolExecutionMode", "ToolMockConfig", "ToolRequestModel", "ToolRequestModelToolConfig", @@ -4249,7 +4222,6 @@ def __dir__(): "UpdatePronunciationDictionariesRequest", "UpdateWorkspaceMemberResponseModel", "UrlAvatar", - "RealtimeUrlOptions", "UsageAggregationInterval", "UsageCharactersResponseModel", "User", @@ -4296,18 +4268,7 @@ def __dir__(): "WebhookUsageType", "WebsocketTtsClientMessageMulti", "WebsocketTtsServerMessageMulti", - "WhatsAppBusinessAccount", - "WhatsAppBusinessAccountChangesItem", - "WhatsAppBusinessAccountChangesItem_Calls", - "WhatsAppBusinessAccountChangesItem_Messages", - "WhatsAppCall", - "WhatsAppCallDirection", - "WhatsAppCalls", - "WhatsAppChangeCalls", - "WhatsAppChangeMessages", - "WhatsAppEventRequest", - "WhatsAppMetadata", - "WhatsAppSession", + "WhatsAppConversationInfo", "WidgetConfig", "WidgetConfigInputAvatar", "WidgetConfigInputAvatar_Image", diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py index 5535c66e..4d00fd01 100644 --- a/src/elevenlabs/conversational_ai/agents/client.py +++ b/src/elevenlabs/conversational_ai/agents/client.py @@ -110,13 +110,7 @@ def create( ) return _response.data - def get( - self, - agent_id: str, - *, - version_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> GetAgentResponseModel: + def get(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetAgentResponseModel: """ Retrieve config for an agent @@ -125,9 +119,6 @@ def get( agent_id : str The id of an agent. This is returned on agent creation. - version_id : typing.Optional[str] - The ID of the agent version to use - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -145,10 +136,9 @@ def get( ) client.conversational_ai.agents.get( agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", - version_id="version_id", ) """ - _response = self._raw_client.get(agent_id, version_id=version_id, request_options=request_options) + _response = self._raw_client.get(agent_id, request_options=request_options) return _response.data def delete(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: @@ -250,6 +240,7 @@ def list( *, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + archived: typing.Optional[bool] = None, sort_direction: typing.Optional[SortDirection] = None, sort_by: typing.Optional[AgentSortBy] = None, cursor: typing.Optional[str] = None, @@ -266,6 +257,9 @@ def list( search : typing.Optional[str] Search by agents name. + archived : typing.Optional[bool] + Filter agents by archived status + sort_direction : typing.Optional[SortDirection] The direction to sort the results @@ -293,6 +287,7 @@ def list( client.conversational_ai.agents.list( page_size=1, search="search", + archived=True, sort_direction="asc", sort_by="name", cursor="cursor", @@ -301,6 +296,7 @@ def list( _response = self._raw_client.list( page_size=page_size, search=search, + archived=archived, sort_direction=sort_direction, sort_by=sort_by, cursor=cursor, @@ -649,11 +645,7 @@ async def main() -> None: return _response.data async def get( - self, - agent_id: str, - *, - version_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, + self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetAgentResponseModel: """ Retrieve config for an agent @@ -663,9 +655,6 @@ async def get( agent_id : str The id of an agent. This is returned on agent creation. - version_id : typing.Optional[str] - The ID of the agent version to use - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -688,13 +677,12 @@ async def get( async def main() -> None: await client.conversational_ai.agents.get( agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", - version_id="version_id", ) asyncio.run(main()) """ - _response = await self._raw_client.get(agent_id, version_id=version_id, request_options=request_options) + _response = await self._raw_client.get(agent_id, request_options=request_options) return _response.data async def delete(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: @@ -812,6 +800,7 @@ async def list( *, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + archived: typing.Optional[bool] = None, sort_direction: typing.Optional[SortDirection] = None, sort_by: typing.Optional[AgentSortBy] = None, cursor: typing.Optional[str] = None, @@ -828,6 +817,9 @@ async def list( search : typing.Optional[str] Search by agents name. + archived : typing.Optional[bool] + Filter agents by archived status + sort_direction : typing.Optional[SortDirection] The direction to sort the results @@ -860,6 +852,7 @@ async def main() -> None: await client.conversational_ai.agents.list( page_size=1, search="search", + archived=True, sort_direction="asc", sort_by="name", cursor="cursor", @@ -871,6 +864,7 @@ async def main() -> None: _response = await self._raw_client.list( page_size=page_size, search=search, + archived=archived, sort_direction=sort_direction, sort_by=sort_by, cursor=cursor, diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py index 7be38754..0ce5e718 100644 --- a/src/elevenlabs/conversational_ai/agents/raw_client.py +++ b/src/elevenlabs/conversational_ai/agents/raw_client.py @@ -122,11 +122,7 @@ def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def get( - self, - agent_id: str, - *, - version_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, + self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetAgentResponseModel]: """ Retrieve config for an agent @@ -136,9 +132,6 @@ def get( agent_id : str The id of an agent. This is returned on agent creation. - version_id : typing.Optional[str] - The ID of the agent version to use - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -150,9 +143,6 @@ def get( _response = self._client_wrapper.httpx_client.request( f"v1/convai/agents/{jsonable_encoder(agent_id)}", method="GET", - params={ - "version_id": version_id, - }, request_options=request_options, ) try: @@ -316,6 +306,7 @@ def list( *, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + archived: typing.Optional[bool] = None, sort_direction: typing.Optional[SortDirection] = None, sort_by: typing.Optional[AgentSortBy] = None, cursor: typing.Optional[str] = None, @@ -332,6 +323,9 @@ def list( search : typing.Optional[str] Search by agents name. + archived : typing.Optional[bool] + Filter agents by archived status + sort_direction : typing.Optional[SortDirection] The direction to sort the results @@ -355,6 +349,7 @@ def list( params={ "page_size": page_size, "search": search, + "archived": archived, "sort_direction": sort_direction, "sort_by": sort_by, "cursor": cursor, @@ -770,11 +765,7 @@ async def create( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def get( - self, - agent_id: str, - *, - version_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, + self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetAgentResponseModel]: """ Retrieve config for an agent @@ -784,9 +775,6 @@ async def get( agent_id : str The id of an agent. This is returned on agent creation. - version_id : typing.Optional[str] - The ID of the agent version to use - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -798,9 +786,6 @@ async def get( _response = await self._client_wrapper.httpx_client.request( f"v1/convai/agents/{jsonable_encoder(agent_id)}", method="GET", - params={ - "version_id": version_id, - }, request_options=request_options, ) try: @@ -966,6 +951,7 @@ async def list( *, page_size: typing.Optional[int] = None, search: typing.Optional[str] = None, + archived: typing.Optional[bool] = None, sort_direction: typing.Optional[SortDirection] = None, sort_by: typing.Optional[AgentSortBy] = None, cursor: typing.Optional[str] = None, @@ -982,6 +968,9 @@ async def list( search : typing.Optional[str] Search by agents name. + archived : typing.Optional[bool] + Filter agents by archived status + sort_direction : typing.Optional[SortDirection] The direction to sort the results @@ -1005,6 +994,7 @@ async def list( params={ "page_size": page_size, "search": search, + "archived": archived, "sort_direction": sort_direction, "sort_by": sort_by, "cursor": cursor, diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 2d58cd04..0e66a02e 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.18.0", + "User-Agent": "elevenlabs/v2.19.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.18.0", + "X-Fern-SDK-Version": "v2.19.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/studio/client.py b/src/elevenlabs/studio/client.py index 4be05414..33646f24 100644 --- a/src/elevenlabs/studio/client.py +++ b/src/elevenlabs/studio/client.py @@ -49,6 +49,7 @@ def create_podcast( model_id: str, mode: BodyCreatePodcastV1StudioPodcastsPostMode, source: BodyCreatePodcastV1StudioPodcastsPostSource, + safety_identifier: typing.Optional[str] = None, quality_preset: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] = OMIT, duration_scale: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale] = OMIT, language: typing.Optional[str] = OMIT, @@ -74,6 +75,9 @@ def create_podcast( source : BodyCreatePodcastV1StudioPodcastsPostSource The source content for the Podcast. + safety_identifier : typing.Optional[str] + Used for moderation. Your workspace must be allowlisted to use this feature. + quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] Output quality of the generated audio. Must be one of: standard - standard output format, 128kbps with 44.1kHz sample rate. @@ -190,6 +194,7 @@ def create_podcast( api_key="YOUR_API_KEY", ) client.studio.create_podcast( + safety_identifier="safety-identifier", model_id="eleven_multilingual_v2", mode=BodyCreatePodcastV1StudioPodcastsPostMode_Conversation( conversation=PodcastConversationModeData( @@ -206,6 +211,7 @@ def create_podcast( model_id=model_id, mode=mode, source=source, + safety_identifier=safety_identifier, quality_preset=quality_preset, duration_scale=duration_scale, language=language, @@ -251,6 +257,7 @@ async def create_podcast( model_id: str, mode: BodyCreatePodcastV1StudioPodcastsPostMode, source: BodyCreatePodcastV1StudioPodcastsPostSource, + safety_identifier: typing.Optional[str] = None, quality_preset: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] = OMIT, duration_scale: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale] = OMIT, language: typing.Optional[str] = OMIT, @@ -276,6 +283,9 @@ async def create_podcast( source : BodyCreatePodcastV1StudioPodcastsPostSource The source content for the Podcast. + safety_identifier : typing.Optional[str] + Used for moderation. Your workspace must be allowlisted to use this feature. + quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] Output quality of the generated audio. Must be one of: standard - standard output format, 128kbps with 44.1kHz sample rate. @@ -397,6 +407,7 @@ async def create_podcast( async def main() -> None: await client.studio.create_podcast( + safety_identifier="safety-identifier", model_id="eleven_multilingual_v2", mode=BodyCreatePodcastV1StudioPodcastsPostMode_Conversation( conversation=PodcastConversationModeData( @@ -416,6 +427,7 @@ async def main() -> None: model_id=model_id, mode=mode, source=source, + safety_identifier=safety_identifier, quality_preset=quality_preset, duration_scale=duration_scale, language=language, diff --git a/src/elevenlabs/studio/raw_client.py b/src/elevenlabs/studio/raw_client.py index 88f9018a..58079146 100644 --- a/src/elevenlabs/studio/raw_client.py +++ b/src/elevenlabs/studio/raw_client.py @@ -38,6 +38,7 @@ def create_podcast( model_id: str, mode: BodyCreatePodcastV1StudioPodcastsPostMode, source: BodyCreatePodcastV1StudioPodcastsPostSource, + safety_identifier: typing.Optional[str] = None, quality_preset: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] = OMIT, duration_scale: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale] = OMIT, language: typing.Optional[str] = OMIT, @@ -63,6 +64,9 @@ def create_podcast( source : BodyCreatePodcastV1StudioPodcastsPostSource The source content for the Podcast. + safety_identifier : typing.Optional[str] + Used for moderation. Your workspace must be allowlisted to use this feature. + quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] Output quality of the generated audio. Must be one of: standard - standard output format, 128kbps with 44.1kHz sample rate. @@ -187,6 +191,7 @@ def create_podcast( }, headers={ "content-type": "application/json", + "safety-identifier": str(safety_identifier) if safety_identifier is not None else None, }, request_options=request_options, omit=OMIT, @@ -228,6 +233,7 @@ async def create_podcast( model_id: str, mode: BodyCreatePodcastV1StudioPodcastsPostMode, source: BodyCreatePodcastV1StudioPodcastsPostSource, + safety_identifier: typing.Optional[str] = None, quality_preset: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] = OMIT, duration_scale: typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale] = OMIT, language: typing.Optional[str] = OMIT, @@ -253,6 +259,9 @@ async def create_podcast( source : BodyCreatePodcastV1StudioPodcastsPostSource The source content for the Podcast. + safety_identifier : typing.Optional[str] + Used for moderation. Your workspace must be allowlisted to use this feature. + quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset] Output quality of the generated audio. Must be one of: standard - standard output format, 128kbps with 44.1kHz sample rate. @@ -377,6 +386,7 @@ async def create_podcast( }, headers={ "content-type": "application/json", + "safety-identifier": str(safety_identifier) if safety_identifier is not None else None, }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 17e44f66..0ad93fb2 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -30,6 +30,7 @@ from .agent_config_override_config import AgentConfigOverrideConfig from .agent_config_override_input import AgentConfigOverrideInput from .agent_config_override_output import AgentConfigOverrideOutput + from .agent_definition_source import AgentDefinitionSource from .agent_failure_response_example import AgentFailureResponseExample from .agent_metadata import AgentMetadata from .agent_metadata_response_model import AgentMetadataResponseModel @@ -1321,6 +1322,7 @@ from .token_response_model import TokenResponseModel from .tool import Tool from .tool_annotations import ToolAnnotations + from .tool_execution_mode import ToolExecutionMode from .tool_mock_config import ToolMockConfig from .tool_request_model import ToolRequestModel from .tool_request_model_tool_config import ( @@ -1434,20 +1436,7 @@ from .webhook_usage_type import WebhookUsageType from .websocket_tts_client_message_multi import WebsocketTtsClientMessageMulti from .websocket_tts_server_message_multi import WebsocketTtsServerMessageMulti - from .whats_app_business_account import WhatsAppBusinessAccount - from .whats_app_business_account_changes_item import ( - WhatsAppBusinessAccountChangesItem, - WhatsAppBusinessAccountChangesItem_Calls, - WhatsAppBusinessAccountChangesItem_Messages, - ) - from .whats_app_call import WhatsAppCall - from .whats_app_call_direction import WhatsAppCallDirection - from .whats_app_calls import WhatsAppCalls - from .whats_app_change_calls import WhatsAppChangeCalls - from .whats_app_change_messages import WhatsAppChangeMessages - from .whats_app_event_request import WhatsAppEventRequest - from .whats_app_metadata import WhatsAppMetadata - from .whats_app_session import WhatsAppSession + from .whats_app_conversation_info import WhatsAppConversationInfo from .widget_config import WidgetConfig from .widget_config_input_avatar import ( WidgetConfigInputAvatar, @@ -1629,6 +1618,7 @@ "AgentConfigOverrideConfig": ".agent_config_override_config", "AgentConfigOverrideInput": ".agent_config_override_input", "AgentConfigOverrideOutput": ".agent_config_override_output", + "AgentDefinitionSource": ".agent_definition_source", "AgentFailureResponseExample": ".agent_failure_response_example", "AgentMetadata": ".agent_metadata", "AgentMetadataResponseModel": ".agent_metadata_response_model", @@ -2736,6 +2726,7 @@ "TokenResponseModel": ".token_response_model", "Tool": ".tool", "ToolAnnotations": ".tool_annotations", + "ToolExecutionMode": ".tool_execution_mode", "ToolMockConfig": ".tool_mock_config", "ToolRequestModel": ".tool_request_model", "ToolRequestModelToolConfig": ".tool_request_model_tool_config", @@ -2839,18 +2830,7 @@ "WebhookUsageType": ".webhook_usage_type", "WebsocketTtsClientMessageMulti": ".websocket_tts_client_message_multi", "WebsocketTtsServerMessageMulti": ".websocket_tts_server_message_multi", - "WhatsAppBusinessAccount": ".whats_app_business_account", - "WhatsAppBusinessAccountChangesItem": ".whats_app_business_account_changes_item", - "WhatsAppBusinessAccountChangesItem_Calls": ".whats_app_business_account_changes_item", - "WhatsAppBusinessAccountChangesItem_Messages": ".whats_app_business_account_changes_item", - "WhatsAppCall": ".whats_app_call", - "WhatsAppCallDirection": ".whats_app_call_direction", - "WhatsAppCalls": ".whats_app_calls", - "WhatsAppChangeCalls": ".whats_app_change_calls", - "WhatsAppChangeMessages": ".whats_app_change_messages", - "WhatsAppEventRequest": ".whats_app_event_request", - "WhatsAppMetadata": ".whats_app_metadata", - "WhatsAppSession": ".whats_app_session", + "WhatsAppConversationInfo": ".whats_app_conversation_info", "WidgetConfig": ".widget_config", "WidgetConfigInputAvatar": ".widget_config_input_avatar", "WidgetConfigInputAvatar_Image": ".widget_config_input_avatar", @@ -3026,6 +3006,7 @@ def __dir__(): "AgentConfigOverrideConfig", "AgentConfigOverrideInput", "AgentConfigOverrideOutput", + "AgentDefinitionSource", "AgentFailureResponseExample", "AgentMetadata", "AgentMetadataResponseModel", @@ -4133,6 +4114,7 @@ def __dir__(): "TokenResponseModel", "Tool", "ToolAnnotations", + "ToolExecutionMode", "ToolMockConfig", "ToolRequestModel", "ToolRequestModelToolConfig", @@ -4236,18 +4218,7 @@ def __dir__(): "WebhookUsageType", "WebsocketTtsClientMessageMulti", "WebsocketTtsServerMessageMulti", - "WhatsAppBusinessAccount", - "WhatsAppBusinessAccountChangesItem", - "WhatsAppBusinessAccountChangesItem_Calls", - "WhatsAppBusinessAccountChangesItem_Messages", - "WhatsAppCall", - "WhatsAppCallDirection", - "WhatsAppCalls", - "WhatsAppChangeCalls", - "WhatsAppChangeMessages", - "WhatsAppEventRequest", - "WhatsAppMetadata", - "WhatsAppSession", + "WhatsAppConversationInfo", "WidgetConfig", "WidgetConfigInputAvatar", "WidgetConfigInputAvatar_Image", diff --git a/src/elevenlabs/types/agent_definition_source.py b/src/elevenlabs/types/agent_definition_source.py new file mode 100644 index 00000000..59c2b9fe --- /dev/null +++ b/src/elevenlabs/types/agent_definition_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentDefinitionSource = typing.Union[typing.Literal["cli", "ui", "api", "unknown"], typing.Any] diff --git a/src/elevenlabs/types/agent_summary_response_model.py b/src/elevenlabs/types/agent_summary_response_model.py index e16af45d..d09eca0a 100644 --- a/src/elevenlabs/types/agent_summary_response_model.py +++ b/src/elevenlabs/types/agent_summary_response_model.py @@ -39,6 +39,11 @@ class AgentSummaryResponseModel(UncheckedBaseModel): The time of the most recent call in unix seconds, null if no calls have been made """ + archived: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the agent is archived + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/client_tool_config_input.py b/src/elevenlabs/types/client_tool_config_input.py index 6b3d46a5..e1292464 100644 --- a/src/elevenlabs/types/client_tool_config_input.py +++ b/src/elevenlabs/types/client_tool_config_input.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_execution_mode import ToolExecutionMode class ClientToolConfigInput(UncheckedBaseModel): @@ -57,6 +58,11 @@ class ClientToolConfigInput(UncheckedBaseModel): Configuration for dynamic variables """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/client_tool_config_output.py b/src/elevenlabs/types/client_tool_config_output.py index 39d7a0a4..3126e5cf 100644 --- a/src/elevenlabs/types/client_tool_config_output.py +++ b/src/elevenlabs/types/client_tool_config_output.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_execution_mode import ToolExecutionMode class ClientToolConfigOutput(UncheckedBaseModel): @@ -57,6 +58,11 @@ class ClientToolConfigOutput(UncheckedBaseModel): Configuration for dynamic variables """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/conversation_history_metadata_common_model.py b/src/elevenlabs/types/conversation_history_metadata_common_model.py index ecfa6f0d..36444c00 100644 --- a/src/elevenlabs/types/conversation_history_metadata_common_model.py +++ b/src/elevenlabs/types/conversation_history_metadata_common_model.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .agent_definition_source import AgentDefinitionSource from .async_conversation_metadata import AsyncConversationMetadata from .authorization_method import AuthorizationMethod from .conversation_charging_common_model import ConversationChargingCommonModel @@ -20,6 +21,7 @@ from .conversation_history_rag_usage_common_model import ConversationHistoryRagUsageCommonModel from .conversation_initiation_source import ConversationInitiationSource from .features_usage_common_model import FeaturesUsageCommonModel +from .whats_app_conversation_info import WhatsAppConversationInfo class ConversationHistoryMetadataCommonModel(UncheckedBaseModel): @@ -46,6 +48,9 @@ class ConversationHistoryMetadataCommonModel(UncheckedBaseModel): timezone: typing.Optional[str] = None initiation_trigger: typing.Optional[ConversationHistoryMetadataCommonModelInitiationTrigger] = None async_metadata: typing.Optional[AsyncConversationMetadata] = None + whatsapp: typing.Optional[WhatsAppConversationInfo] = None + agent_created_from: typing.Optional[AgentDefinitionSource] = None + agent_last_updated_from: typing.Optional[AgentDefinitionSource] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/create_agent_response_model.py b/src/elevenlabs/types/create_agent_response_model.py index 0bb4b437..3c66211d 100644 --- a/src/elevenlabs/types/create_agent_response_model.py +++ b/src/elevenlabs/types/create_agent_response_model.py @@ -13,16 +13,6 @@ class CreateAgentResponseModel(UncheckedBaseModel): ID of the created agent """ - main_branch_id: typing.Optional[str] = pydantic.Field(default=None) - """ - INTERNAL - """ - - initial_version_id: typing.Optional[str] = pydantic.Field(default=None) - """ - INTERNAL - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py index e42ab210..4dc41306 100644 --- a/src/elevenlabs/types/get_agent_response_model.py +++ b/src/elevenlabs/types/get_agent_response_model.py @@ -61,11 +61,6 @@ class GetAgentResponseModel(UncheckedBaseModel): Agent tags used to categorize the agent """ - version_id: typing.Optional[str] = pydantic.Field(default=None) - """ - INTERNAL - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/project_extended_response.py b/src/elevenlabs/types/project_extended_response.py index df64419b..7dc8d8d5 100644 --- a/src/elevenlabs/types/project_extended_response.py +++ b/src/elevenlabs/types/project_extended_response.py @@ -36,6 +36,11 @@ class ProjectExtendedResponse(UncheckedBaseModel): The creation date of the project. """ + created_by_user_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The user ID who created the project. + """ + default_title_voice_id: str = pydantic.Field() """ The default title voice ID. diff --git a/src/elevenlabs/types/project_response.py b/src/elevenlabs/types/project_response.py index 05bccb35..745fb424 100644 --- a/src/elevenlabs/types/project_response.py +++ b/src/elevenlabs/types/project_response.py @@ -31,6 +31,11 @@ class ProjectResponse(UncheckedBaseModel): The creation date of the project. """ + created_by_user_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The user ID who created the project. + """ + default_title_voice_id: str = pydantic.Field() """ The default title voice ID. diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index 718b1ff5..c3faf2f7 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -29,6 +30,7 @@ class PromptAgentApiModelInputToolsItem_Client(UncheckedBaseModel): parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class PromptAgentApiModelInputToolsItem_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index 143c47fb..50ea7aa2 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -29,6 +30,7 @@ class PromptAgentApiModelOutputToolsItem_Client(UncheckedBaseModel): parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class PromptAgentApiModelOutputToolsItem_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py index ad9809fa..eac23bbb 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -29,6 +30,7 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_Client(UncheckedBaseMode parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook(UncheckedBaseMod assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py index a3790e62..e21b8898 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -29,6 +30,7 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client(UncheckedBaseMod parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook(UncheckedBaseMo assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/tool_execution_mode.py b/src/elevenlabs/types/tool_execution_mode.py new file mode 100644 index 00000000..6626fa69 --- /dev/null +++ b/src/elevenlabs/types/tool_execution_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolExecutionMode = typing.Union[typing.Literal["immediate", "post_tool_speech", "async"], typing.Any] diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index db3bf8d0..4e0ea9ec 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -29,6 +30,7 @@ class ToolRequestModelToolConfig_Client(UncheckedBaseModel): parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class ToolRequestModelToolConfig_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index fe15742e..5965f879 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -11,6 +11,7 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -29,6 +30,7 @@ class ToolResponseModelToolConfig_Client(UncheckedBaseModel): parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -91,6 +93,7 @@ class ToolResponseModelToolConfig_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index bbd51412..29ddbd16 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -53,6 +54,11 @@ class WebhookToolConfigInput(UncheckedBaseModel): Configuration for dynamic variables """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index c9d94439..348b561b 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -9,6 +9,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -53,6 +54,11 @@ class WebhookToolConfigOutput(UncheckedBaseModel): Configuration for dynamic variables """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/whats_app_business_account.py b/src/elevenlabs/types/whats_app_business_account.py deleted file mode 100644 index 49a6f022..00000000 --- a/src/elevenlabs/types/whats_app_business_account.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .whats_app_business_account_changes_item import WhatsAppBusinessAccountChangesItem - - -class WhatsAppBusinessAccount(UncheckedBaseModel): - id: str - changes: typing.List[WhatsAppBusinessAccountChangesItem] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_business_account_changes_item.py b/src/elevenlabs/types/whats_app_business_account_changes_item.py deleted file mode 100644 index c0da244f..00000000 --- a/src/elevenlabs/types/whats_app_business_account_changes_item.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .whats_app_calls import WhatsAppCalls - - -class WhatsAppBusinessAccountChangesItem_Calls(UncheckedBaseModel): - field: typing.Literal["calls"] = "calls" - value: WhatsAppCalls - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class WhatsAppBusinessAccountChangesItem_Messages(UncheckedBaseModel): - field: typing.Literal["messages"] = "messages" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -WhatsAppBusinessAccountChangesItem = typing_extensions.Annotated[ - typing.Union[WhatsAppBusinessAccountChangesItem_Calls, WhatsAppBusinessAccountChangesItem_Messages], - UnionMetadata(discriminant="field"), -] diff --git a/src/elevenlabs/types/whats_app_call.py b/src/elevenlabs/types/whats_app_call.py deleted file mode 100644 index 00b54002..00000000 --- a/src/elevenlabs/types/whats_app_call.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.serialization import FieldMetadata -from ..core.unchecked_base_model import UncheckedBaseModel -from .whats_app_call_direction import WhatsAppCallDirection -from .whats_app_session import WhatsAppSession - - -class WhatsAppCall(UncheckedBaseModel): - id: str - event: str - from_: typing_extensions.Annotated[str, FieldMetadata(alias="from")] - to: str - direction: WhatsAppCallDirection - session: typing.Optional[WhatsAppSession] = None - status: typing.Optional[str] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_call_direction.py b/src/elevenlabs/types/whats_app_call_direction.py deleted file mode 100644 index d9fdbcea..00000000 --- a/src/elevenlabs/types/whats_app_call_direction.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -WhatsAppCallDirection = typing.Union[typing.Literal["USER_INITIATED", "BUSINESS_INITIATED"], typing.Any] diff --git a/src/elevenlabs/types/whats_app_calls.py b/src/elevenlabs/types/whats_app_calls.py deleted file mode 100644 index 74648906..00000000 --- a/src/elevenlabs/types/whats_app_calls.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .whats_app_call import WhatsAppCall -from .whats_app_metadata import WhatsAppMetadata - - -class WhatsAppCalls(UncheckedBaseModel): - metadata: WhatsAppMetadata - calls: typing.List[WhatsAppCall] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_change_calls.py b/src/elevenlabs/types/whats_app_change_calls.py deleted file mode 100644 index b35977c6..00000000 --- a/src/elevenlabs/types/whats_app_change_calls.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .whats_app_calls import WhatsAppCalls - - -class WhatsAppChangeCalls(UncheckedBaseModel): - value: WhatsAppCalls - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_change_messages.py b/src/elevenlabs/types/whats_app_change_messages.py deleted file mode 100644 index 06d999c5..00000000 --- a/src/elevenlabs/types/whats_app_change_messages.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class WhatsAppChangeMessages(UncheckedBaseModel): - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_metadata.py b/src/elevenlabs/types/whats_app_conversation_info.py similarity index 81% rename from src/elevenlabs/types/whats_app_metadata.py rename to src/elevenlabs/types/whats_app_conversation_info.py index 0501981a..7c25c2f9 100644 --- a/src/elevenlabs/types/whats_app_metadata.py +++ b/src/elevenlabs/types/whats_app_conversation_info.py @@ -7,8 +7,9 @@ from ..core.unchecked_base_model import UncheckedBaseModel -class WhatsAppMetadata(UncheckedBaseModel): - phone_number_id: str +class WhatsAppConversationInfo(UncheckedBaseModel): + whatsapp_business_account_id: str + whatsapp_user_id: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/whats_app_event_request.py b/src/elevenlabs/types/whats_app_event_request.py deleted file mode 100644 index f49555c3..00000000 --- a/src/elevenlabs/types/whats_app_event_request.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .whats_app_business_account import WhatsAppBusinessAccount - - -class WhatsAppEventRequest(UncheckedBaseModel): - object: typing.Literal["whatsapp_business_account"] = "whatsapp_business_account" - entry: typing.List[WhatsAppBusinessAccount] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/whats_app_session.py b/src/elevenlabs/types/whats_app_session.py deleted file mode 100644 index 61593643..00000000 --- a/src/elevenlabs/types/whats_app_session.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class WhatsAppSession(UncheckedBaseModel): - sdp_type: str - sdp: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow From 50e1fb2f52ae1142306738355d365a12a1356702 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Tue, 21 Oct 2025 17:55:38 +0200 Subject: [PATCH 26/34] Realtime scribe language code (#653) * Add language code * Bump version * fix --- pyproject.toml | 2 +- src/elevenlabs/core/client_wrapper.py | 4 ++-- src/elevenlabs/realtime/scribe.py | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c79f1ea..f42e0a83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.19.0" +version = "v2.19.1" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 0e66a02e..bcbc8d1b 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.19.0", + "User-Agent": "elevenlabs/v2.19.1", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.19.0", + "X-Fern-SDK-Version": "v2.19.1", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/realtime/scribe.py b/src/elevenlabs/realtime/scribe.py index 70e3be84..9294c632 100644 --- a/src/elevenlabs/realtime/scribe.py +++ b/src/elevenlabs/realtime/scribe.py @@ -47,6 +47,7 @@ class RealtimeAudioOptions(typing.TypedDict, total=False): vad_threshold: Threshold for voice activity detection (must be between 0.1 and 0.9) min_speech_duration_ms: Minimum speech duration in milliseconds (must be between 50 and 2000) min_silence_duration_ms: Minimum silence duration in milliseconds (must be between 50 and 2000) + language_code: An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. """ model_id: str audio_format: AudioFormat @@ -56,6 +57,7 @@ class RealtimeAudioOptions(typing.TypedDict, total=False): vad_threshold: float min_speech_duration_ms: int min_silence_duration_ms: int + language_code: str class RealtimeUrlOptions(typing.TypedDict, total=False): @@ -70,6 +72,7 @@ class RealtimeUrlOptions(typing.TypedDict, total=False): vad_threshold: Threshold for voice activity detection (must be between 0.1 and 0.9) min_speech_duration_ms: Minimum speech duration in milliseconds (must be between 50 and 2000) min_silence_duration_ms: Minimum silence duration in milliseconds (must be between 50 and 2000) + An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. """ model_id: str url: str @@ -78,6 +81,7 @@ class RealtimeUrlOptions(typing.TypedDict, total=False): vad_threshold: float min_speech_duration_ms: int min_silence_duration_ms: int + language_code: str class ScribeRealtime: @@ -168,6 +172,7 @@ async def _connect_audio(self, options: RealtimeAudioOptions) -> RealtimeConnect vad_threshold = options.get("vad_threshold") min_speech_duration_ms = options.get("min_speech_duration_ms") min_silence_duration_ms = options.get("min_silence_duration_ms") + language_code = options.get("language_code") if not audio_format or not sample_rate: raise ValueError("audio_format and sample_rate are required for manual audio mode") @@ -181,7 +186,8 @@ async def _connect_audio(self, options: RealtimeAudioOptions) -> RealtimeConnect vad_silence_threshold_secs=vad_silence_threshold_secs, vad_threshold=vad_threshold, min_speech_duration_ms=min_speech_duration_ms, - min_silence_duration_ms=min_silence_duration_ms + min_silence_duration_ms=min_silence_duration_ms, + language_code=language_code, ) # Connect to WebSocket @@ -212,6 +218,7 @@ async def _connect_url(http://github.com/self,%20options:%20RealtimeUrlOptions) -> RealtimeConnection: vad_threshold = options.get("vad_threshold") min_speech_duration_ms = options.get("min_speech_duration_ms") min_silence_duration_ms = options.get("min_silence_duration_ms") + language_code = options.get("language_code") if not url: raise ValueError("url is required for URL mode") @@ -229,7 +236,8 @@ async def _connect_url(http://github.com/self,%20options:%20RealtimeUrlOptions) -> RealtimeConnection: vad_silence_threshold_secs=vad_silence_threshold_secs, vad_threshold=vad_threshold, min_speech_duration_ms=min_speech_duration_ms, - min_silence_duration_ms=min_silence_duration_ms + min_silence_duration_ms=min_silence_duration_ms, + language_code=language_code, ) # Connect to WebSocket @@ -331,7 +339,8 @@ def _build_websocket_url( vad_silence_threshold_secs: typing.Optional[float] = None, vad_threshold: typing.Optional[float] = None, min_speech_duration_ms: typing.Optional[int] = None, - min_silence_duration_ms: typing.Optional[int] = None + min_silence_duration_ms: typing.Optional[int] = None, + language_code: typing.Optional[str] = None ) -> str: """Build the WebSocket URL with query parameters""" # Extract base domain @@ -354,6 +363,8 @@ def _build_websocket_url( params.append(f"min_speech_duration_ms={min_speech_duration_ms}") if min_silence_duration_ms is not None: params.append(f"min_silence_duration_ms={min_silence_duration_ms}") + if language_code is not None: + params.append(f"language_code={language_code}") query_string = "&".join(params) return f"{base}/v1/speech-to-text/realtime-beta?{query_string}" From f7e356670f775495c195a71cea1b7972cadc88a1 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Tue, 21 Oct 2025 17:53:43 +0100 Subject: [PATCH 27/34] Add missing imports --- src/elevenlabs/__init__.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index a3ec4258..96d2c6b5 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -1423,6 +1423,15 @@ MusicStreamRequestOutputFormat, ) from .play import play, save, stream + from .realtime import ( + AudioFormat, + CommitStrategy, + RealtimeAudioOptions, + RealtimeConnection, + RealtimeEvents, + RealtimeUrlOptions, + ScribeRealtime, + ) from .pronunciation_dictionaries import ( BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, @@ -2924,6 +2933,13 @@ "music": ".music", "play": ".play", "pronunciation_dictionaries": ".pronunciation_dictionaries", + "AudioFormat": ".realtime", + "CommitStrategy": ".realtime", + "RealtimeAudioOptions": ".realtime", + "RealtimeConnection": ".realtime", + "RealtimeEvents": ".realtime", + "RealtimeUrlOptions": ".realtime", + "ScribeRealtime": ".realtime", "samples": ".samples", "save": ".play", "service_accounts": ".service_accounts", @@ -3462,6 +3478,7 @@ def __dir__(): "AudioOutput", "AudioOutputMulti", "AudioWithTimestampsResponse", + "AudioFormat", "AuthConnectionLocator", "AuthSettings", "AuthorizationMethod", @@ -3548,6 +3565,7 @@ def __dir__(): "CloseConnection", "CloseContext", "CloseSocket", + "CommitStrategy", "ConvAiDynamicVariable", "ConvAiSecretLocator", "ConvAiStoredSecretDependencies", @@ -4023,6 +4041,10 @@ def __dir__(): "RagRetrievalInfo", "ReaderResourceResponseModel", "ReaderResourceResponseModelResourceType", + "RealtimeAudioOptions", + "RealtimeConnection", + "RealtimeEvents", + "RealtimeUrlOptions", "RealtimeVoiceSettings", "ReceiveMessage", "ReceiveMessageMulti", @@ -4044,6 +4066,7 @@ def __dir__(): "SafetyResponseModel", "SafetyRule", "SaveVoicePreviewRequest", + "ScribeRealtime", "SecretDependencyType", "SectionSource", "SegmentCreateResponse", From 68a411f253e8a64fcc53547dc4ee11ccb60d5135 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 19:24:18 +0200 Subject: [PATCH 28/34] SDK regeneration (#655) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- src/elevenlabs/__init__.py | 54 +++++-------- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/types/__init__.py | 21 ++--- .../types/client_tool_config_input.py | 12 +++ .../types/client_tool_config_output.py | 12 +++ src/elevenlabs/types/llm.py | 2 + .../types/moderation_status_response_model.py | 65 --------------- ...ion_status_response_model_safety_status.py | 7 -- ...on_status_response_model_warning_status.py | 5 -- ...prompt_agent_api_model_input_tools_item.py | 8 ++ ...rompt_agent_api_model_output_tools_item.py | 8 ++ ...odel_workflow_override_input_tools_item.py | 8 ++ ...del_workflow_override_output_tools_item.py | 8 ++ .../subscription_extras_response_model.py | 80 ------------------- .../subscription_usage_response_model.py | 58 -------------- .../types/system_tool_config_input.py | 12 +++ .../types/system_tool_config_output.py | 12 +++ .../types/tool_call_sound_behavior.py | 5 ++ src/elevenlabs/types/tool_call_sound_type.py | 7 ++ .../types/tool_request_model_tool_config.py | 8 ++ .../types/tool_response_model_tool_config.py | 8 ++ src/elevenlabs/types/user.py | 6 -- .../types/webhook_tool_config_input.py | 12 +++ .../types/webhook_tool_config_output.py | 12 +++ 25 files changed, 164 insertions(+), 272 deletions(-) delete mode 100644 src/elevenlabs/types/moderation_status_response_model.py delete mode 100644 src/elevenlabs/types/moderation_status_response_model_safety_status.py delete mode 100644 src/elevenlabs/types/moderation_status_response_model_warning_status.py delete mode 100644 src/elevenlabs/types/subscription_extras_response_model.py delete mode 100644 src/elevenlabs/types/subscription_usage_response_model.py create mode 100644 src/elevenlabs/types/tool_call_sound_behavior.py create mode 100644 src/elevenlabs/types/tool_call_sound_type.py diff --git a/pyproject.toml b/pyproject.toml index f42e0a83..96f616ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.19.1" +version = "v2.20.0" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 96d2c6b5..19b8dd9f 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -900,9 +900,6 @@ Model, ModelRatesResponseModel, ModelSettingsResponseModel, - ModerationStatusResponseModel, - ModerationStatusResponseModelSafetyStatus, - ModerationStatusResponseModelWarningStatus, MultichannelSpeechToTextResponseModel, MultipartMusicResponse, MusicPrompt, @@ -1090,13 +1087,11 @@ StartSpeakerSeparationResponseModel, StreamingAudioChunkWithTimestampsResponse, Subscription, - SubscriptionExtrasResponseModel, SubscriptionResponse, SubscriptionResponseModelBillingPeriod, SubscriptionResponseModelCharacterRefreshPeriod, SubscriptionResponseModelCurrency, SubscriptionStatusType, - SubscriptionUsageResponseModel, SupportedVoice, SystemToolConfigInput, SystemToolConfigInputParams, @@ -1137,6 +1132,8 @@ TokenResponseModel, Tool, ToolAnnotations, + ToolCallSoundBehavior, + ToolCallSoundType, ToolExecutionMode, ToolMockConfig, ToolRequestModel, @@ -1423,15 +1420,6 @@ MusicStreamRequestOutputFormat, ) from .play import play, save, stream - from .realtime import ( - AudioFormat, - CommitStrategy, - RealtimeAudioOptions, - RealtimeConnection, - RealtimeEvents, - RealtimeUrlOptions, - ScribeRealtime, - ) from .pronunciation_dictionaries import ( BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem, BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem_Alias, @@ -1440,6 +1428,14 @@ PronunciationDictionariesCreateFromFileRequestWorkspaceAccess, PronunciationDictionariesListRequestSort, ) + from .realtime import ( + AudioFormat, + CommitStrategy, + RealtimeAudioOptions, + RealtimeConnection, + RealtimeEvents, + RealtimeUrlOptions, + ) from .speech_to_speech import ( SpeechToSpeechConvertRequestFileFormat, SpeechToSpeechConvertRequestOutputFormat, @@ -1977,6 +1973,7 @@ "AsyncConversationMetadataDeliveryStatus": ".types", "AsyncElevenLabs": ".client", "AttachedTestModel": ".types", + "AudioFormat": ".realtime", "AudioIsolationConvertRequestFileFormat": ".audio_isolation", "AudioIsolationStreamRequestFileFormat": ".audio_isolation", "AudioNativeCreateProjectResponseModel": ".types", @@ -2073,6 +2070,7 @@ "CloseConnection": ".types", "CloseContext": ".types", "CloseSocket": ".types", + "CommitStrategy": ".realtime", "ConvAiDynamicVariable": ".types", "ConvAiSecretLocator": ".types", "ConvAiStoredSecretDependencies": ".types", @@ -2419,9 +2417,6 @@ "Model": ".types", "ModelRatesResponseModel": ".types", "ModelSettingsResponseModel": ".types", - "ModerationStatusResponseModel": ".types", - "ModerationStatusResponseModelSafetyStatus": ".types", - "ModerationStatusResponseModelWarningStatus": ".types", "MultichannelSpeechToTextResponseModel": ".types", "MultipartMusicResponse": ".types", "MusicComposeDetailedRequestOutputFormat": ".music", @@ -2548,6 +2543,10 @@ "RagRetrievalInfo": ".types", "ReaderResourceResponseModel": ".types", "ReaderResourceResponseModelResourceType": ".types", + "RealtimeAudioOptions": ".realtime", + "RealtimeConnection": ".realtime", + "RealtimeEvents": ".realtime", + "RealtimeUrlOptions": ".realtime", "RealtimeVoiceSettings": ".types", "ReceiveMessage": ".v_1_text_to_speech_voice_id_stream_input", "ReceiveMessageMulti": ".v_1_text_to_speech_voice_id_multi_stream_input", @@ -2627,13 +2626,11 @@ "StartSpeakerSeparationResponseModel": ".types", "StreamingAudioChunkWithTimestampsResponse": ".types", "Subscription": ".types", - "SubscriptionExtrasResponseModel": ".types", "SubscriptionResponse": ".types", "SubscriptionResponseModelBillingPeriod": ".types", "SubscriptionResponseModelCharacterRefreshPeriod": ".types", "SubscriptionResponseModelCurrency": ".types", "SubscriptionStatusType": ".types", - "SubscriptionUsageResponseModel": ".types", "SupportedVoice": ".types", "SystemToolConfigInput": ".types", "SystemToolConfigInputParams": ".types", @@ -2685,6 +2682,8 @@ "TooEarlyError": ".errors", "Tool": ".types", "ToolAnnotations": ".types", + "ToolCallSoundBehavior": ".types", + "ToolCallSoundType": ".types", "ToolExecutionMode": ".types", "ToolMockConfig": ".types", "ToolRequestModel": ".types", @@ -2933,13 +2932,6 @@ "music": ".music", "play": ".play", "pronunciation_dictionaries": ".pronunciation_dictionaries", - "AudioFormat": ".realtime", - "CommitStrategy": ".realtime", - "RealtimeAudioOptions": ".realtime", - "RealtimeConnection": ".realtime", - "RealtimeEvents": ".realtime", - "RealtimeUrlOptions": ".realtime", - "ScribeRealtime": ".realtime", "samples": ".samples", "save": ".play", "service_accounts": ".service_accounts", @@ -3468,6 +3460,7 @@ def __dir__(): "AsyncConversationMetadataDeliveryStatus", "AsyncElevenLabs", "AttachedTestModel", + "AudioFormat", "AudioIsolationConvertRequestFileFormat", "AudioIsolationStreamRequestFileFormat", "AudioNativeCreateProjectResponseModel", @@ -3478,7 +3471,6 @@ def __dir__(): "AudioOutput", "AudioOutputMulti", "AudioWithTimestampsResponse", - "AudioFormat", "AuthConnectionLocator", "AuthSettings", "AuthorizationMethod", @@ -3912,9 +3904,6 @@ def __dir__(): "Model", "ModelRatesResponseModel", "ModelSettingsResponseModel", - "ModerationStatusResponseModel", - "ModerationStatusResponseModelSafetyStatus", - "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", "MultipartMusicResponse", "MusicComposeDetailedRequestOutputFormat", @@ -4066,7 +4055,6 @@ def __dir__(): "SafetyResponseModel", "SafetyRule", "SaveVoicePreviewRequest", - "ScribeRealtime", "SecretDependencyType", "SectionSource", "SegmentCreateResponse", @@ -4125,13 +4113,11 @@ def __dir__(): "StartSpeakerSeparationResponseModel", "StreamingAudioChunkWithTimestampsResponse", "Subscription", - "SubscriptionExtrasResponseModel", "SubscriptionResponse", "SubscriptionResponseModelBillingPeriod", "SubscriptionResponseModelCharacterRefreshPeriod", "SubscriptionResponseModelCurrency", "SubscriptionStatusType", - "SubscriptionUsageResponseModel", "SupportedVoice", "SystemToolConfigInput", "SystemToolConfigInputParams", @@ -4183,6 +4169,8 @@ def __dir__(): "TooEarlyError", "Tool", "ToolAnnotations", + "ToolCallSoundBehavior", + "ToolCallSoundType", "ToolExecutionMode", "ToolMockConfig", "ToolRequestModel", diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index bcbc8d1b..9295328e 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.19.1", + "User-Agent": "elevenlabs/v2.20.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.19.1", + "X-Fern-SDK-Version": "v2.20.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 0ad93fb2..49cd0c8d 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -1057,9 +1057,6 @@ from .model import Model from .model_rates_response_model import ModelRatesResponseModel from .model_settings_response_model import ModelSettingsResponseModel - from .moderation_status_response_model import ModerationStatusResponseModel - from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus - from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel from .multipart_music_response import MultipartMusicResponse from .music_prompt import MusicPrompt @@ -1271,13 +1268,11 @@ from .start_speaker_separation_response_model import StartSpeakerSeparationResponseModel from .streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from .subscription import Subscription - from .subscription_extras_response_model import SubscriptionExtrasResponseModel from .subscription_response import SubscriptionResponse from .subscription_response_model_billing_period import SubscriptionResponseModelBillingPeriod from .subscription_response_model_character_refresh_period import SubscriptionResponseModelCharacterRefreshPeriod from .subscription_response_model_currency import SubscriptionResponseModelCurrency from .subscription_status_type import SubscriptionStatusType - from .subscription_usage_response_model import SubscriptionUsageResponseModel from .supported_voice import SupportedVoice from .system_tool_config_input import SystemToolConfigInput from .system_tool_config_input_params import ( @@ -1322,6 +1317,8 @@ from .token_response_model import TokenResponseModel from .tool import Tool from .tool_annotations import ToolAnnotations + from .tool_call_sound_behavior import ToolCallSoundBehavior + from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .tool_mock_config import ToolMockConfig from .tool_request_model import ToolRequestModel @@ -2489,9 +2486,6 @@ "Model": ".model", "ModelRatesResponseModel": ".model_rates_response_model", "ModelSettingsResponseModel": ".model_settings_response_model", - "ModerationStatusResponseModel": ".moderation_status_response_model", - "ModerationStatusResponseModelSafetyStatus": ".moderation_status_response_model_safety_status", - "ModerationStatusResponseModelWarningStatus": ".moderation_status_response_model_warning_status", "MultichannelSpeechToTextResponseModel": ".multichannel_speech_to_text_response_model", "MultipartMusicResponse": ".multipart_music_response", "MusicPrompt": ".music_prompt", @@ -2679,13 +2673,11 @@ "StartSpeakerSeparationResponseModel": ".start_speaker_separation_response_model", "StreamingAudioChunkWithTimestampsResponse": ".streaming_audio_chunk_with_timestamps_response", "Subscription": ".subscription", - "SubscriptionExtrasResponseModel": ".subscription_extras_response_model", "SubscriptionResponse": ".subscription_response", "SubscriptionResponseModelBillingPeriod": ".subscription_response_model_billing_period", "SubscriptionResponseModelCharacterRefreshPeriod": ".subscription_response_model_character_refresh_period", "SubscriptionResponseModelCurrency": ".subscription_response_model_currency", "SubscriptionStatusType": ".subscription_status_type", - "SubscriptionUsageResponseModel": ".subscription_usage_response_model", "SupportedVoice": ".supported_voice", "SystemToolConfigInput": ".system_tool_config_input", "SystemToolConfigInputParams": ".system_tool_config_input_params", @@ -2726,6 +2718,8 @@ "TokenResponseModel": ".token_response_model", "Tool": ".tool", "ToolAnnotations": ".tool_annotations", + "ToolCallSoundBehavior": ".tool_call_sound_behavior", + "ToolCallSoundType": ".tool_call_sound_type", "ToolExecutionMode": ".tool_execution_mode", "ToolMockConfig": ".tool_mock_config", "ToolRequestModel": ".tool_request_model", @@ -3877,9 +3871,6 @@ def __dir__(): "Model", "ModelRatesResponseModel", "ModelSettingsResponseModel", - "ModerationStatusResponseModel", - "ModerationStatusResponseModelSafetyStatus", - "ModerationStatusResponseModelWarningStatus", "MultichannelSpeechToTextResponseModel", "MultipartMusicResponse", "MusicPrompt", @@ -4067,13 +4058,11 @@ def __dir__(): "StartSpeakerSeparationResponseModel", "StreamingAudioChunkWithTimestampsResponse", "Subscription", - "SubscriptionExtrasResponseModel", "SubscriptionResponse", "SubscriptionResponseModelBillingPeriod", "SubscriptionResponseModelCharacterRefreshPeriod", "SubscriptionResponseModelCurrency", "SubscriptionStatusType", - "SubscriptionUsageResponseModel", "SupportedVoice", "SystemToolConfigInput", "SystemToolConfigInputParams", @@ -4114,6 +4103,8 @@ def __dir__(): "TokenResponseModel", "Tool", "ToolAnnotations", + "ToolCallSoundBehavior", + "ToolCallSoundType", "ToolExecutionMode", "ToolMockConfig", "ToolRequestModel", diff --git a/src/elevenlabs/types/client_tool_config_input.py b/src/elevenlabs/types/client_tool_config_input.py index e1292464..4048dc90 100644 --- a/src/elevenlabs/types/client_tool_config_input.py +++ b/src/elevenlabs/types/client_tool_config_input.py @@ -9,6 +9,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode @@ -43,6 +45,16 @@ class ClientToolConfigInput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = pydantic.Field(default=None) """ Schema for any parameters to pass to the client diff --git a/src/elevenlabs/types/client_tool_config_output.py b/src/elevenlabs/types/client_tool_config_output.py index 3126e5cf..702d90d2 100644 --- a/src/elevenlabs/types/client_tool_config_output.py +++ b/src/elevenlabs/types/client_tool_config_output.py @@ -9,6 +9,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode @@ -43,6 +45,16 @@ class ClientToolConfigOutput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = pydantic.Field(default=None) """ Schema for any parameters to pass to the client diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py index 8bf6eda3..92e184f5 100644 --- a/src/elevenlabs/types/llm.py +++ b/src/elevenlabs/types/llm.py @@ -23,6 +23,7 @@ "gemini-2.5-flash", "claude-sonnet-4-5", "claude-sonnet-4", + "claude-haiku-4-5", "claude-3-7-sonnet", "claude-3-5-sonnet", "claude-3-5-sonnet-v1", @@ -47,6 +48,7 @@ "gemini-1.5-pro-001", "claude-sonnet-4@20250514", "claude-sonnet-4-5@20250929", + "claude-haiku-4-5@20251001", "claude-3-7-sonnet@20250219", "claude-3-5-sonnet@20240620", "claude-3-5-sonnet-v2@20241022", diff --git a/src/elevenlabs/types/moderation_status_response_model.py b/src/elevenlabs/types/moderation_status_response_model.py deleted file mode 100644 index e3522896..00000000 --- a/src/elevenlabs/types/moderation_status_response_model.py +++ /dev/null @@ -1,65 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus -from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus - - -class ModerationStatusResponseModel(UncheckedBaseModel): - is_in_probation: bool = pydantic.Field() - """ - Whether the user is in probation. - """ - - enterprise_check_nogo_voice: bool = pydantic.Field() - """ - Whether the user's enterprise check nogo voice is enabled. - """ - - enterprise_check_block_nogo_voice: bool = pydantic.Field() - """ - Whether the user's enterprise check block nogo voice is enabled. - """ - - never_live_moderate: bool = pydantic.Field() - """ - Whether the user's never live moderate is enabled. - """ - - nogo_voice_similar_voice_upload_count: int = pydantic.Field() - """ - The number of similar voice uploads that have been blocked. - """ - - enterprise_background_moderation_enabled: bool = pydantic.Field() - """ - Whether the user's enterprise background moderation is enabled. - """ - - safety_status: typing.Optional[ModerationStatusResponseModelSafetyStatus] = pydantic.Field(default=None) - """ - The safety status of the user. - """ - - warning_status: typing.Optional[ModerationStatusResponseModelWarningStatus] = pydantic.Field(default=None) - """ - The warning status of the user. - """ - - on_watchlist: bool = pydantic.Field() - """ - Whether the user is on the watchlist. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/moderation_status_response_model_safety_status.py b/src/elevenlabs/types/moderation_status_response_model_safety_status.py deleted file mode 100644 index cb0591b4..00000000 --- a/src/elevenlabs/types/moderation_status_response_model_safety_status.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ModerationStatusResponseModelSafetyStatus = typing.Union[ - typing.Literal["appeal_approved", "appeal_denied", "false_positive"], typing.Any -] diff --git a/src/elevenlabs/types/moderation_status_response_model_warning_status.py b/src/elevenlabs/types/moderation_status_response_model_warning_status.py deleted file mode 100644 index 3869962f..00000000 --- a/src/elevenlabs/types/moderation_status_response_model_warning_status.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ModerationStatusResponseModelWarningStatus = typing.Union[typing.Literal["warning", "warning_cleared"], typing.Any] diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index c3faf2f7..7931143a 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -27,6 +29,8 @@ class PromptAgentApiModelInputToolsItem_Client(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class PromptAgentApiModelInputToolsItem_System(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigInputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class PromptAgentApiModelInputToolsItem_Webhook(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index 50ea7aa2..fa93c049 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -27,6 +29,8 @@ class PromptAgentApiModelOutputToolsItem_Client(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class PromptAgentApiModelOutputToolsItem_System(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class PromptAgentApiModelOutputToolsItem_Webhook(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py index eac23bbb..ffee6bf6 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -27,6 +29,8 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_Client(UncheckedBaseMode disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_System(UncheckedBaseMode disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigInputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook(UncheckedBaseMod disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py index e21b8898..6c60d77e 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -27,6 +29,8 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client(UncheckedBaseMod disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_System(UncheckedBaseMod disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook(UncheckedBaseMo disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/subscription_extras_response_model.py b/src/elevenlabs/types/subscription_extras_response_model.py deleted file mode 100644 index 73d42b70..00000000 --- a/src/elevenlabs/types/subscription_extras_response_model.py +++ /dev/null @@ -1,80 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .moderation_status_response_model import ModerationStatusResponseModel -from .subscription_usage_response_model import SubscriptionUsageResponseModel - - -class SubscriptionExtrasResponseModel(UncheckedBaseModel): - concurrency: int = pydantic.Field() - """ - The concurrency of the user. - """ - - convai_concurrency: int = pydantic.Field() - """ - The Convai concurrency of the user. - """ - - enterprise_music_concurrency: typing.Optional[int] = pydantic.Field(default=None) - """ - The Music concurrency of the user on enterprise plan. - """ - - convai_chars_per_minute: typing.Optional[int] = pydantic.Field(default=None) - """ - The Convai characters per minute of the user. This field is deprecated and will always return None. - """ - - convai_asr_chars_per_minute: typing.Optional[int] = pydantic.Field(default=None) - """ - The Convai ASR characters per minute of the user. This field is deprecated and will always return None. - """ - - force_logging_disabled: bool = pydantic.Field() - """ - Whether the user's logging is disabled. - """ - - can_request_manual_pro_voice_verification: bool = pydantic.Field() - """ - Whether the user can request manual pro voice verification. - """ - - can_bypass_voice_captcha: bool = pydantic.Field() - """ - Whether the user can bypass the voice captcha. - """ - - moderation: ModerationStatusResponseModel = pydantic.Field() - """ - The moderation status of the user. - """ - - unused_characters_rolled_over_from_previous_period: typing.Optional[int] = pydantic.Field(default=None) - """ - The unused characters rolled over from the previous period. - """ - - overused_characters_rolled_over_from_previous_period: typing.Optional[int] = pydantic.Field(default=None) - """ - The overused characters rolled over from the previous period. - """ - - usage: typing.Optional[SubscriptionUsageResponseModel] = pydantic.Field(default=None) - """ - Data on how the subscription is being used. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/subscription_usage_response_model.py b/src/elevenlabs/types/subscription_usage_response_model.py deleted file mode 100644 index e3b67395..00000000 --- a/src/elevenlabs/types/subscription_usage_response_model.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class SubscriptionUsageResponseModel(UncheckedBaseModel): - rollover_credits_quota: int = pydantic.Field() - """ - The rollover credits quota. - """ - - subscription_cycle_credits_quota: int = pydantic.Field() - """ - The subscription cycle credits quota. - """ - - manually_gifted_credits_quota: int = pydantic.Field() - """ - The manually gifted credits quota. - """ - - rollover_credits_used: int = pydantic.Field() - """ - The rollover credits used. - """ - - subscription_cycle_credits_used: int = pydantic.Field() - """ - The subscription cycle credits used. - """ - - manually_gifted_credits_used: int = pydantic.Field() - """ - The manually gifted credits used. - """ - - paid_usage_based_credits_used: int = pydantic.Field() - """ - The paid usage based credits used. - """ - - actual_reported_credits: int = pydantic.Field() - """ - The actual reported credits. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/system_tool_config_input.py b/src/elevenlabs/types/system_tool_config_input.py index f09e15ed..9b425021 100644 --- a/src/elevenlabs/types/system_tool_config_input.py +++ b/src/elevenlabs/types/system_tool_config_input.py @@ -7,6 +7,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType class SystemToolConfigInput(UncheckedBaseModel): @@ -40,6 +42,16 @@ class SystemToolConfigInput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + params: SystemToolConfigInputParams if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/system_tool_config_output.py b/src/elevenlabs/types/system_tool_config_output.py index 9aef1f28..95ce9591 100644 --- a/src/elevenlabs/types/system_tool_config_output.py +++ b/src/elevenlabs/types/system_tool_config_output.py @@ -7,6 +7,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType class SystemToolConfigOutput(UncheckedBaseModel): @@ -40,6 +42,16 @@ class SystemToolConfigOutput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/tool_call_sound_behavior.py b/src/elevenlabs/types/tool_call_sound_behavior.py new file mode 100644 index 00000000..bbc2f101 --- /dev/null +++ b/src/elevenlabs/types/tool_call_sound_behavior.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolCallSoundBehavior = typing.Union[typing.Literal["auto", "always"], typing.Any] diff --git a/src/elevenlabs/types/tool_call_sound_type.py b/src/elevenlabs/types/tool_call_sound_type.py new file mode 100644 index 00000000..f979c901 --- /dev/null +++ b/src/elevenlabs/types/tool_call_sound_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolCallSoundType = typing.Union[ + typing.Literal["typing", "elevator1", "elevator2", "elevator3", "elevator4"], typing.Any +] diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index 4e0ea9ec..2fec738d 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -27,6 +29,8 @@ class ToolRequestModelToolConfig_Client(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class ToolRequestModelToolConfig_System(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigInputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class ToolRequestModelToolConfig_Webhook(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index 5965f879..f5f639b2 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -11,6 +11,8 @@ from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -27,6 +29,8 @@ class ToolResponseModelToolConfig_Client(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None expects_response: typing.Optional[bool] = None dynamic_variables: typing.Optional[DynamicVariablesConfig] = None @@ -67,6 +71,8 @@ class ToolResponseModelToolConfig_System(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None params: SystemToolConfigOutputParams if IS_PYDANTIC_V2: @@ -91,6 +97,8 @@ class ToolResponseModelToolConfig_Webhook(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = None force_pre_tool_speech: typing.Optional[bool] = None assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None diff --git a/src/elevenlabs/types/user.py b/src/elevenlabs/types/user.py index c2080846..d15eb1c5 100644 --- a/src/elevenlabs/types/user.py +++ b/src/elevenlabs/types/user.py @@ -5,7 +5,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .subscription_extras_response_model import SubscriptionExtrasResponseModel from .subscription_response import SubscriptionResponse @@ -20,11 +19,6 @@ class User(UncheckedBaseModel): Details of the user's subscription. """ - subscription_extras: typing.Optional[SubscriptionExtrasResponseModel] = pydantic.Field(default=None) - """ - Optional additional details about the user's subscription. - """ - is_new_user: bool = pydantic.Field() """ Whether the user is new. This field is deprecated and will be removed in the future. Use 'created_at' instead. diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index 29ddbd16..e9403a4f 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -9,6 +9,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -44,6 +46,16 @@ class WebhookToolConfigInput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + api_schema: WebhookToolApiSchemaConfigInput = pydantic.Field() """ The schema for the outgoing webhoook, including parameters and URL specification diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index 348b561b..661c1193 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -9,6 +9,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -44,6 +46,16 @@ class WebhookToolConfigOutput(UncheckedBaseModel): Configuration for extracting values from tool responses and assigning them to dynamic variables """ + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + api_schema: WebhookToolApiSchemaConfigOutput = pydantic.Field() """ The schema for the outgoing webhoook, including parameters and URL specification From 3aa140cdb129c06e435c1f543071a829b866ecf9 Mon Sep 17 00:00:00 2001 From: Fern Support <126544928+fern-support@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:30:07 -0400 Subject: [PATCH 29/34] Manually fix non-optional file params in client methods (#657) * Manually fix non-optional file params in client methods and add to .fernignore * fix --------- Co-authored-by: jsklan --- .fernignore | 13 ++++++++----- src/elevenlabs/dubbing/client.py | 16 ++++++++-------- src/elevenlabs/dubbing/raw_client.py | 16 ++++++++-------- .../pronunciation_dictionaries/client.py | 4 ++-- .../pronunciation_dictionaries/raw_client.py | 4 ++-- src/elevenlabs/speech_to_text/client.py | 4 ++-- src/elevenlabs/speech_to_text/raw_client.py | 4 ++-- 7 files changed, 32 insertions(+), 29 deletions(-) diff --git a/.fernignore b/.fernignore index 961ca7bb..4b8e5ddc 100644 --- a/.fernignore +++ b/.fernignore @@ -20,8 +20,11 @@ assets/ # Ignore custom tests tests/ - - - - - +# Ignore files that were manually fixed to address bug where required file params should be optional: +# https://github.com/elevenlabs/elevenlabs-python/issues/656 +src/elevenlabs/dubbing/client.py +src/elevenlabs/dubbing/raw_client.py +src/elevenlabs/pronunciation_dictionaries/client.py +src/elevenlabs/pronunciation_dictionaries/raw_client.py +src/elevenlabs/speech_to_text/client.py +src/elevenlabs/speech_to_text/raw_client.py diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 201d425b..1413c88c 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -115,10 +115,10 @@ def list( def create( self, *, - file: core.File, - csv_file: core.File, - foreground_audio_file: core.File, - background_audio_file: core.File, + file: typing.Optional[core.File] = OMIT, + csv_file: typing.Optional[core.File] = OMIT, + foreground_audio_file: typing.Optional[core.File] = OMIT, + background_audio_file: typing.Optional[core.File] = OMIT, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -433,10 +433,10 @@ async def main() -> None: async def create( self, *, - file: core.File, - csv_file: core.File, - foreground_audio_file: core.File, - background_audio_file: core.File, + file: typing.Optional[core.File] = OMIT, + csv_file: typing.Optional[core.File] = OMIT, + foreground_audio_file: typing.Optional[core.File] = OMIT, + background_audio_file: typing.Optional[core.File] = OMIT, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index 2cd8b336..fac53b9a 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -113,10 +113,10 @@ def list( def create( self, *, - file: core.File, - csv_file: core.File, - foreground_audio_file: core.File, - background_audio_file: core.File, + file: typing.Optional[core.File] = OMIT, + csv_file: typing.Optional[core.File] = OMIT, + foreground_audio_file: typing.Optional[core.File] = OMIT, + background_audio_file: typing.Optional[core.File] = OMIT, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, @@ -454,10 +454,10 @@ async def list( async def create( self, *, - file: core.File, - csv_file: core.File, - foreground_audio_file: core.File, - background_audio_file: core.File, + file: typing.Optional[core.File] = OMIT, + csv_file: typing.Optional[core.File] = OMIT, + foreground_audio_file: typing.Optional[core.File] = OMIT, + background_audio_file: typing.Optional[core.File] = OMIT, name: typing.Optional[str] = OMIT, source_url: typing.Optional[str] = OMIT, source_lang: typing.Optional[str] = OMIT, diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index 9850a32b..112103c2 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -51,7 +51,7 @@ def create_from_file( self, *, name: str, - file: core.File, + file: typing.Optional[core.File] = OMIT, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -371,7 +371,7 @@ async def create_from_file( self, *, name: str, - file: core.File, + file: typing.Optional[core.File] = OMIT, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py index 5fbb8435..1ff0bb70 100644 --- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py @@ -42,7 +42,7 @@ def create_from_file( self, *, name: str, - file: core.File, + file: typing.Optional[core.File] = OMIT, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -454,7 +454,7 @@ async def create_from_file( self, *, name: str, - file: core.File, + file: typing.Optional[core.File] = OMIT, description: typing.Optional[str] = OMIT, workspace_access: typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess] = OMIT, request_options: typing.Optional[RequestOptions] = None, diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index 10f5bf26..e504b216 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -41,8 +41,8 @@ def convert( self, *, model_id: str, - file: core.File, enable_logging: typing.Optional[bool] = None, + file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -192,8 +192,8 @@ async def convert( self, *, model_id: str, - file: core.File, enable_logging: typing.Optional[bool] = None, + file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 4dda86f3..19faac88 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -31,8 +31,8 @@ def convert( self, *, model_id: str, - file: core.File, enable_logging: typing.Optional[bool] = None, + file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, @@ -187,8 +187,8 @@ async def convert( self, *, model_id: str, - file: core.File, enable_logging: typing.Optional[bool] = None, + file: typing.Optional[core.File] = OMIT, language_code: typing.Optional[str] = OMIT, tag_audio_events: typing.Optional[bool] = OMIT, num_speakers: typing.Optional[int] = OMIT, From 7fd0f64c560db71f65daad6e7c56cd5dfdaab74f Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Thu, 23 Oct 2025 16:30:56 +0200 Subject: [PATCH 30/34] Update version --- pyproject.toml | 2 +- src/elevenlabs/core/client_wrapper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96f616ad..164ee63e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.20.0" +version = "v2.20.1" description = "" readme = "README.md" authors = [] diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 9295328e..cdf132d8 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.20.0", + "User-Agent": "elevenlabs/v2.20.1", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.20.0", + "X-Fern-SDK-Version": "v2.20.1", **(self.get_custom_headers() or {}), } if self._api_key is not None: From 13d5e85d4cd84feb5b9779a1e8080e89b0b16f19 Mon Sep 17 00:00:00 2001 From: Fern Support <126544928+fern-support@users.noreply.github.com> Date: Fri, 24 Oct 2025 11:21:37 -0400 Subject: [PATCH 31/34] Remove fernignored clients with optional file params (#659) Co-authored-by: jsklan --- .fernignore | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.fernignore b/.fernignore index 4b8e5ddc..6ce53e09 100644 --- a/.fernignore +++ b/.fernignore @@ -19,12 +19,3 @@ assets/ # Ignore custom tests tests/ - -# Ignore files that were manually fixed to address bug where required file params should be optional: -# https://github.com/elevenlabs/elevenlabs-python/issues/656 -src/elevenlabs/dubbing/client.py -src/elevenlabs/dubbing/raw_client.py -src/elevenlabs/pronunciation_dictionaries/client.py -src/elevenlabs/pronunciation_dictionaries/raw_client.py -src/elevenlabs/speech_to_text/client.py -src/elevenlabs/speech_to_text/raw_client.py From ab557d06f4635b0f3fc75c7fcbe64580280617f9 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 14:20:35 +0100 Subject: [PATCH 32/34] :herb: Fern Regeneration -- October 29, 2025 (#663) * SDK regeneration * Remove deprecated value --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Paul Asjes --- pyproject.toml | 2 +- reference.md | 453 +++++++++++++--- src/elevenlabs/__init__.py | 69 ++- src/elevenlabs/base_client.py | 19 + src/elevenlabs/conversational_ai/__init__.py | 3 + .../conversational_ai/conversations/client.py | 12 + .../conversations/raw_client.py | 10 + .../conversational_ai/mcp_servers/__init__.py | 4 +- .../conversational_ai/mcp_servers/client.py | 28 + .../mcp_servers/raw_client.py | 36 ++ .../mcp_servers/types/__init__.py | 38 ++ ...ate_request_model_request_headers_value.py | 8 + .../phone_numbers_create_request_body.py | 2 + src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/core/http_sse/__init__.py | 42 ++ src/elevenlabs/core/http_sse/_api.py | 112 ++++ src/elevenlabs/core/http_sse/_decoders.py | 61 +++ src/elevenlabs/core/http_sse/_exceptions.py | 7 + src/elevenlabs/core/http_sse/_models.py | 17 + src/elevenlabs/core/unchecked_base_model.py | 37 +- src/elevenlabs/dubbing/client.py | 16 +- src/elevenlabs/dubbing/raw_client.py | 32 +- src/elevenlabs/music/client.py | 60 --- src/elevenlabs/music/raw_client.py | 72 --- src/elevenlabs/music_custom.py | 4 - .../pronunciation_dictionaries/client.py | 4 +- .../pronunciation_dictionaries/raw_client.py | 8 +- src/elevenlabs/speech_to_text/client.py | 16 +- src/elevenlabs/speech_to_text/raw_client.py | 16 +- src/elevenlabs/studio/projects/client.py | 20 +- .../studio/projects/content/client.py | 20 +- .../studio/projects/content/raw_client.py | 20 +- src/elevenlabs/studio/projects/raw_client.py | 20 +- src/elevenlabs/text_to_dialogue/__init__.py | 12 + src/elevenlabs/text_to_dialogue/client.py | 383 ++++++++++++++ src/elevenlabs/text_to_dialogue/raw_client.py | 489 ++++++++++++++++++ .../text_to_dialogue/types/__init__.py | 20 + ...ith_timestamps_apply_text_normalization.py | 7 + ...ith_timestamps_apply_text_normalization.py | 7 + ...t_with_timestamps_request_output_format.py | 30 ++ ...m_with_timestamps_request_output_format.py | 30 ++ src/elevenlabs/tokens/__init__.py | 34 ++ src/elevenlabs/tokens/client.py | 63 +++ src/elevenlabs/tokens/raw_client.py | 13 + src/elevenlabs/tokens/single_use/__init__.py | 4 + src/elevenlabs/tokens/single_use/client.py | 100 ++++ .../tokens/single_use/raw_client.py | 117 +++++ src/elevenlabs/types/__init__.py | 55 +- ..._config_override_for_test_request_model.py | 13 - src/elevenlabs/types/agent_config.py | 3 - ...onfig_api_model_workflow_override_input.py | 3 - ...nfig_api_model_workflow_override_output.py | 3 - ...gent_simulated_chat_test_response_model.py | 6 - .../types/agent_workflow_request_model.py | 11 - ...gent_workflow_request_model_nodes_value.py | 4 - .../types/agent_workflow_response_model.py | 11 - ...ent_workflow_response_model_nodes_value.py | 4 - .../types/array_json_schema_property_input.py | 3 +- .../array_json_schema_property_output.py | 3 +- .../types/ast_and_operator_node_input.py | 9 +- ...t_and_operator_node_input_children_item.py | 36 +- .../types/ast_and_operator_node_output.py | 9 +- ..._and_operator_node_output_children_item.py | 36 +- .../types/ast_equals_operator_node_input.py | 11 +- .../ast_equals_operator_node_input_left.py | 36 +- .../ast_equals_operator_node_input_right.py | 36 +- .../types/ast_equals_operator_node_output.py | 11 +- .../ast_equals_operator_node_output_left.py | 36 +- .../ast_equals_operator_node_output_right.py | 36 +- .../ast_greater_than_operator_node_input.py | 11 +- ...t_greater_than_operator_node_input_left.py | 36 +- ..._greater_than_operator_node_input_right.py | 36 +- .../ast_greater_than_operator_node_output.py | 11 +- ..._greater_than_operator_node_output_left.py | 36 +- ...greater_than_operator_node_output_right.py | 36 +- ...ater_than_or_equals_operator_node_input.py | 11 +- ...than_or_equals_operator_node_input_left.py | 36 +- ...han_or_equals_operator_node_input_right.py | 36 +- ...ter_than_or_equals_operator_node_output.py | 11 +- ...han_or_equals_operator_node_output_left.py | 36 +- ...an_or_equals_operator_node_output_right.py | 36 +- .../ast_less_than_operator_node_input.py | 11 +- .../ast_less_than_operator_node_input_left.py | 36 +- ...ast_less_than_operator_node_input_right.py | 36 +- .../ast_less_than_operator_node_output.py | 11 +- ...ast_less_than_operator_node_output_left.py | 36 +- ...st_less_than_operator_node_output_right.py | 36 +- ...less_than_or_equals_operator_node_input.py | 11 +- ...than_or_equals_operator_node_input_left.py | 36 +- ...han_or_equals_operator_node_input_right.py | 36 +- ...ess_than_or_equals_operator_node_output.py | 11 +- ...han_or_equals_operator_node_output_left.py | 36 +- ...an_or_equals_operator_node_output_right.py | 36 +- .../ast_not_equals_operator_node_input.py | 11 +- ...ast_not_equals_operator_node_input_left.py | 36 +- ...st_not_equals_operator_node_input_right.py | 36 +- .../ast_not_equals_operator_node_output.py | 11 +- ...st_not_equals_operator_node_output_left.py | 36 +- ...t_not_equals_operator_node_output_right.py | 36 +- .../types/ast_or_operator_node_input.py | 9 +- ...st_or_operator_node_input_children_item.py | 36 +- .../types/ast_or_operator_node_output.py | 9 +- ...t_or_operator_node_output_children_item.py | 36 +- ...tamps_and_voice_segments_response_model.py | 42 ++ .../types/client_tool_config_input.py | 3 +- .../types/client_tool_config_output.py | 3 +- ...n_history_transcript_common_model_input.py | 6 - ..._history_transcript_common_model_output.py | 6 - ...orkflow_tools_result_common_model_input.py | 3 +- ...rkflow_tools_result_common_model_output.py | 3 +- .../conversation_simulation_specification.py | 8 - src/elevenlabs/types/conversational_config.py | 3 - ...onfig_api_model_workflow_override_input.py | 3 - ...nfig_api_model_workflow_override_output.py | 3 - .../create_twilio_phone_number_request.py | 6 + .../types/get_agent_response_model.py | 11 - .../types/get_conversation_response_model.py | 6 - ...et_test_suite_invocation_response_model.py | 6 - .../types/get_unit_test_response_model.py | 6 - src/elevenlabs/types/guardrails_v_1_input.py | 22 + src/elevenlabs/types/guardrails_v_1_output.py | 22 + .../types/mcp_server_config_input.py | 6 + ...rver_config_input_request_headers_value.py | 3 +- .../types/mcp_server_config_output.py | 6 + ...ver_config_output_request_headers_value.py | 3 +- src/elevenlabs/types/metric_type.py | 1 + src/elevenlabs/types/moderation_config.py | 31 ++ .../types/moderation_guardrail_input.py | 21 + .../types/moderation_guardrail_output.py | 21 + .../object_json_schema_property_input.py | 3 +- .../object_json_schema_property_output.py | 3 +- .../types/prompt_agent_api_model_input.py | 3 - ...prompt_agent_api_model_input_tools_item.py | 3 +- .../types/prompt_agent_api_model_output.py | 3 - ...rompt_agent_api_model_output_tools_item.py | 3 +- ...agent_api_model_workflow_override_input.py | 3 - ...odel_workflow_override_input_tools_item.py | 3 +- ...gent_api_model_workflow_override_output.py | 3 - ...del_workflow_override_output_tools_item.py | 3 +- .../types/referenced_tool_common_model.py | 4 +- .../referenced_tool_common_model_type.py | 5 + src/elevenlabs/types/region_config_request.py | 35 ++ .../types/single_use_token_response_model.py | 23 + src/elevenlabs/types/single_use_token_type.py | 5 + src/elevenlabs/types/song_section.py | 2 +- ...tamps_and_voice_segments_response_model.py | 42 ++ .../test_from_conversation_metadata_input.py | 6 - .../test_from_conversation_metadata_output.py | 6 - src/elevenlabs/types/threshold_guardrail.py | 21 + src/elevenlabs/types/tool_request_model.py | 3 - .../types/tool_request_model_tool_config.py | 21 +- src/elevenlabs/types/tool_response_model.py | 3 - .../types/tool_response_model_tool_config.py | 3 +- src/elevenlabs/types/tools_response_model.py | 3 - src/elevenlabs/types/turn_config.py | 6 +- .../types/turn_config_workflow_override.py | 6 +- src/elevenlabs/types/turn_eagerness.py | 5 + src/elevenlabs/types/twilio_edge_location.py | 10 + src/elevenlabs/types/twilio_region_id.py | 5 + .../types/unit_test_common_model.py | 6 - .../types/unit_test_run_response_model.py | 6 - src/elevenlabs/types/vad_config.py | 5 - .../types/vad_config_workflow_override.py | 5 - src/elevenlabs/types/voice_segment.py | 43 ++ .../webhook_tool_api_schema_config_input.py | 3 +- .../webhook_tool_api_schema_config_output.py | 3 +- .../types/webhook_tool_config_input.py | 3 - .../types/webhook_tool_config_output.py | 3 - .../types/workflow_edge_model_input.py | 9 - ...low_edge_model_input_backward_condition.py | 10 - ...flow_edge_model_input_forward_condition.py | 10 - .../types/workflow_edge_model_output.py | 9 - ...ow_edge_model_output_backward_condition.py | 10 - ...low_edge_model_output_forward_condition.py | 10 - ...rkflow_expression_condition_model_input.py | 9 - ...ession_condition_model_input_expression.py | 36 +- ...kflow_expression_condition_model_output.py | 9 - ...ssion_condition_model_output_expression.py | 36 +- ...orkflow_override_agent_node_model_input.py | 3 - ...rkflow_override_agent_node_model_output.py | 3 - ...flow_tool_nested_tools_step_model_input.py | 6 +- ...low_tool_nested_tools_step_model_output.py | 6 +- .../workflow_tool_response_model_input.py | 6 +- ...ow_tool_response_model_input_steps_item.py | 8 +- .../workflow_tool_response_model_output.py | 6 +- ...w_tool_response_model_output_steps_item.py | 8 +- .../types/workspace_resource_type.py | 2 + 187 files changed, 3165 insertions(+), 1482 deletions(-) create mode 100644 src/elevenlabs/conversational_ai/mcp_servers/types/__init__.py create mode 100644 src/elevenlabs/conversational_ai/mcp_servers/types/mcp_server_config_update_request_model_request_headers_value.py create mode 100644 src/elevenlabs/core/http_sse/__init__.py create mode 100644 src/elevenlabs/core/http_sse/_api.py create mode 100644 src/elevenlabs/core/http_sse/_decoders.py create mode 100644 src/elevenlabs/core/http_sse/_exceptions.py create mode 100644 src/elevenlabs/core/http_sse/_models.py create mode 100644 src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_full_with_timestamps_apply_text_normalization.py create mode 100644 src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_stream_with_timestamps_apply_text_normalization.py create mode 100644 src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_with_timestamps_request_output_format.py create mode 100644 src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_with_timestamps_request_output_format.py create mode 100644 src/elevenlabs/tokens/__init__.py create mode 100644 src/elevenlabs/tokens/client.py create mode 100644 src/elevenlabs/tokens/raw_client.py create mode 100644 src/elevenlabs/tokens/single_use/__init__.py create mode 100644 src/elevenlabs/tokens/single_use/client.py create mode 100644 src/elevenlabs/tokens/single_use/raw_client.py create mode 100644 src/elevenlabs/types/audio_with_timestamps_and_voice_segments_response_model.py create mode 100644 src/elevenlabs/types/guardrails_v_1_input.py create mode 100644 src/elevenlabs/types/guardrails_v_1_output.py create mode 100644 src/elevenlabs/types/moderation_config.py create mode 100644 src/elevenlabs/types/moderation_guardrail_input.py create mode 100644 src/elevenlabs/types/moderation_guardrail_output.py create mode 100644 src/elevenlabs/types/referenced_tool_common_model_type.py create mode 100644 src/elevenlabs/types/region_config_request.py create mode 100644 src/elevenlabs/types/single_use_token_response_model.py create mode 100644 src/elevenlabs/types/single_use_token_type.py create mode 100644 src/elevenlabs/types/streaming_audio_chunk_with_timestamps_and_voice_segments_response_model.py create mode 100644 src/elevenlabs/types/threshold_guardrail.py create mode 100644 src/elevenlabs/types/turn_eagerness.py create mode 100644 src/elevenlabs/types/twilio_edge_location.py create mode 100644 src/elevenlabs/types/twilio_region_id.py create mode 100644 src/elevenlabs/types/voice_segment.py diff --git a/pyproject.toml b/pyproject.toml index 164ee63e..95313f5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.20.1" +version = "v2.21.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 65bfbeed..24df9806 100644 --- a/reference.md +++ b/reference.md @@ -1797,6 +1797,280 @@ client.text_to_dialogue.stream(
+
+
+
+ +
client.text_to_dialogue.stream_with_timestamps(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import DialogueInput, ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +response = client.text_to_dialogue.stream_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], +) +for chunk in response.data: + yield chunk + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + +
+
+ +
+
+ +**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_dialogue.convert_with_timestamps(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate dialogue from text with precise character-level timing information for audio-text synchronization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import DialogueInput, ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.text_to_dialogue.convert_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.Sequence[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + +
+
+ +
+
+ +**settings:** `typing.Optional[ModelSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -4050,7 +4324,7 @@ client.dubbing.create() **file:** `from __future__ import annotations -core.File` — See core.File for more documentation +typing.Optional[core.File]` — See core.File for more documentation @@ -4060,7 +4334,7 @@ core.File` — See core.File for more documentation **csv_file:** `from __future__ import annotations -core.File` — See core.File for more documentation +typing.Optional[core.File]` — See core.File for more documentation @@ -4070,7 +4344,7 @@ core.File` — See core.File for more documentation **foreground_audio_file:** `from __future__ import annotations -core.File` — See core.File for more documentation +typing.Optional[core.File]` — See core.File for more documentation @@ -4080,7 +4354,7 @@ core.File` — See core.File for more documentation **background_audio_file:** `from __future__ import annotations -core.File` — See core.File for more documentation +typing.Optional[core.File]` — See core.File for more documentation @@ -4965,7 +5239,7 @@ client.pronunciation_dictionaries.create_from_file( **file:** `from __future__ import annotations -core.File` — See core.File for more documentation +typing.Optional[core.File]` — See core.File for more documentation @@ -5636,9 +5910,7 @@ client.speech_to_text.convert(
-**file:** `from __future__ import annotations - -core.File` — See core.File for more documentation +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers.
@@ -5646,7 +5918,9 @@ core.File` — See core.File for more documentation
-**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. +**file:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -6246,14 +6520,6 @@ client.music.compose()
-**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. - -
-
- -
-
- **composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
@@ -6278,14 +6544,6 @@ client.music.compose()
-**seed:** `typing.Optional[int]` — The seed to use for the generation. - -
-
- -
-
- **force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.
@@ -6386,14 +6644,6 @@ client.music.compose_detailed()
-**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. - -
-
- -
-
- **composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
@@ -6418,14 +6668,6 @@ client.music.compose_detailed()
-**seed:** `typing.Optional[int]` — The seed to use for the generation. - -
-
- -
-
- **force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.
@@ -6518,14 +6760,6 @@ client.music.stream()
-**music_prompt:** `typing.Optional[MusicPrompt]` — A music prompt. Deprecated. Use `composition_plan` instead. - -
-
- -
-
- **composition_plan:** `typing.Optional[MusicPrompt]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
@@ -6550,14 +6784,6 @@ client.music.stream()
-**seed:** `typing.Optional[int]` — The seed to use for the generation. - -
-
- -
-
- **force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.
@@ -6786,6 +7012,7 @@ client.conversational_ai.conversations.list( user_id="user_id", page_size=1, summary_mode="exclude", + search="search", ) ``` @@ -6866,6 +7093,14 @@ client.conversational_ai.conversations.list(
+**search:** `typing.Optional[str]` — Full-text or fuzzy search over transcript messages + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10896,6 +11131,27 @@ client.conversational_ai.mcp_servers.update(
+**execution_mode:** `typing.Optional[ToolExecutionMode]` — The execution mode for all tools from this MCP server + +
+
+ +
+
+ +**request_headers:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue], + ] +]` — The headers to include in requests to the MCP server + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -15000,9 +15256,7 @@ client.studio.projects.create(
-**from_document:** `from __future__ import annotations - -core.File` — See core.File for more documentation +**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles.
@@ -15010,7 +15264,7 @@ core.File` — See core.File for more documentation
-**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles. +**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs.
@@ -15018,7 +15272,7 @@ core.File` — See core.File for more documentation
-**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs. +**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.
@@ -15026,7 +15280,7 @@ core.File` — See core.File for more documentation
-**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
@@ -15034,7 +15288,9 @@ core.File` — See core.File for more documentation
-**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. +**from_document:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -15797,9 +16053,7 @@ client.studio.projects.content.update(
-**from_document:** `from __future__ import annotations - -core.File` — See core.File for more documentation +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
@@ -15807,7 +16061,9 @@ core.File` — See core.File for more documentation
-**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. +**from_document:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation
@@ -16987,6 +17243,67 @@ client.text_to_voice.preview.stream(
+ +
+
+ +## Tokens SingleUse +
client.tokens.single_use.create() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate a time limited single-use token with embedded authentication for frontend clients. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.tokens.single_use.create() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 19b8dd9f..5dcdc66f 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -2,9 +2,12 @@ # isort: skip_file +import sys import typing from importlib import import_module +if sys.getrecursionlimit() < 5000: + sys.setrecursionlimit(5000) if typing.TYPE_CHECKING: from .types import ( AddChapterResponseModel, @@ -497,6 +500,7 @@ AudioNativeProjectSettingsResponseModelStatus, AudioOutput, AudioOutputMulti, + AudioWithTimestampsAndVoiceSegmentsResponseModel, AudioWithTimestampsResponse, AuthConnectionLocator, AuthSettings, @@ -830,6 +834,8 @@ GetVoicesResponse, GetVoicesV2Response, GetWorkspaceSecretsResponseModel, + GuardrailsV1Input, + GuardrailsV1Output, HistoryAlignmentResponseModel, HistoryAlignmentsResponseModel, HistoryItemResponse, @@ -900,6 +906,9 @@ Model, ModelRatesResponseModel, ModelSettingsResponseModel, + ModerationConfig, + ModerationGuardrailInput, + ModerationGuardrailOutput, MultichannelSpeechToTextResponseModel, MultipartMusicResponse, MusicPrompt, @@ -1023,7 +1032,9 @@ RealtimeVoiceSettings, RecordingResponse, ReferencedToolCommonModel, + ReferencedToolCommonModelType, RegexParameterEvaluationStrategy, + RegionConfigRequest, RemoveMemberFromGroupRequest, Render, RenderStatus, @@ -1057,6 +1068,8 @@ SimilarVoiceCategory, SimilarVoicesForSpeakerResponse, SingleTestRunRequestModel, + SingleUseTokenResponseModel, + SingleUseTokenType, SipMediaEncryptionEnum, SipTrunkCredentialsRequestModel, SipTrunkOutboundCallResponse, @@ -1085,6 +1098,7 @@ SrtExportOptions, StartPvcVoiceTrainingResponseModel, StartSpeakerSeparationResponseModel, + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, StreamingAudioChunkWithTimestampsResponse, Subscription, SubscriptionResponse, @@ -1128,6 +1142,7 @@ TextToSpeechStreamRequest, TextToSpeechStreamWithTimestampsRequest, TextToSpeechWithTimestampsRequest, + ThresholdGuardrail, TimeRange, TokenResponseModel, Tool, @@ -1139,7 +1154,6 @@ ToolRequestModel, ToolRequestModelToolConfig, ToolRequestModelToolConfig_Client, - ToolRequestModelToolConfig_Mcp, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook, ToolResponseModel, @@ -1172,8 +1186,11 @@ TtsOutputFormat, TurnConfig, TurnConfigWorkflowOverride, + TurnEagerness, TurnMode, + TwilioEdgeLocation, TwilioOutboundCallResponse, + TwilioRegionId, TxtExportOptions, UnitTestCommonModel, UnitTestCommonModelDynamicVariablesValue, @@ -1218,6 +1235,7 @@ VoiceSample, VoiceSamplePreviewResponseModel, VoiceSampleVisualWaveformResponseModel, + VoiceSegment, VoiceSettings, VoiceSharingModerationCheckResponseModel, VoiceSharingResponse, @@ -1395,6 +1413,7 @@ text_to_sound_effects, text_to_speech, text_to_voice, + tokens, usage, user, v_1_text_to_speech_voice_id_multi_stream_input, @@ -1461,10 +1480,14 @@ BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url, ) from .text_to_dialogue import ( + BodyTextToDialogueFullWithTimestampsApplyTextNormalization, BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + BodyTextToDialogueStreamWithTimestampsApplyTextNormalization, TextToDialogueConvertRequestOutputFormat, + TextToDialogueConvertWithTimestampsRequestOutputFormat, TextToDialogueStreamRequestOutputFormat, + TextToDialogueStreamWithTimestampsRequestOutputFormat, ) from .text_to_sound_effects import TextToSoundEffectsConvertRequestOutputFormat from .text_to_speech import ( @@ -1983,6 +2006,7 @@ "AudioNativeProjectSettingsResponseModelStatus": ".types", "AudioOutput": ".types", "AudioOutputMulti": ".types", + "AudioWithTimestampsAndVoiceSegmentsResponseModel": ".types", "AudioWithTimestampsResponse": ".types", "AuthConnectionLocator": ".types", "AuthSettings": ".types", @@ -2013,8 +2037,10 @@ "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url": ".studio", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge": ".types", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender": ".types", + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization": ".text_to_dialogue", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".text_to_dialogue", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".text_to_dialogue", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization": ".text_to_dialogue", "BodyTextToSpeechFullApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization": ".text_to_speech", "BodyTextToSpeechStreamApplyTextNormalization": ".text_to_speech", @@ -2345,6 +2371,8 @@ "GetVoicesResponse": ".types", "GetVoicesV2Response": ".types", "GetWorkspaceSecretsResponseModel": ".types", + "GuardrailsV1Input": ".types", + "GuardrailsV1Output": ".types", "HistoryAlignmentResponseModel": ".types", "HistoryAlignmentsResponseModel": ".types", "HistoryItemResponse": ".types", @@ -2417,6 +2445,9 @@ "Model": ".types", "ModelRatesResponseModel": ".types", "ModelSettingsResponseModel": ".types", + "ModerationConfig": ".types", + "ModerationGuardrailInput": ".types", + "ModerationGuardrailOutput": ".types", "MultichannelSpeechToTextResponseModel": ".types", "MultipartMusicResponse": ".types", "MusicComposeDetailedRequestOutputFormat": ".music", @@ -2552,7 +2583,9 @@ "ReceiveMessageMulti": ".v_1_text_to_speech_voice_id_multi_stream_input", "RecordingResponse": ".types", "ReferencedToolCommonModel": ".types", + "ReferencedToolCommonModelType": ".types", "RegexParameterEvaluationStrategy": ".types", + "RegionConfigRequest": ".types", "RemoveMemberFromGroupRequest": ".types", "Render": ".types", "RenderStatus": ".types", @@ -2588,6 +2621,8 @@ "SimilarVoiceCategory": ".types", "SimilarVoicesForSpeakerResponse": ".types", "SingleTestRunRequestModel": ".types", + "SingleUseTokenResponseModel": ".types", + "SingleUseTokenType": ".types", "SipMediaEncryptionEnum": ".types", "SipTrunkCredentialsRequestModel": ".types", "SipTrunkOutboundCallResponse": ".types", @@ -2624,6 +2659,7 @@ "SrtExportOptions": ".types", "StartPvcVoiceTrainingResponseModel": ".types", "StartSpeakerSeparationResponseModel": ".types", + "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel": ".types", "StreamingAudioChunkWithTimestampsResponse": ".types", "Subscription": ".types", "SubscriptionResponse": ".types", @@ -2662,7 +2698,9 @@ "TestToolResultModel": ".types", "TestsFeatureUsageCommonModel": ".types", "TextToDialogueConvertRequestOutputFormat": ".text_to_dialogue", + "TextToDialogueConvertWithTimestampsRequestOutputFormat": ".text_to_dialogue", "TextToDialogueStreamRequestOutputFormat": ".text_to_dialogue", + "TextToDialogueStreamWithTimestampsRequestOutputFormat": ".text_to_dialogue", "TextToSoundEffectsConvertRequestOutputFormat": ".text_to_sound_effects", "TextToSpeechApplyTextNormalizationEnum": ".types", "TextToSpeechConvertRequestOutputFormat": ".text_to_speech", @@ -2677,6 +2715,7 @@ "TextToVoiceCreatePreviewsRequestOutputFormat": ".text_to_voice", "TextToVoiceDesignRequestOutputFormat": ".text_to_voice", "TextToVoiceRemixRequestOutputFormat": ".text_to_voice", + "ThresholdGuardrail": ".types", "TimeRange": ".types", "TokenResponseModel": ".types", "TooEarlyError": ".errors", @@ -2689,7 +2728,6 @@ "ToolRequestModel": ".types", "ToolRequestModelToolConfig": ".types", "ToolRequestModelToolConfig_Client": ".types", - "ToolRequestModelToolConfig_Mcp": ".types", "ToolRequestModelToolConfig_System": ".types", "ToolRequestModelToolConfig_Webhook": ".types", "ToolResponseModel": ".types", @@ -2722,8 +2760,11 @@ "TtsOutputFormat": ".types", "TurnConfig": ".types", "TurnConfigWorkflowOverride": ".types", + "TurnEagerness": ".types", "TurnMode": ".types", + "TwilioEdgeLocation": ".types", "TwilioOutboundCallResponse": ".types", + "TwilioRegionId": ".types", "TxtExportOptions": ".types", "UnauthorizedError": ".errors", "UnitTestCommonModel": ".types", @@ -2771,6 +2812,7 @@ "VoiceSample": ".types", "VoiceSamplePreviewResponseModel": ".types", "VoiceSampleVisualWaveformResponseModel": ".types", + "VoiceSegment": ".types", "VoiceSettings": ".types", "VoiceSharingModerationCheckResponseModel": ".types", "VoiceSharingResponse": ".types", @@ -2943,6 +2985,7 @@ "text_to_sound_effects": ".text_to_sound_effects", "text_to_speech": ".text_to_speech", "text_to_voice": ".text_to_voice", + "tokens": ".tokens", "usage": ".usage", "user": ".user", "v_1_text_to_speech_voice_id_multi_stream_input": ".v_1_text_to_speech_voice_id_multi_stream_input", @@ -3470,6 +3513,7 @@ def __dir__(): "AudioNativeProjectSettingsResponseModelStatus", "AudioOutput", "AudioOutputMulti", + "AudioWithTimestampsAndVoiceSegmentsResponseModel", "AudioWithTimestampsResponse", "AuthConnectionLocator", "AuthSettings", @@ -3500,8 +3544,10 @@ def __dir__(): "BodyCreatePodcastV1StudioPodcastsPostSourceItem_Url", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge", "BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender", + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization", "BodyTextToSpeechFullApplyTextNormalization", "BodyTextToSpeechFullWithTimestampsApplyTextNormalization", "BodyTextToSpeechStreamApplyTextNormalization", @@ -3832,6 +3878,8 @@ def __dir__(): "GetVoicesResponse", "GetVoicesV2Response", "GetWorkspaceSecretsResponseModel", + "GuardrailsV1Input", + "GuardrailsV1Output", "HistoryAlignmentResponseModel", "HistoryAlignmentsResponseModel", "HistoryItemResponse", @@ -3904,6 +3952,9 @@ def __dir__(): "Model", "ModelRatesResponseModel", "ModelSettingsResponseModel", + "ModerationConfig", + "ModerationGuardrailInput", + "ModerationGuardrailOutput", "MultichannelSpeechToTextResponseModel", "MultipartMusicResponse", "MusicComposeDetailedRequestOutputFormat", @@ -4039,7 +4090,9 @@ def __dir__(): "ReceiveMessageMulti", "RecordingResponse", "ReferencedToolCommonModel", + "ReferencedToolCommonModelType", "RegexParameterEvaluationStrategy", + "RegionConfigRequest", "RemoveMemberFromGroupRequest", "Render", "RenderStatus", @@ -4075,6 +4128,8 @@ def __dir__(): "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", "SingleTestRunRequestModel", + "SingleUseTokenResponseModel", + "SingleUseTokenType", "SipMediaEncryptionEnum", "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", @@ -4111,6 +4166,7 @@ def __dir__(): "SrtExportOptions", "StartPvcVoiceTrainingResponseModel", "StartSpeakerSeparationResponseModel", + "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel", "StreamingAudioChunkWithTimestampsResponse", "Subscription", "SubscriptionResponse", @@ -4149,7 +4205,9 @@ def __dir__(): "TestToolResultModel", "TestsFeatureUsageCommonModel", "TextToDialogueConvertRequestOutputFormat", + "TextToDialogueConvertWithTimestampsRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", + "TextToDialogueStreamWithTimestampsRequestOutputFormat", "TextToSoundEffectsConvertRequestOutputFormat", "TextToSpeechApplyTextNormalizationEnum", "TextToSpeechConvertRequestOutputFormat", @@ -4164,6 +4222,7 @@ def __dir__(): "TextToVoiceCreatePreviewsRequestOutputFormat", "TextToVoiceDesignRequestOutputFormat", "TextToVoiceRemixRequestOutputFormat", + "ThresholdGuardrail", "TimeRange", "TokenResponseModel", "TooEarlyError", @@ -4176,7 +4235,6 @@ def __dir__(): "ToolRequestModel", "ToolRequestModelToolConfig", "ToolRequestModelToolConfig_Client", - "ToolRequestModelToolConfig_Mcp", "ToolRequestModelToolConfig_System", "ToolRequestModelToolConfig_Webhook", "ToolResponseModel", @@ -4209,8 +4267,11 @@ def __dir__(): "TtsOutputFormat", "TurnConfig", "TurnConfigWorkflowOverride", + "TurnEagerness", "TurnMode", + "TwilioEdgeLocation", "TwilioOutboundCallResponse", + "TwilioRegionId", "TxtExportOptions", "UnauthorizedError", "UnitTestCommonModel", @@ -4258,6 +4319,7 @@ def __dir__(): "VoiceSample", "VoiceSamplePreviewResponseModel", "VoiceSampleVisualWaveformResponseModel", + "VoiceSegment", "VoiceSettings", "VoiceSharingModerationCheckResponseModel", "VoiceSharingResponse", @@ -4430,6 +4492,7 @@ def __dir__(): "text_to_sound_effects", "text_to_speech", "text_to_voice", + "tokens", "usage", "user", "v_1_text_to_speech_voice_id_multi_stream_input", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index dcd099d0..73fa0f77 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -29,6 +29,7 @@ from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient from .text_to_voice.client import AsyncTextToVoiceClient, TextToVoiceClient + from .tokens.client import AsyncTokensClient, TokensClient from .usage.client import AsyncUsageClient, UsageClient from .user.client import AsyncUserClient, UserClient from .voices.client import AsyncVoicesClient, VoicesClient @@ -124,6 +125,7 @@ def __init__( self._forced_alignment: typing.Optional[ForcedAlignmentClient] = None self._conversational_ai: typing.Optional[ConversationalAiClient] = None self._music: typing.Optional[MusicClient] = None + self._tokens: typing.Optional[TokensClient] = None self._workspace: typing.Optional[WorkspaceClient] = None @property @@ -338,6 +340,14 @@ def music(self): self._music = MusicClient(client_wrapper=self._client_wrapper) return self._music + @property + def tokens(self): + if self._tokens is None: + from .tokens.client import TokensClient # noqa: E402 + + self._tokens = TokensClient(client_wrapper=self._client_wrapper) + return self._tokens + @property def workspace(self): if self._workspace is None: @@ -435,6 +445,7 @@ def __init__( self._forced_alignment: typing.Optional[AsyncForcedAlignmentClient] = None self._conversational_ai: typing.Optional[AsyncConversationalAiClient] = None self._music: typing.Optional[AsyncMusicClient] = None + self._tokens: typing.Optional[AsyncTokensClient] = None self._workspace: typing.Optional[AsyncWorkspaceClient] = None @property @@ -657,6 +668,14 @@ def music(self): self._music = AsyncMusicClient(client_wrapper=self._client_wrapper) return self._music + @property + def tokens(self): + if self._tokens is None: + from .tokens.client import AsyncTokensClient # noqa: E402 + + self._tokens = AsyncTokensClient(client_wrapper=self._client_wrapper) + return self._tokens + @property def workspace(self): if self._workspace is None: diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py index 43663c59..21e9a492 100644 --- a/src/elevenlabs/conversational_ai/__init__.py +++ b/src/elevenlabs/conversational_ai/__init__.py @@ -23,6 +23,7 @@ twilio, ) from .conversations import ConversationsListRequestSummaryMode + from .mcp_servers import McpServerConfigUpdateRequestModelRequestHeadersValue from .phone_numbers import ( PhoneNumbersCreateRequestBody, PhoneNumbersCreateRequestBody_SipTrunk, @@ -41,6 +42,7 @@ _dynamic_imports: typing.Dict[str, str] = { "ConversationsListRequestSummaryMode": ".conversations", "CreateUnitTestRequestDynamicVariablesValue": ".tests", + "McpServerConfigUpdateRequestModelRequestHeadersValue": ".mcp_servers", "PhoneNumbersCreateRequestBody": ".phone_numbers", "PhoneNumbersCreateRequestBody_SipTrunk": ".phone_numbers", "PhoneNumbersCreateRequestBody_Twilio": ".phone_numbers", @@ -95,6 +97,7 @@ def __dir__(): __all__ = [ "ConversationsListRequestSummaryMode", "CreateUnitTestRequestDynamicVariablesValue", + "McpServerConfigUpdateRequestModelRequestHeadersValue", "PhoneNumbersCreateRequestBody", "PhoneNumbersCreateRequestBody_SipTrunk", "PhoneNumbersCreateRequestBody_Twilio", diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py index e112861b..5424d3a4 100644 --- a/src/elevenlabs/conversational_ai/conversations/client.py +++ b/src/elevenlabs/conversational_ai/conversations/client.py @@ -134,6 +134,7 @@ def list( user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, + search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetConversationsPageResponseModel: """ @@ -165,6 +166,9 @@ def list( summary_mode : typing.Optional[ConversationsListRequestSummaryMode] Whether to include transcript summaries in the response. + search : typing.Optional[str] + Full-text or fuzzy search over transcript messages + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -189,6 +193,7 @@ def list( user_id="user_id", page_size=1, summary_mode="exclude", + search="search", ) """ _response = self._raw_client.list( @@ -200,6 +205,7 @@ def list( user_id=user_id, page_size=page_size, summary_mode=summary_mode, + search=search, request_options=request_options, ) return _response.data @@ -418,6 +424,7 @@ async def list( user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, + search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetConversationsPageResponseModel: """ @@ -449,6 +456,9 @@ async def list( summary_mode : typing.Optional[ConversationsListRequestSummaryMode] Whether to include transcript summaries in the response. + search : typing.Optional[str] + Full-text or fuzzy search over transcript messages + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -478,6 +488,7 @@ async def main() -> None: user_id="user_id", page_size=1, summary_mode="exclude", + search="search", ) @@ -492,6 +503,7 @@ async def main() -> None: user_id=user_id, page_size=page_size, summary_mode=summary_mode, + search=search, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py index 2c44eb2f..7b23b8cc 100644 --- a/src/elevenlabs/conversational_ai/conversations/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py @@ -156,6 +156,7 @@ def list( user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, + search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetConversationsPageResponseModel]: """ @@ -187,6 +188,9 @@ def list( summary_mode : typing.Optional[ConversationsListRequestSummaryMode] Whether to include transcript summaries in the response. + search : typing.Optional[str] + Full-text or fuzzy search over transcript messages + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -207,6 +211,7 @@ def list( "user_id": user_id, "page_size": page_size, "summary_mode": summary_mode, + "search": search, }, request_options=request_options, ) @@ -476,6 +481,7 @@ async def list( user_id: typing.Optional[str] = None, page_size: typing.Optional[int] = None, summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None, + search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetConversationsPageResponseModel]: """ @@ -507,6 +513,9 @@ async def list( summary_mode : typing.Optional[ConversationsListRequestSummaryMode] Whether to include transcript summaries in the response. + search : typing.Optional[str] + Full-text or fuzzy search over transcript messages + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -527,6 +536,7 @@ async def list( "user_id": user_id, "page_size": page_size, "summary_mode": summary_mode, + "search": search, }, request_options=request_options, ) diff --git a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py index 3fe0cfa4..bc6acd72 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py @@ -6,8 +6,10 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .types import McpServerConfigUpdateRequestModelRequestHeadersValue from . import approval_policy, tool_approvals, tools _dynamic_imports: typing.Dict[str, str] = { + "McpServerConfigUpdateRequestModelRequestHeadersValue": ".types", "approval_policy": ".approval_policy", "tool_approvals": ".tool_approvals", "tools": ".tools", @@ -35,4 +37,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["approval_policy", "tool_approvals", "tools"] +__all__ = ["McpServerConfigUpdateRequestModelRequestHeadersValue", "approval_policy", "tool_approvals", "tools"] diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py index e6c8beba..21aff505 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py @@ -10,7 +10,11 @@ from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel +from ...types.tool_execution_mode import ToolExecutionMode from .raw_client import AsyncRawMcpServersClient, RawMcpServersClient +from .types.mcp_server_config_update_request_model_request_headers_value import ( + McpServerConfigUpdateRequestModelRequestHeadersValue, +) if typing.TYPE_CHECKING: from .approval_policy.client import ApprovalPolicyClient, AsyncApprovalPolicyClient @@ -141,6 +145,10 @@ def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ @@ -160,6 +168,12 @@ def update( disable_interruptions : typing.Optional[bool] Whether to disable interruptions for all tools from this MCP server + execution_mode : typing.Optional[ToolExecutionMode] + The execution mode for all tools from this MCP server + + request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] + The headers to include in requests to the MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -184,6 +198,8 @@ def update( approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, disable_interruptions=disable_interruptions, + execution_mode=execution_mode, + request_headers=request_headers, request_options=request_options, ) return _response.data @@ -358,6 +374,10 @@ async def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> McpServerResponseModel: """ @@ -377,6 +397,12 @@ async def update( disable_interruptions : typing.Optional[bool] Whether to disable interruptions for all tools from this MCP server + execution_mode : typing.Optional[ToolExecutionMode] + The execution mode for all tools from this MCP server + + request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] + The headers to include in requests to the MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -409,6 +435,8 @@ async def main() -> None: approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, disable_interruptions=disable_interruptions, + execution_mode=execution_mode, + request_headers=request_headers, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py index 8299a860..d43b9c2d 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py @@ -16,6 +16,10 @@ from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel +from ...types.tool_execution_mode import ToolExecutionMode +from .types.mcp_server_config_update_request_model_request_headers_value import ( + McpServerConfigUpdateRequestModelRequestHeadersValue, +) # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -186,6 +190,10 @@ def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[McpServerResponseModel]: """ @@ -205,6 +213,12 @@ def update( disable_interruptions : typing.Optional[bool] Whether to disable interruptions for all tools from this MCP server + execution_mode : typing.Optional[ToolExecutionMode] + The execution mode for all tools from this MCP server + + request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] + The headers to include in requests to the MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -220,6 +234,12 @@ def update( "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, "disable_interruptions": disable_interruptions, + "execution_mode": execution_mode, + "request_headers": convert_and_respect_annotation_metadata( + object_=request_headers, + annotation=typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]], + direction="write", + ), }, headers={ "content-type": "application/json", @@ -421,6 +441,10 @@ async def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] + ] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[McpServerResponseModel]: """ @@ -440,6 +464,12 @@ async def update( disable_interruptions : typing.Optional[bool] Whether to disable interruptions for all tools from this MCP server + execution_mode : typing.Optional[ToolExecutionMode] + The execution mode for all tools from this MCP server + + request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] + The headers to include in requests to the MCP server + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -455,6 +485,12 @@ async def update( "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, "disable_interruptions": disable_interruptions, + "execution_mode": execution_mode, + "request_headers": convert_and_respect_annotation_metadata( + object_=request_headers, + annotation=typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]], + direction="write", + ), }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/mcp_servers/types/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/types/__init__.py new file mode 100644 index 00000000..61809be3 --- /dev/null +++ b/src/elevenlabs/conversational_ai/mcp_servers/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .mcp_server_config_update_request_model_request_headers_value import ( + McpServerConfigUpdateRequestModelRequestHeadersValue, + ) +_dynamic_imports: typing.Dict[str, str] = { + "McpServerConfigUpdateRequestModelRequestHeadersValue": ".mcp_server_config_update_request_model_request_headers_value" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["McpServerConfigUpdateRequestModelRequestHeadersValue"] diff --git a/src/elevenlabs/conversational_ai/mcp_servers/types/mcp_server_config_update_request_model_request_headers_value.py b/src/elevenlabs/conversational_ai/mcp_servers/types/mcp_server_config_update_request_model_request_headers_value.py new file mode 100644 index 00000000..3449a3b6 --- /dev/null +++ b/src/elevenlabs/conversational_ai/mcp_servers/types/mcp_server_config_update_request_model_request_headers_value.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....types.conv_ai_dynamic_variable import ConvAiDynamicVariable +from ....types.conv_ai_secret_locator import ConvAiSecretLocator + +McpServerConfigUpdateRequestModelRequestHeadersValue = typing.Union[str, ConvAiSecretLocator, ConvAiDynamicVariable] diff --git a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_create_request_body.py b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_create_request_body.py index 15e5b0f9..79fec242 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_create_request_body.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/types/phone_numbers_create_request_body.py @@ -10,6 +10,7 @@ from ....core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from ....types.inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel from ....types.outbound_sip_trunk_config_request_model import OutboundSipTrunkConfigRequestModel +from ....types.region_config_request import RegionConfigRequest class PhoneNumbersCreateRequestBody_Twilio(UncheckedBaseModel): @@ -24,6 +25,7 @@ class PhoneNumbersCreateRequestBody_Twilio(UncheckedBaseModel): supports_outbound: typing.Optional[bool] = None sid: str token: str + region_config: typing.Optional[RegionConfigRequest] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index cdf132d8..132e1c8f 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.20.1", + "User-Agent": "elevenlabs/v2.21.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.20.1", + "X-Fern-SDK-Version": "v2.21.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/core/http_sse/__init__.py b/src/elevenlabs/core/http_sse/__init__.py new file mode 100644 index 00000000..730e5a33 --- /dev/null +++ b/src/elevenlabs/core/http_sse/__init__.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from ._api import EventSource, aconnect_sse, connect_sse + from ._exceptions import SSEError + from ._models import ServerSentEvent +_dynamic_imports: typing.Dict[str, str] = { + "EventSource": "._api", + "SSEError": "._exceptions", + "ServerSentEvent": "._models", + "aconnect_sse": "._api", + "connect_sse": "._api", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"] diff --git a/src/elevenlabs/core/http_sse/_api.py b/src/elevenlabs/core/http_sse/_api.py new file mode 100644 index 00000000..f900b3b6 --- /dev/null +++ b/src/elevenlabs/core/http_sse/_api.py @@ -0,0 +1,112 @@ +# This file was auto-generated by Fern from our API Definition. + +import re +from contextlib import asynccontextmanager, contextmanager +from typing import Any, AsyncGenerator, AsyncIterator, Iterator, cast + +import httpx +from ._decoders import SSEDecoder +from ._exceptions import SSEError +from ._models import ServerSentEvent + + +class EventSource: + def __init__(self, response: httpx.Response) -> None: + self._response = response + + def _check_content_type(self) -> None: + content_type = self._response.headers.get("content-type", "").partition(";")[0] + if "text/event-stream" not in content_type: + raise SSEError( + f"Expected response header Content-Type to contain 'text/event-stream', got {content_type!r}" + ) + + def _get_charset(self) -> str: + """Extract charset from Content-Type header, fallback to UTF-8.""" + content_type = self._response.headers.get("content-type", "") + + # Parse charset parameter using regex + charset_match = re.search(r"charset=([^;\s]+)", content_type, re.IGNORECASE) + if charset_match: + charset = charset_match.group(1).strip("\"'") + # Validate that it's a known encoding + try: + # Test if the charset is valid by trying to encode/decode + "test".encode(charset).decode(charset) + return charset + except (LookupError, UnicodeError): + # If charset is invalid, fall back to UTF-8 + pass + + # Default to UTF-8 if no charset specified or invalid charset + return "utf-8" + + @property + def response(self) -> httpx.Response: + return self._response + + def iter_sse(self) -> Iterator[ServerSentEvent]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + + buffer = "" + for chunk in self._response.iter_bytes(): + # Decode chunk using detected charset + text_chunk = chunk.decode(charset, errors="replace") + buffer += text_chunk + + # Process complete lines + while "\n" in buffer: + line, buffer = buffer.split("\n", 1) + line = line.rstrip("\r") + sse = decoder.decode(line) + # when we reach a "\n\n" => line = '' + # => decoder will attempt to return an SSE Event + if sse is not None: + yield sse + + # Process any remaining data in buffer + if buffer.strip(): + line = buffer.rstrip("\r") + sse = decoder.decode(line) + if sse is not None: + yield sse + + async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: + self._check_content_type() + decoder = SSEDecoder() + lines = cast(AsyncGenerator[str, None], self._response.aiter_lines()) + try: + async for line in lines: + line = line.rstrip("\n") + sse = decoder.decode(line) + if sse is not None: + yield sse + finally: + await lines.aclose() + + +@contextmanager +def connect_sse(client: httpx.Client, method: str, url: str, **kwargs: Any) -> Iterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) + + +@asynccontextmanager +async def aconnect_sse( + client: httpx.AsyncClient, + method: str, + url: str, + **kwargs: Any, +) -> AsyncIterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + async with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) diff --git a/src/elevenlabs/core/http_sse/_decoders.py b/src/elevenlabs/core/http_sse/_decoders.py new file mode 100644 index 00000000..339b0890 --- /dev/null +++ b/src/elevenlabs/core/http_sse/_decoders.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import List, Optional + +from ._models import ServerSentEvent + + +class SSEDecoder: + def __init__(self) -> None: + self._event = "" + self._data: List[str] = [] + self._last_event_id = "" + self._retry: Optional[int] = None + + def decode(self, line: str) -> Optional[ServerSentEvent]: + # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 + + if not line: + if not self._event and not self._data and not self._last_event_id and self._retry is None: + return None + + sse = ServerSentEvent( + event=self._event, + data="\n".join(self._data), + id=self._last_event_id, + retry=self._retry, + ) + + # NOTE: as per the SSE spec, do not reset last_event_id. + self._event = "" + self._data = [] + self._retry = None + + return sse + + if line.startswith(":"): + return None + + fieldname, _, value = line.partition(":") + + if value.startswith(" "): + value = value[1:] + + if fieldname == "event": + self._event = value + elif fieldname == "data": + self._data.append(value) + elif fieldname == "id": + if "\0" in value: + pass + else: + self._last_event_id = value + elif fieldname == "retry": + try: + self._retry = int(value) + except (TypeError, ValueError): + pass + else: + pass # Field is ignored. + + return None diff --git a/src/elevenlabs/core/http_sse/_exceptions.py b/src/elevenlabs/core/http_sse/_exceptions.py new file mode 100644 index 00000000..81605a8a --- /dev/null +++ b/src/elevenlabs/core/http_sse/_exceptions.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import httpx + + +class SSEError(httpx.TransportError): + pass diff --git a/src/elevenlabs/core/http_sse/_models.py b/src/elevenlabs/core/http_sse/_models.py new file mode 100644 index 00000000..1af57f8f --- /dev/null +++ b/src/elevenlabs/core/http_sse/_models.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import json +from dataclasses import dataclass +from typing import Any, Optional + + +@dataclass(frozen=True) +class ServerSentEvent: + event: str = "message" + data: str = "" + id: str = "" + retry: Optional[int] = None + + def json(self) -> Any: + """Parse the data field as JSON.""" + return json.loads(self.data) diff --git a/src/elevenlabs/core/unchecked_base_model.py b/src/elevenlabs/core/unchecked_base_model.py index ae59845f..9ea71ca6 100644 --- a/src/elevenlabs/core/unchecked_base_model.py +++ b/src/elevenlabs/core/unchecked_base_model.py @@ -175,7 +175,42 @@ def _convert_undiscriminated_union_type(union_type: typing.Type[typing.Any], obj except Exception: continue - # If none of the types work, just return the first successful cast + # If none of the types work, try matching literal fields first, then fall back + # First pass: try types where all literal fields match the object's values + for inner_type in inner_types: + if inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel): + fields = _get_model_fields(inner_type) + literal_fields_match = True + + for field_name, field in fields.items(): + # Check if this field has a Literal type + if IS_PYDANTIC_V2: + field_type = field.annotation # type: ignore # Pydantic v2 + else: + field_type = field.outer_type_ # type: ignore # Pydantic v1 + + if is_literal_type(field_type): # type: ignore[arg-type] + field_default = _get_field_default(field) + name_or_alias = get_field_to_alias_mapping(inner_type).get(field_name, field_name) + # Get the value from the object + if isinstance(object_, dict): + object_value = object_.get(name_or_alias) + else: + object_value = getattr(object_, name_or_alias, None) + + # If the literal field value doesn't match, this type is not a match + if object_value is not None and field_default != object_value: + literal_fields_match = False + break + + # If all literal fields match, try to construct this type + if literal_fields_match: + try: + return construct_type(object_=object_, type_=inner_type) + except Exception: + continue + + # Second pass: if no literal matches, just return the first successful cast for inner_type in inner_types: try: return construct_type(object_=object_, type_=inner_type) diff --git a/src/elevenlabs/dubbing/client.py b/src/elevenlabs/dubbing/client.py index 1413c88c..6ddc182b 100644 --- a/src/elevenlabs/dubbing/client.py +++ b/src/elevenlabs/dubbing/client.py @@ -142,16 +142,16 @@ def create( Parameters ---------- - file : core.File + file : typing.Optional[core.File] See core.File for more documentation - csv_file : core.File + csv_file : typing.Optional[core.File] See core.File for more documentation - foreground_audio_file : core.File + foreground_audio_file : typing.Optional[core.File] See core.File for more documentation - background_audio_file : core.File + background_audio_file : typing.Optional[core.File] See core.File for more documentation name : typing.Optional[str] @@ -460,16 +460,16 @@ async def create( Parameters ---------- - file : core.File + file : typing.Optional[core.File] See core.File for more documentation - csv_file : core.File + csv_file : typing.Optional[core.File] See core.File for more documentation - foreground_audio_file : core.File + foreground_audio_file : typing.Optional[core.File] See core.File for more documentation - background_audio_file : core.File + background_audio_file : typing.Optional[core.File] See core.File for more documentation name : typing.Optional[str] diff --git a/src/elevenlabs/dubbing/raw_client.py b/src/elevenlabs/dubbing/raw_client.py index fac53b9a..8ec00b48 100644 --- a/src/elevenlabs/dubbing/raw_client.py +++ b/src/elevenlabs/dubbing/raw_client.py @@ -140,16 +140,16 @@ def create( Parameters ---------- - file : core.File + file : typing.Optional[core.File] See core.File for more documentation - csv_file : core.File + csv_file : typing.Optional[core.File] See core.File for more documentation - foreground_audio_file : core.File + foreground_audio_file : typing.Optional[core.File] See core.File for more documentation - background_audio_file : core.File + background_audio_file : typing.Optional[core.File] See core.File for more documentation name : typing.Optional[str] @@ -230,10 +230,10 @@ def create( "csv_fps": csv_fps, }, files={ - "file": file, - "csv_file": csv_file, - "foreground_audio_file": foreground_audio_file, - "background_audio_file": background_audio_file, + **({"file": file} if file is not None else {}), + **({"csv_file": csv_file} if csv_file is not None else {}), + **({"foreground_audio_file": foreground_audio_file} if foreground_audio_file is not None else {}), + **({"background_audio_file": background_audio_file} if background_audio_file is not None else {}), }, request_options=request_options, omit=OMIT, @@ -481,16 +481,16 @@ async def create( Parameters ---------- - file : core.File + file : typing.Optional[core.File] See core.File for more documentation - csv_file : core.File + csv_file : typing.Optional[core.File] See core.File for more documentation - foreground_audio_file : core.File + foreground_audio_file : typing.Optional[core.File] See core.File for more documentation - background_audio_file : core.File + background_audio_file : typing.Optional[core.File] See core.File for more documentation name : typing.Optional[str] @@ -571,10 +571,10 @@ async def create( "csv_fps": csv_fps, }, files={ - "file": file, - "csv_file": csv_file, - "foreground_audio_file": foreground_audio_file, - "background_audio_file": background_audio_file, + **({"file": file} if file is not None else {}), + **({"csv_file": csv_file} if csv_file is not None else {}), + **({"foreground_audio_file": foreground_audio_file} if foreground_audio_file is not None else {}), + **({"background_audio_file": background_audio_file} if background_audio_file is not None else {}), }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 2d1391d6..57a7231f 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -40,11 +40,9 @@ def compose( *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, @@ -61,9 +59,6 @@ def compose( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -73,9 +68,6 @@ def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -105,11 +97,9 @@ def compose( with self._raw_client.compose( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, respect_sections_durations=respect_sections_durations, store_for_inpainting=store_for_inpainting, @@ -122,11 +112,9 @@ def compose_detailed( *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -142,9 +130,6 @@ def compose_detailed( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -154,9 +139,6 @@ def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -183,11 +165,9 @@ def compose_detailed( with self._raw_client.compose_detailed( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, store_for_inpainting=store_for_inpainting, request_options=request_options, @@ -199,11 +179,9 @@ def stream( *, output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -219,9 +197,6 @@ def stream( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -231,9 +206,6 @@ def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -260,11 +232,9 @@ def stream( with self._raw_client.stream( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, store_for_inpainting=store_for_inpainting, request_options=request_options, @@ -302,11 +272,9 @@ async def compose( *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, @@ -323,9 +291,6 @@ async def compose( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -335,9 +300,6 @@ async def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -375,11 +337,9 @@ async def main() -> None: async with self._raw_client.compose( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, respect_sections_durations=respect_sections_durations, store_for_inpainting=store_for_inpainting, @@ -393,11 +353,9 @@ async def compose_detailed( *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -413,9 +371,6 @@ async def compose_detailed( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -425,9 +380,6 @@ async def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -462,11 +414,9 @@ async def main() -> None: async with self._raw_client.compose_detailed( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, store_for_inpainting=store_for_inpainting, request_options=request_options, @@ -479,11 +429,9 @@ async def stream( *, output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -499,9 +447,6 @@ async def stream( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -511,9 +456,6 @@ async def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -548,11 +490,9 @@ async def main() -> None: async with self._raw_client.stream( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, - seed=seed, force_instrumental=force_instrumental, store_for_inpainting=store_for_inpainting, request_options=request_options, diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index 1e5475df..51ae1fc7 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -31,11 +31,9 @@ def compose( *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, @@ -52,9 +50,6 @@ def compose( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -64,9 +59,6 @@ def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -92,15 +84,11 @@ def compose( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "respect_sections_durations": respect_sections_durations, "store_for_inpainting": store_for_inpainting, @@ -146,11 +134,9 @@ def compose_detailed( *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -166,9 +152,6 @@ def compose_detailed( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -178,9 +161,6 @@ def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -203,15 +183,11 @@ def compose_detailed( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "store_for_inpainting": store_for_inpainting, }, @@ -256,11 +232,9 @@ def stream( *, output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -276,9 +250,6 @@ def stream( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -288,9 +259,6 @@ def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -313,15 +281,11 @@ def stream( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "store_for_inpainting": store_for_inpainting, }, @@ -371,11 +335,9 @@ async def compose( *, output_format: typing.Optional[MusicComposeRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, respect_sections_durations: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, @@ -392,9 +354,6 @@ async def compose( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -404,9 +363,6 @@ async def compose( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -432,15 +388,11 @@ async def compose( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "respect_sections_durations": respect_sections_durations, "store_for_inpainting": store_for_inpainting, @@ -487,11 +439,9 @@ async def compose_detailed( *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -507,9 +457,6 @@ async def compose_detailed( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -519,9 +466,6 @@ async def compose_detailed( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -544,15 +488,11 @@ async def compose_detailed( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "store_for_inpainting": store_for_inpainting, }, @@ -598,11 +538,9 @@ async def stream( *, output_format: typing.Optional[MusicStreamRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, - seed: typing.Optional[int] = OMIT, force_instrumental: typing.Optional[bool] = OMIT, store_for_inpainting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -618,9 +556,6 @@ async def stream( prompt : typing.Optional[str] A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. - music_prompt : typing.Optional[MusicPrompt] - A music prompt. Deprecated. Use `composition_plan` instead. - composition_plan : typing.Optional[MusicPrompt] A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. @@ -630,9 +565,6 @@ async def stream( model_id : typing.Optional[typing.Literal["music_v1"]] The model to use for the generation. - seed : typing.Optional[int] - The seed to use for the generation. - force_instrumental : typing.Optional[bool] If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. @@ -655,15 +587,11 @@ async def stream( }, json={ "prompt": prompt, - "music_prompt": convert_and_respect_annotation_metadata( - object_=music_prompt, annotation=MusicPrompt, direction="write" - ), "composition_plan": convert_and_respect_annotation_metadata( object_=composition_plan, annotation=MusicPrompt, direction="write" ), "music_length_ms": music_length_ms, "model_id": model_id, - "seed": seed, "force_instrumental": force_instrumental, "store_for_inpainting": store_for_inpainting, }, diff --git a/src/elevenlabs/music_custom.py b/src/elevenlabs/music_custom.py index ae199183..19d05cb1 100644 --- a/src/elevenlabs/music_custom.py +++ b/src/elevenlabs/music_custom.py @@ -39,7 +39,6 @@ def compose_detailed( # type: ignore[override] *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, @@ -55,7 +54,6 @@ def compose_detailed( # type: ignore[override] stream = super().compose_detailed( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, @@ -168,7 +166,6 @@ async def compose_detailed( # type: ignore[override] *, output_format: typing.Optional[MusicComposeDetailedRequestOutputFormat] = None, prompt: typing.Optional[str] = OMIT, - music_prompt: typing.Optional[MusicPrompt] = OMIT, composition_plan: typing.Optional[MusicPrompt] = OMIT, music_length_ms: typing.Optional[int] = OMIT, model_id: typing.Optional[typing.Literal["music_v1"]] = OMIT, @@ -184,7 +181,6 @@ async def compose_detailed( # type: ignore[override] stream = super().compose_detailed( output_format=output_format, prompt=prompt, - music_prompt=music_prompt, composition_plan=composition_plan, music_length_ms=music_length_ms, model_id=model_id, diff --git a/src/elevenlabs/pronunciation_dictionaries/client.py b/src/elevenlabs/pronunciation_dictionaries/client.py index 112103c2..279045be 100644 --- a/src/elevenlabs/pronunciation_dictionaries/client.py +++ b/src/elevenlabs/pronunciation_dictionaries/client.py @@ -64,7 +64,7 @@ def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : core.File + file : typing.Optional[core.File] See core.File for more documentation description : typing.Optional[str] @@ -384,7 +384,7 @@ async def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : core.File + file : typing.Optional[core.File] See core.File for more documentation description : typing.Optional[str] diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py index 1ff0bb70..b6edd429 100644 --- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py +++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py @@ -55,7 +55,7 @@ def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : core.File + file : typing.Optional[core.File] See core.File for more documentation description : typing.Optional[str] @@ -81,7 +81,7 @@ def create_from_file( "workspace_access": workspace_access, }, files={ - "file": file, + **({"file": file} if file is not None else {}), }, request_options=request_options, omit=OMIT, @@ -467,7 +467,7 @@ async def create_from_file( name : str The name of the pronunciation dictionary, used for identification only. - file : core.File + file : typing.Optional[core.File] See core.File for more documentation description : typing.Optional[str] @@ -493,7 +493,7 @@ async def create_from_file( "workspace_access": workspace_access, }, files={ - "file": file, + **({"file": file} if file is not None else {}), }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index e504b216..7f06d38e 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -68,12 +68,12 @@ def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. - file : core.File - See core.File for more documentation - enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. + file : typing.Optional[core.File] + See core.File for more documentation + language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -141,8 +141,8 @@ def convert( """ _response = self._raw_client.convert( model_id=model_id, - file=file, enable_logging=enable_logging, + file=file, language_code=language_code, tag_audio_events=tag_audio_events, num_speakers=num_speakers, @@ -219,12 +219,12 @@ async def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. - file : core.File - See core.File for more documentation - enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. + file : typing.Optional[core.File] + See core.File for more documentation + language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -300,8 +300,8 @@ async def main() -> None: """ _response = await self._raw_client.convert( model_id=model_id, - file=file, enable_logging=enable_logging, + file=file, language_code=language_code, tag_audio_events=tag_audio_events, num_speakers=num_speakers, diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 19faac88..99dc7b89 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -58,12 +58,12 @@ def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. - file : core.File - See core.File for more documentation - enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. + file : typing.Optional[core.File] + See core.File for more documentation + language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -141,7 +141,7 @@ def convert( "webhook_metadata": webhook_metadata, }, files={ - "file": file, + **({"file": file} if file is not None else {}), **( {"additional_formats": (None, json.dumps(jsonable_encoder(additional_formats)), "application/json")} if additional_formats is not OMIT @@ -214,12 +214,12 @@ async def convert( model_id : str The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. - file : core.File - See core.File for more documentation - enable_logging : typing.Optional[bool] When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. + file : typing.Optional[core.File] + See core.File for more documentation + language_code : typing.Optional[str] An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. @@ -297,7 +297,7 @@ async def convert( "webhook_metadata": webhook_metadata, }, files={ - "file": file, + **({"file": file} if file is not None else {}), **( {"additional_formats": (None, json.dumps(jsonable_encoder(additional_formats)), "application/json")} if additional_formats is not OMIT diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py index 73a03d70..a5e5ca29 100644 --- a/src/elevenlabs/studio/projects/client.py +++ b/src/elevenlabs/studio/projects/client.py @@ -78,11 +78,11 @@ def create( self, *, name: str, - from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -114,9 +114,6 @@ def create( name : str The name of the Studio project, used for identification only. - from_document : core.File - See core.File for more documentation - default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -129,6 +126,9 @@ def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -281,11 +281,11 @@ def create( """ _response = self._raw_client.create( name=name, - from_document=from_document, default_title_voice_id=default_title_voice_id, default_paragraph_voice_id=default_paragraph_voice_id, default_model_id=default_model_id, from_url=from_url, + from_document=from_document, from_content_json=from_content_json, quality_preset=quality_preset, title=title, @@ -586,11 +586,11 @@ async def create( self, *, name: str, - from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -622,9 +622,6 @@ async def create( name : str The name of the Studio project, used for identification only. - from_document : core.File - See core.File for more documentation - default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -637,6 +634,9 @@ async def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -797,11 +797,11 @@ async def main() -> None: """ _response = await self._raw_client.create( name=name, - from_document=from_document, default_title_voice_id=default_title_voice_id, default_paragraph_voice_id=default_paragraph_voice_id, default_model_id=default_model_id, from_url=from_url, + from_document=from_document, from_content_json=from_content_json, quality_preset=quality_preset, title=title, diff --git a/src/elevenlabs/studio/projects/content/client.py b/src/elevenlabs/studio/projects/content/client.py index fef908e3..4625abb7 100644 --- a/src/elevenlabs/studio/projects/content/client.py +++ b/src/elevenlabs/studio/projects/content/client.py @@ -31,8 +31,8 @@ def update( self, project_id: str, *, - from_document: core.File, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -45,12 +45,12 @@ def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - from_document : core.File - See core.File for more documentation - from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -83,8 +83,8 @@ def update( """ _response = self._raw_client.update( project_id, - from_document=from_document, from_url=from_url, + from_document=from_document, from_content_json=from_content_json, auto_convert=auto_convert, request_options=request_options, @@ -111,8 +111,8 @@ async def update( self, project_id: str, *, - from_document: core.File, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -125,12 +125,12 @@ async def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - from_document : core.File - See core.File for more documentation - from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -171,8 +171,8 @@ async def main() -> None: """ _response = await self._raw_client.update( project_id, - from_document=from_document, from_url=from_url, + from_document=from_document, from_content_json=from_content_json, auto_convert=auto_convert, request_options=request_options, diff --git a/src/elevenlabs/studio/projects/content/raw_client.py b/src/elevenlabs/studio/projects/content/raw_client.py index 88812365..ae369538 100644 --- a/src/elevenlabs/studio/projects/content/raw_client.py +++ b/src/elevenlabs/studio/projects/content/raw_client.py @@ -26,8 +26,8 @@ def update( self, project_id: str, *, - from_document: core.File, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -40,12 +40,12 @@ def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - from_document : core.File - See core.File for more documentation - from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -74,7 +74,7 @@ def update( "auto_convert": auto_convert, }, files={ - "from_document": from_document, + **({"from_document": from_document} if from_document is not None else {}), }, request_options=request_options, omit=OMIT, @@ -115,8 +115,8 @@ async def update( self, project_id: str, *, - from_document: core.File, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, auto_convert: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -129,12 +129,12 @@ async def update( project_id : str The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. - from_document : core.File - See core.File for more documentation - from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -163,7 +163,7 @@ async def update( "auto_convert": auto_convert, }, files={ - "from_document": from_document, + **({"from_document": from_document} if from_document is not None else {}), }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py index 891676d6..d9c6e791 100644 --- a/src/elevenlabs/studio/projects/raw_client.py +++ b/src/elevenlabs/studio/projects/raw_client.py @@ -80,11 +80,11 @@ def create( self, *, name: str, - from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -116,9 +116,6 @@ def create( name : str The name of the Studio project, used for identification only. - from_document : core.File - See core.File for more documentation - default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -131,6 +128,9 @@ def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -302,7 +302,7 @@ def create( "source_type": source_type, }, files={ - "from_document": from_document, + **({"from_document": from_document} if from_document is not None else {}), }, request_options=request_options, omit=OMIT, @@ -644,11 +644,11 @@ async def create( self, *, name: str, - from_document: core.File, default_title_voice_id: typing.Optional[str] = OMIT, default_paragraph_voice_id: typing.Optional[str] = OMIT, default_model_id: typing.Optional[str] = OMIT, from_url: typing.Optional[str] = OMIT, + from_document: typing.Optional[core.File] = OMIT, from_content_json: typing.Optional[str] = OMIT, quality_preset: typing.Optional[str] = OMIT, title: typing.Optional[str] = OMIT, @@ -680,9 +680,6 @@ async def create( name : str The name of the Studio project, used for identification only. - from_document : core.File - See core.File for more documentation - default_title_voice_id : typing.Optional[str] The voice_id that corresponds to the default voice used for new titles. @@ -695,6 +692,9 @@ async def create( from_url : typing.Optional[str] An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + from_document : typing.Optional[core.File] + See core.File for more documentation + from_content_json : typing.Optional[str] An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. @@ -866,7 +866,7 @@ async def create( "source_type": source_type, }, files={ - "from_document": from_document, + **({"from_document": from_document} if from_document is not None else {}), }, request_options=request_options, omit=OMIT, diff --git a/src/elevenlabs/text_to_dialogue/__init__.py b/src/elevenlabs/text_to_dialogue/__init__.py index 0939fe36..4741248d 100644 --- a/src/elevenlabs/text_to_dialogue/__init__.py +++ b/src/elevenlabs/text_to_dialogue/__init__.py @@ -7,16 +7,24 @@ if typing.TYPE_CHECKING: from .types import ( + BodyTextToDialogueFullWithTimestampsApplyTextNormalization, BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, + BodyTextToDialogueStreamWithTimestampsApplyTextNormalization, TextToDialogueConvertRequestOutputFormat, + TextToDialogueConvertWithTimestampsRequestOutputFormat, TextToDialogueStreamRequestOutputFormat, + TextToDialogueStreamWithTimestampsRequestOutputFormat, ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization": ".types", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".types", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".types", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization": ".types", "TextToDialogueConvertRequestOutputFormat": ".types", + "TextToDialogueConvertWithTimestampsRequestOutputFormat": ".types", "TextToDialogueStreamRequestOutputFormat": ".types", + "TextToDialogueStreamWithTimestampsRequestOutputFormat": ".types", } @@ -42,8 +50,12 @@ def __dir__(): __all__ = [ + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization", "TextToDialogueConvertRequestOutputFormat", + "TextToDialogueConvertWithTimestampsRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", + "TextToDialogueStreamWithTimestampsRequestOutputFormat", ] diff --git a/src/elevenlabs/text_to_dialogue/client.py b/src/elevenlabs/text_to_dialogue/client.py index eb60a6c6..ee346981 100644 --- a/src/elevenlabs/text_to_dialogue/client.py +++ b/src/elevenlabs/text_to_dialogue/client.py @@ -4,18 +4,36 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.audio_with_timestamps_and_voice_segments_response_model import ( + AudioWithTimestampsAndVoiceSegmentsResponseModel, +) from ..types.dialogue_input import DialogueInput from ..types.model_settings_response_model import ModelSettingsResponseModel from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator +from ..types.streaming_audio_chunk_with_timestamps_and_voice_segments_response_model import ( + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, +) from .raw_client import AsyncRawTextToDialogueClient, RawTextToDialogueClient +from .types.body_text_to_dialogue_full_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueFullWithTimestampsApplyTextNormalization, +) from .types.body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, ) from .types.body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, ) +from .types.body_text_to_dialogue_stream_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueStreamWithTimestampsApplyTextNormalization, +) from .types.text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat +from .types.text_to_dialogue_convert_with_timestamps_request_output_format import ( + TextToDialogueConvertWithTimestampsRequestOutputFormat, +) from .types.text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat +from .types.text_to_dialogue_stream_with_timestamps_request_output_format import ( + TextToDialogueStreamWithTimestampsRequestOutputFormat, +) # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -210,6 +228,180 @@ def stream( ) as r: yield from r.data + def stream_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]: + """ + Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Yields + ------ + typing.Iterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel] + Stream of transcription chunks + + Examples + -------- + from elevenlabs import DialogueInput, ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + response = client.text_to_dialogue.stream_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], + ) + for chunk in response: + yield chunk + """ + with self._raw_client.stream_with_timestamps( + inputs=inputs, + output_format=output_format, + model_id=model_id, + language_code=language_code, + settings=settings, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, + seed=seed, + apply_text_normalization=apply_text_normalization, + request_options=request_options, + ) as r: + yield from r.data + + def convert_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AudioWithTimestampsAndVoiceSegmentsResponseModel: + """ + Generate dialogue from text with precise character-level timing information for audio-text synchronization. + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AudioWithTimestampsAndVoiceSegmentsResponseModel + Successful Response + + Examples + -------- + from elevenlabs import DialogueInput, ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.text_to_dialogue.convert_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], + ) + """ + _response = self._raw_client.convert_with_timestamps( + inputs=inputs, + output_format=output_format, + model_id=model_id, + language_code=language_code, + settings=settings, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, + seed=seed, + apply_text_normalization=apply_text_normalization, + request_options=request_options, + ) + return _response.data + class AsyncTextToDialogueClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -417,3 +609,194 @@ async def main() -> None: ) as r: async for _chunk in r.data: yield _chunk + + async def stream_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]: + """ + Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Yields + ------ + typing.AsyncIterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel] + Stream of transcription chunks + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs, DialogueInput + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + response = await client.text_to_dialogue.stream_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], + ) + async for chunk in response: + yield chunk + + + asyncio.run(main()) + """ + async with self._raw_client.stream_with_timestamps( + inputs=inputs, + output_format=output_format, + model_id=model_id, + language_code=language_code, + settings=settings, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, + seed=seed, + apply_text_normalization=apply_text_normalization, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk + + async def convert_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AudioWithTimestampsAndVoiceSegmentsResponseModel: + """ + Generate dialogue from text with precise character-level timing information for audio-text synchronization. + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AudioWithTimestampsAndVoiceSegmentsResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs, DialogueInput + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.text_to_dialogue.convert_with_timestamps( + output_format="mp3_22050_32", + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I'm doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ), + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.convert_with_timestamps( + inputs=inputs, + output_format=output_format, + model_id=model_id, + language_code=language_code, + settings=settings, + pronunciation_dictionary_locators=pronunciation_dictionary_locators, + seed=seed, + apply_text_normalization=apply_text_normalization, + request_options=request_options, + ) + return _response.data diff --git a/src/elevenlabs/text_to_dialogue/raw_client.py b/src/elevenlabs/text_to_dialogue/raw_client.py index 4383ec96..07362ef1 100644 --- a/src/elevenlabs/text_to_dialogue/raw_client.py +++ b/src/elevenlabs/text_to_dialogue/raw_client.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import contextlib +import json import typing from json.decoder import JSONDecodeError @@ -11,18 +12,36 @@ from ..core.serialization import convert_and_respect_annotation_metadata from ..core.unchecked_base_model import construct_type from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.audio_with_timestamps_and_voice_segments_response_model import ( + AudioWithTimestampsAndVoiceSegmentsResponseModel, +) from ..types.dialogue_input import DialogueInput from ..types.http_validation_error import HttpValidationError from ..types.model_settings_response_model import ModelSettingsResponseModel from ..types.pronunciation_dictionary_version_locator import PronunciationDictionaryVersionLocator +from ..types.streaming_audio_chunk_with_timestamps_and_voice_segments_response_model import ( + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, +) +from .types.body_text_to_dialogue_full_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueFullWithTimestampsApplyTextNormalization, +) from .types.body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, ) from .types.body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, ) +from .types.body_text_to_dialogue_stream_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueStreamWithTimestampsApplyTextNormalization, +) from .types.text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat +from .types.text_to_dialogue_convert_with_timestamps_request_output_format import ( + TextToDialogueConvertWithTimestampsRequestOutputFormat, +) from .types.text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat +from .types.text_to_dialogue_stream_with_timestamps_request_output_format import ( + TextToDialogueStreamWithTimestampsRequestOutputFormat, +) # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -258,6 +277,240 @@ def _stream() -> HttpResponse[typing.Iterator[bytes]]: yield _stream() + @contextlib.contextmanager + def stream_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]]]: + """ + Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Yields + ------ + typing.Iterator[HttpResponse[typing.Iterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]]] + Stream of transcription chunks + """ + with self._client_wrapper.httpx_client.stream( + "v1/text-to-dialogue/stream/with-timestamps", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" + ), + "model_id": model_id, + "language_code": language_code, + "settings": convert_and_respect_annotation_metadata( + object_=settings, annotation=ModelSettingsResponseModel, direction="write" + ), + "pronunciation_dictionary_locators": convert_and_respect_annotation_metadata( + object_=pronunciation_dictionary_locators, + annotation=typing.Sequence[PronunciationDictionaryVersionLocator], + direction="write", + ), + "seed": seed, + "apply_text_normalization": apply_text_normalization, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + def _stream() -> HttpResponse[ + typing.Iterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel] + ]: + try: + if 200 <= _response.status_code < 300: + + def _iter(): + for _text in _response.iter_lines(): + try: + if len(_text) == 0: + continue + yield typing.cast( + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, + construct_type( + type_=StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, # type: ignore + object_=json.loads(_text), + ), + ) + except Exception: + pass + return + + return HttpResponse(response=_response, data=_iter()) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + + def convert_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[AudioWithTimestampsAndVoiceSegmentsResponseModel]: + """ + Generate dialogue from text with precise character-level timing information for audio-text synchronization. + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[AudioWithTimestampsAndVoiceSegmentsResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/text-to-dialogue/with-timestamps", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" + ), + "model_id": model_id, + "language_code": language_code, + "settings": convert_and_respect_annotation_metadata( + object_=settings, annotation=ModelSettingsResponseModel, direction="write" + ), + "pronunciation_dictionary_locators": convert_and_respect_annotation_metadata( + object_=pronunciation_dictionary_locators, + annotation=typing.Sequence[PronunciationDictionaryVersionLocator], + direction="write", + ), + "seed": seed, + "apply_text_normalization": apply_text_normalization, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AudioWithTimestampsAndVoiceSegmentsResponseModel, + construct_type( + type_=AudioWithTimestampsAndVoiceSegmentsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawTextToDialogueClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -490,3 +743,239 @@ async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) yield await _stream() + + @contextlib.asynccontextmanager + async def stream_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[ + AsyncHttpResponse[typing.AsyncIterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]] + ]: + """ + Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueStreamWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Yields + ------ + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel]]] + Stream of transcription chunks + """ + async with self._client_wrapper.httpx_client.stream( + "v1/text-to-dialogue/stream/with-timestamps", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" + ), + "model_id": model_id, + "language_code": language_code, + "settings": convert_and_respect_annotation_metadata( + object_=settings, annotation=ModelSettingsResponseModel, direction="write" + ), + "pronunciation_dictionary_locators": convert_and_respect_annotation_metadata( + object_=pronunciation_dictionary_locators, + annotation=typing.Sequence[PronunciationDictionaryVersionLocator], + direction="write", + ), + "seed": seed, + "apply_text_normalization": apply_text_normalization, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + async def _stream() -> AsyncHttpResponse[ + typing.AsyncIterator[StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel] + ]: + try: + if 200 <= _response.status_code < 300: + + async def _iter(): + async for _text in _response.aiter_lines(): + try: + if len(_text) == 0: + continue + yield typing.cast( + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, + construct_type( + type_=StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, # type: ignore + object_=json.loads(_text), + ), + ) + except Exception: + pass + return + + return AsyncHttpResponse(response=_response, data=_iter()) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() + + async def convert_with_timestamps( + self, + *, + inputs: typing.Sequence[DialogueInput], + output_format: typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] = None, + model_id: typing.Optional[str] = OMIT, + language_code: typing.Optional[str] = OMIT, + settings: typing.Optional[ModelSettingsResponseModel] = OMIT, + pronunciation_dictionary_locators: typing.Optional[ + typing.Sequence[PronunciationDictionaryVersionLocator] + ] = OMIT, + seed: typing.Optional[int] = OMIT, + apply_text_normalization: typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[AudioWithTimestampsAndVoiceSegmentsResponseModel]: + """ + Generate dialogue from text with precise character-level timing information for audio-text synchronization. + + Parameters + ---------- + inputs : typing.Sequence[DialogueInput] + A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + + output_format : typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + model_id : typing.Optional[str] + Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + + language_code : typing.Optional[str] + Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned. + + settings : typing.Optional[ModelSettingsResponseModel] + Settings controlling the dialogue generation. + + pronunciation_dictionary_locators : typing.Optional[typing.Sequence[PronunciationDictionaryVersionLocator]] + A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + + seed : typing.Optional[int] + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + + apply_text_normalization : typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization] + This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. For 'eleven_turbo_v2_5' and 'eleven_flash_v2_5' models, text normalization can only be enabled with Enterprise plans. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[AudioWithTimestampsAndVoiceSegmentsResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/text-to-dialogue/with-timestamps", + method="POST", + params={ + "output_format": output_format, + }, + json={ + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, annotation=typing.Sequence[DialogueInput], direction="write" + ), + "model_id": model_id, + "language_code": language_code, + "settings": convert_and_respect_annotation_metadata( + object_=settings, annotation=ModelSettingsResponseModel, direction="write" + ), + "pronunciation_dictionary_locators": convert_and_respect_annotation_metadata( + object_=pronunciation_dictionary_locators, + annotation=typing.Sequence[PronunciationDictionaryVersionLocator], + direction="write", + ), + "seed": seed, + "apply_text_normalization": apply_text_normalization, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + AudioWithTimestampsAndVoiceSegmentsResponseModel, + construct_type( + type_=AudioWithTimestampsAndVoiceSegmentsResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/text_to_dialogue/types/__init__.py b/src/elevenlabs/text_to_dialogue/types/__init__.py index c3b346d4..db4d0e02 100644 --- a/src/elevenlabs/text_to_dialogue/types/__init__.py +++ b/src/elevenlabs/text_to_dialogue/types/__init__.py @@ -6,19 +6,35 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .body_text_to_dialogue_full_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueFullWithTimestampsApplyTextNormalization, + ) from .body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization, ) from .body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization import ( BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization, ) + from .body_text_to_dialogue_stream_with_timestamps_apply_text_normalization import ( + BodyTextToDialogueStreamWithTimestampsApplyTextNormalization, + ) from .text_to_dialogue_convert_request_output_format import TextToDialogueConvertRequestOutputFormat + from .text_to_dialogue_convert_with_timestamps_request_output_format import ( + TextToDialogueConvertWithTimestampsRequestOutputFormat, + ) from .text_to_dialogue_stream_request_output_format import TextToDialogueStreamRequestOutputFormat + from .text_to_dialogue_stream_with_timestamps_request_output_format import ( + TextToDialogueStreamWithTimestampsRequestOutputFormat, + ) _dynamic_imports: typing.Dict[str, str] = { + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization": ".body_text_to_dialogue_full_with_timestamps_apply_text_normalization", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization": ".body_text_to_dialogue_multi_voice_streaming_v_1_text_to_dialogue_stream_post_apply_text_normalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization": ".body_text_to_dialogue_multi_voice_v_1_text_to_dialogue_post_apply_text_normalization", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization": ".body_text_to_dialogue_stream_with_timestamps_apply_text_normalization", "TextToDialogueConvertRequestOutputFormat": ".text_to_dialogue_convert_request_output_format", + "TextToDialogueConvertWithTimestampsRequestOutputFormat": ".text_to_dialogue_convert_with_timestamps_request_output_format", "TextToDialogueStreamRequestOutputFormat": ".text_to_dialogue_stream_request_output_format", + "TextToDialogueStreamWithTimestampsRequestOutputFormat": ".text_to_dialogue_stream_with_timestamps_request_output_format", } @@ -44,8 +60,12 @@ def __dir__(): __all__ = [ + "BodyTextToDialogueFullWithTimestampsApplyTextNormalization", "BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization", "BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization", + "BodyTextToDialogueStreamWithTimestampsApplyTextNormalization", "TextToDialogueConvertRequestOutputFormat", + "TextToDialogueConvertWithTimestampsRequestOutputFormat", "TextToDialogueStreamRequestOutputFormat", + "TextToDialogueStreamWithTimestampsRequestOutputFormat", ] diff --git a/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_full_with_timestamps_apply_text_normalization.py b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_full_with_timestamps_apply_text_normalization.py new file mode 100644 index 00000000..4e6ec30c --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_full_with_timestamps_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToDialogueFullWithTimestampsApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off"], typing.Any +] diff --git a/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_stream_with_timestamps_apply_text_normalization.py b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_stream_with_timestamps_apply_text_normalization.py new file mode 100644 index 00000000..f9e642a1 --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/body_text_to_dialogue_stream_with_timestamps_apply_text_normalization.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BodyTextToDialogueStreamWithTimestampsApplyTextNormalization = typing.Union[ + typing.Literal["auto", "on", "off"], typing.Any +] diff --git a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_with_timestamps_request_output_format.py b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_with_timestamps_request_output_format.py new file mode 100644 index 00000000..ce1489c7 --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_convert_with_timestamps_request_output_format.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToDialogueConvertWithTimestampsRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_with_timestamps_request_output_format.py b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_with_timestamps_request_output_format.py new file mode 100644 index 00000000..f961139c --- /dev/null +++ b/src/elevenlabs/text_to_dialogue/types/text_to_dialogue_stream_with_timestamps_request_output_format.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextToDialogueStreamWithTimestampsRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/tokens/__init__.py b/src/elevenlabs/tokens/__init__.py new file mode 100644 index 00000000..6dddf03b --- /dev/null +++ b/src/elevenlabs/tokens/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from . import single_use +_dynamic_imports: typing.Dict[str, str] = {"single_use": ".single_use"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["single_use"] diff --git a/src/elevenlabs/tokens/client.py b/src/elevenlabs/tokens/client.py new file mode 100644 index 00000000..73166fcf --- /dev/null +++ b/src/elevenlabs/tokens/client.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .raw_client import AsyncRawTokensClient, RawTokensClient + +if typing.TYPE_CHECKING: + from .single_use.client import AsyncSingleUseClient, SingleUseClient + + +class TokensClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawTokensClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._single_use: typing.Optional[SingleUseClient] = None + + @property + def with_raw_response(self) -> RawTokensClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawTokensClient + """ + return self._raw_client + + @property + def single_use(self): + if self._single_use is None: + from .single_use.client import SingleUseClient # noqa: E402 + + self._single_use = SingleUseClient(client_wrapper=self._client_wrapper) + return self._single_use + + +class AsyncTokensClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawTokensClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._single_use: typing.Optional[AsyncSingleUseClient] = None + + @property + def with_raw_response(self) -> AsyncRawTokensClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawTokensClient + """ + return self._raw_client + + @property + def single_use(self): + if self._single_use is None: + from .single_use.client import AsyncSingleUseClient # noqa: E402 + + self._single_use = AsyncSingleUseClient(client_wrapper=self._client_wrapper) + return self._single_use diff --git a/src/elevenlabs/tokens/raw_client.py b/src/elevenlabs/tokens/raw_client.py new file mode 100644 index 00000000..d45f2534 --- /dev/null +++ b/src/elevenlabs/tokens/raw_client.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + + +class RawTokensClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + +class AsyncRawTokensClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper diff --git a/src/elevenlabs/tokens/single_use/__init__.py b/src/elevenlabs/tokens/single_use/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/elevenlabs/tokens/single_use/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/elevenlabs/tokens/single_use/client.py b/src/elevenlabs/tokens/single_use/client.py new file mode 100644 index 00000000..e7fcc418 --- /dev/null +++ b/src/elevenlabs/tokens/single_use/client.py @@ -0,0 +1,100 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.request_options import RequestOptions +from ...types.single_use_token_response_model import SingleUseTokenResponseModel +from .raw_client import AsyncRawSingleUseClient, RawSingleUseClient + + +class SingleUseClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawSingleUseClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawSingleUseClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSingleUseClient + """ + return self._raw_client + + def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> SingleUseTokenResponseModel: + """ + Generate a time limited single-use token with embedded authentication for frontend clients. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SingleUseTokenResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.tokens.single_use.create() + """ + _response = self._raw_client.create(request_options=request_options) + return _response.data + + +class AsyncSingleUseClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawSingleUseClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawSingleUseClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSingleUseClient + """ + return self._raw_client + + async def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> SingleUseTokenResponseModel: + """ + Generate a time limited single-use token with embedded authentication for frontend clients. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SingleUseTokenResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.tokens.single_use.create() + + + asyncio.run(main()) + """ + _response = await self._raw_client.create(request_options=request_options) + return _response.data diff --git a/src/elevenlabs/tokens/single_use/raw_client.py b/src/elevenlabs/tokens/single_use/raw_client.py new file mode 100644 index 00000000..c87f8230 --- /dev/null +++ b/src/elevenlabs/tokens/single_use/raw_client.py @@ -0,0 +1,117 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.http_response import AsyncHttpResponse, HttpResponse +from ...core.request_options import RequestOptions +from ...core.unchecked_base_model import construct_type +from ...errors.unprocessable_entity_error import UnprocessableEntityError +from ...types.http_validation_error import HttpValidationError +from ...types.single_use_token_response_model import SingleUseTokenResponseModel + + +class RawSingleUseClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[SingleUseTokenResponseModel]: + """ + Generate a time limited single-use token with embedded authentication for frontend clients. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[SingleUseTokenResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/single-use-token/realtime_scribe", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + SingleUseTokenResponseModel, + construct_type( + type_=SingleUseTokenResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawSingleUseClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[SingleUseTokenResponseModel]: + """ + Generate a time limited single-use token with embedded authentication for frontend clients. + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[SingleUseTokenResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/single-use-token/realtime_scribe", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + SingleUseTokenResponseModel, + construct_type( + type_=SingleUseTokenResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 49cd0c8d..0fc859b3 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -558,6 +558,9 @@ from .audio_native_project_settings_response_model_status import AudioNativeProjectSettingsResponseModelStatus from .audio_output import AudioOutput from .audio_output_multi import AudioOutputMulti + from .audio_with_timestamps_and_voice_segments_response_model import ( + AudioWithTimestampsAndVoiceSegmentsResponseModel, + ) from .audio_with_timestamps_response import AudioWithTimestampsResponse from .auth_connection_locator import AuthConnectionLocator from .auth_settings import AuthSettings @@ -985,6 +988,8 @@ from .get_voices_response import GetVoicesResponse from .get_voices_v_2_response import GetVoicesV2Response from .get_workspace_secrets_response_model import GetWorkspaceSecretsResponseModel + from .guardrails_v_1_input import GuardrailsV1Input + from .guardrails_v_1_output import GuardrailsV1Output from .history_alignment_response_model import HistoryAlignmentResponseModel from .history_alignments_response_model import HistoryAlignmentsResponseModel from .history_item_response import HistoryItemResponse @@ -1057,6 +1062,9 @@ from .model import Model from .model_rates_response_model import ModelRatesResponseModel from .model_settings_response_model import ModelSettingsResponseModel + from .moderation_config import ModerationConfig + from .moderation_guardrail_input import ModerationGuardrailInput + from .moderation_guardrail_output import ModerationGuardrailOutput from .multichannel_speech_to_text_response_model import MultichannelSpeechToTextResponseModel from .multipart_music_response import MultipartMusicResponse from .music_prompt import MusicPrompt @@ -1202,7 +1210,9 @@ from .realtime_voice_settings import RealtimeVoiceSettings from .recording_response import RecordingResponse from .referenced_tool_common_model import ReferencedToolCommonModel + from .referenced_tool_common_model_type import ReferencedToolCommonModelType from .regex_parameter_evaluation_strategy import RegexParameterEvaluationStrategy + from .region_config_request import RegionConfigRequest from .remove_member_from_group_request import RemoveMemberFromGroupRequest from .render import Render from .render_status import RenderStatus @@ -1238,6 +1248,8 @@ from .similar_voice_category import SimilarVoiceCategory from .similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse from .single_test_run_request_model import SingleTestRunRequestModel + from .single_use_token_response_model import SingleUseTokenResponseModel + from .single_use_token_type import SingleUseTokenType from .sip_media_encryption_enum import SipMediaEncryptionEnum from .sip_trunk_credentials_request_model import SipTrunkCredentialsRequestModel from .sip_trunk_outbound_call_response import SipTrunkOutboundCallResponse @@ -1266,6 +1278,9 @@ from .srt_export_options import SrtExportOptions from .start_pvc_voice_training_response_model import StartPvcVoiceTrainingResponseModel from .start_speaker_separation_response_model import StartSpeakerSeparationResponseModel + from .streaming_audio_chunk_with_timestamps_and_voice_segments_response_model import ( + StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel, + ) from .streaming_audio_chunk_with_timestamps_response import StreamingAudioChunkWithTimestampsResponse from .subscription import Subscription from .subscription_response import SubscriptionResponse @@ -1313,6 +1328,7 @@ from .text_to_speech_stream_request import TextToSpeechStreamRequest from .text_to_speech_stream_with_timestamps_request import TextToSpeechStreamWithTimestampsRequest from .text_to_speech_with_timestamps_request import TextToSpeechWithTimestampsRequest + from .threshold_guardrail import ThresholdGuardrail from .time_range import TimeRange from .token_response_model import TokenResponseModel from .tool import Tool @@ -1325,7 +1341,6 @@ from .tool_request_model_tool_config import ( ToolRequestModelToolConfig, ToolRequestModelToolConfig_Client, - ToolRequestModelToolConfig_Mcp, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook, ) @@ -1361,8 +1376,11 @@ from .tts_output_format import TtsOutputFormat from .turn_config import TurnConfig from .turn_config_workflow_override import TurnConfigWorkflowOverride + from .turn_eagerness import TurnEagerness from .turn_mode import TurnMode + from .twilio_edge_location import TwilioEdgeLocation from .twilio_outbound_call_response import TwilioOutboundCallResponse + from .twilio_region_id import TwilioRegionId from .txt_export_options import TxtExportOptions from .unit_test_common_model import UnitTestCommonModel from .unit_test_common_model_dynamic_variables_value import UnitTestCommonModelDynamicVariablesValue @@ -1409,6 +1427,7 @@ from .voice_sample import VoiceSample from .voice_sample_preview_response_model import VoiceSamplePreviewResponseModel from .voice_sample_visual_waveform_response_model import VoiceSampleVisualWaveformResponseModel + from .voice_segment import VoiceSegment from .voice_settings import VoiceSettings from .voice_sharing_moderation_check_response_model import VoiceSharingModerationCheckResponseModel from .voice_sharing_response import VoiceSharingResponse @@ -2083,6 +2102,7 @@ "AudioNativeProjectSettingsResponseModelStatus": ".audio_native_project_settings_response_model_status", "AudioOutput": ".audio_output", "AudioOutputMulti": ".audio_output_multi", + "AudioWithTimestampsAndVoiceSegmentsResponseModel": ".audio_with_timestamps_and_voice_segments_response_model", "AudioWithTimestampsResponse": ".audio_with_timestamps_response", "AuthConnectionLocator": ".auth_connection_locator", "AuthSettings": ".auth_settings", @@ -2416,6 +2436,8 @@ "GetVoicesResponse": ".get_voices_response", "GetVoicesV2Response": ".get_voices_v_2_response", "GetWorkspaceSecretsResponseModel": ".get_workspace_secrets_response_model", + "GuardrailsV1Input": ".guardrails_v_1_input", + "GuardrailsV1Output": ".guardrails_v_1_output", "HistoryAlignmentResponseModel": ".history_alignment_response_model", "HistoryAlignmentsResponseModel": ".history_alignments_response_model", "HistoryItemResponse": ".history_item_response", @@ -2486,6 +2508,9 @@ "Model": ".model", "ModelRatesResponseModel": ".model_rates_response_model", "ModelSettingsResponseModel": ".model_settings_response_model", + "ModerationConfig": ".moderation_config", + "ModerationGuardrailInput": ".moderation_guardrail_input", + "ModerationGuardrailOutput": ".moderation_guardrail_output", "MultichannelSpeechToTextResponseModel": ".multichannel_speech_to_text_response_model", "MultipartMusicResponse": ".multipart_music_response", "MusicPrompt": ".music_prompt", @@ -2609,7 +2634,9 @@ "RealtimeVoiceSettings": ".realtime_voice_settings", "RecordingResponse": ".recording_response", "ReferencedToolCommonModel": ".referenced_tool_common_model", + "ReferencedToolCommonModelType": ".referenced_tool_common_model_type", "RegexParameterEvaluationStrategy": ".regex_parameter_evaluation_strategy", + "RegionConfigRequest": ".region_config_request", "RemoveMemberFromGroupRequest": ".remove_member_from_group_request", "Render": ".render", "RenderStatus": ".render_status", @@ -2643,6 +2670,8 @@ "SimilarVoiceCategory": ".similar_voice_category", "SimilarVoicesForSpeakerResponse": ".similar_voices_for_speaker_response", "SingleTestRunRequestModel": ".single_test_run_request_model", + "SingleUseTokenResponseModel": ".single_use_token_response_model", + "SingleUseTokenType": ".single_use_token_type", "SipMediaEncryptionEnum": ".sip_media_encryption_enum", "SipTrunkCredentialsRequestModel": ".sip_trunk_credentials_request_model", "SipTrunkOutboundCallResponse": ".sip_trunk_outbound_call_response", @@ -2671,6 +2700,7 @@ "SrtExportOptions": ".srt_export_options", "StartPvcVoiceTrainingResponseModel": ".start_pvc_voice_training_response_model", "StartSpeakerSeparationResponseModel": ".start_speaker_separation_response_model", + "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel": ".streaming_audio_chunk_with_timestamps_and_voice_segments_response_model", "StreamingAudioChunkWithTimestampsResponse": ".streaming_audio_chunk_with_timestamps_response", "Subscription": ".subscription", "SubscriptionResponse": ".subscription_response", @@ -2714,6 +2744,7 @@ "TextToSpeechStreamRequest": ".text_to_speech_stream_request", "TextToSpeechStreamWithTimestampsRequest": ".text_to_speech_stream_with_timestamps_request", "TextToSpeechWithTimestampsRequest": ".text_to_speech_with_timestamps_request", + "ThresholdGuardrail": ".threshold_guardrail", "TimeRange": ".time_range", "TokenResponseModel": ".token_response_model", "Tool": ".tool", @@ -2725,7 +2756,6 @@ "ToolRequestModel": ".tool_request_model", "ToolRequestModelToolConfig": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_Client": ".tool_request_model_tool_config", - "ToolRequestModelToolConfig_Mcp": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_System": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_Webhook": ".tool_request_model_tool_config", "ToolResponseModel": ".tool_response_model", @@ -2758,8 +2788,11 @@ "TtsOutputFormat": ".tts_output_format", "TurnConfig": ".turn_config", "TurnConfigWorkflowOverride": ".turn_config_workflow_override", + "TurnEagerness": ".turn_eagerness", "TurnMode": ".turn_mode", + "TwilioEdgeLocation": ".twilio_edge_location", "TwilioOutboundCallResponse": ".twilio_outbound_call_response", + "TwilioRegionId": ".twilio_region_id", "TxtExportOptions": ".txt_export_options", "UnitTestCommonModel": ".unit_test_common_model", "UnitTestCommonModelDynamicVariablesValue": ".unit_test_common_model_dynamic_variables_value", @@ -2804,6 +2837,7 @@ "VoiceSample": ".voice_sample", "VoiceSamplePreviewResponseModel": ".voice_sample_preview_response_model", "VoiceSampleVisualWaveformResponseModel": ".voice_sample_visual_waveform_response_model", + "VoiceSegment": ".voice_segment", "VoiceSettings": ".voice_settings", "VoiceSharingModerationCheckResponseModel": ".voice_sharing_moderation_check_response_model", "VoiceSharingResponse": ".voice_sharing_response", @@ -3468,6 +3502,7 @@ def __dir__(): "AudioNativeProjectSettingsResponseModelStatus", "AudioOutput", "AudioOutputMulti", + "AudioWithTimestampsAndVoiceSegmentsResponseModel", "AudioWithTimestampsResponse", "AuthConnectionLocator", "AuthSettings", @@ -3801,6 +3836,8 @@ def __dir__(): "GetVoicesResponse", "GetVoicesV2Response", "GetWorkspaceSecretsResponseModel", + "GuardrailsV1Input", + "GuardrailsV1Output", "HistoryAlignmentResponseModel", "HistoryAlignmentsResponseModel", "HistoryItemResponse", @@ -3871,6 +3908,9 @@ def __dir__(): "Model", "ModelRatesResponseModel", "ModelSettingsResponseModel", + "ModerationConfig", + "ModerationGuardrailInput", + "ModerationGuardrailOutput", "MultichannelSpeechToTextResponseModel", "MultipartMusicResponse", "MusicPrompt", @@ -3994,7 +4034,9 @@ def __dir__(): "RealtimeVoiceSettings", "RecordingResponse", "ReferencedToolCommonModel", + "ReferencedToolCommonModelType", "RegexParameterEvaluationStrategy", + "RegionConfigRequest", "RemoveMemberFromGroupRequest", "Render", "RenderStatus", @@ -4028,6 +4070,8 @@ def __dir__(): "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", "SingleTestRunRequestModel", + "SingleUseTokenResponseModel", + "SingleUseTokenType", "SipMediaEncryptionEnum", "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", @@ -4056,6 +4100,7 @@ def __dir__(): "SrtExportOptions", "StartPvcVoiceTrainingResponseModel", "StartSpeakerSeparationResponseModel", + "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel", "StreamingAudioChunkWithTimestampsResponse", "Subscription", "SubscriptionResponse", @@ -4099,6 +4144,7 @@ def __dir__(): "TextToSpeechStreamRequest", "TextToSpeechStreamWithTimestampsRequest", "TextToSpeechWithTimestampsRequest", + "ThresholdGuardrail", "TimeRange", "TokenResponseModel", "Tool", @@ -4110,7 +4156,6 @@ def __dir__(): "ToolRequestModel", "ToolRequestModelToolConfig", "ToolRequestModelToolConfig_Client", - "ToolRequestModelToolConfig_Mcp", "ToolRequestModelToolConfig_System", "ToolRequestModelToolConfig_Webhook", "ToolResponseModel", @@ -4143,8 +4188,11 @@ def __dir__(): "TtsOutputFormat", "TurnConfig", "TurnConfigWorkflowOverride", + "TurnEagerness", "TurnMode", + "TwilioEdgeLocation", "TwilioOutboundCallResponse", + "TwilioRegionId", "TxtExportOptions", "UnitTestCommonModel", "UnitTestCommonModelDynamicVariablesValue", @@ -4189,6 +4237,7 @@ def __dir__(): "VoiceSample", "VoiceSamplePreviewResponseModel", "VoiceSampleVisualWaveformResponseModel", + "VoiceSegment", "VoiceSettings", "VoiceSharingModerationCheckResponseModel", "VoiceSharingResponse", diff --git a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py index b872ddee..d742c223 100644 --- a/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py +++ b/src/elevenlabs/types/adhoc_agent_config_override_for_test_request_model.py @@ -27,17 +27,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(AdhocAgentConfigOverrideForTestRequestModel) diff --git a/src/elevenlabs/types/agent_config.py b/src/elevenlabs/types/agent_config.py index b580ba0a..ade3cdc6 100644 --- a/src/elevenlabs/types/agent_config.py +++ b/src/elevenlabs/types/agent_config.py @@ -47,7 +47,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(AgentConfig) diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py b/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py index 6fdec28a..eb2f6f56 100644 --- a/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override_input.py @@ -47,7 +47,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(AgentConfigApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py b/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py index ed764eda..14e49df1 100644 --- a/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py +++ b/src/elevenlabs/types/agent_config_api_model_workflow_override_output.py @@ -47,7 +47,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(AgentConfigApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/agent_simulated_chat_test_response_model.py b/src/elevenlabs/types/agent_simulated_chat_test_response_model.py index af3f5eb8..541066ac 100644 --- a/src/elevenlabs/types/agent_simulated_chat_test_response_model.py +++ b/src/elevenlabs/types/agent_simulated_chat_test_response_model.py @@ -25,10 +25,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(AgentSimulatedChatTestResponseModel) diff --git a/src/elevenlabs/types/agent_workflow_request_model.py b/src/elevenlabs/types/agent_workflow_request_model.py index af0c9573..91acec2f 100644 --- a/src/elevenlabs/types/agent_workflow_request_model.py +++ b/src/elevenlabs/types/agent_workflow_request_model.py @@ -25,15 +25,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(AgentWorkflowRequestModel) diff --git a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py index 62fa50ad..a2f4bb01 100644 --- a/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py +++ b/src/elevenlabs/types/agent_workflow_request_model_nodes_value.py @@ -53,10 +53,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - - class AgentWorkflowRequestModelNodesValue_PhoneNumber(UncheckedBaseModel): type: typing.Literal["phone_number"] = "phone_number" position: typing.Optional[PositionInput] = None diff --git a/src/elevenlabs/types/agent_workflow_response_model.py b/src/elevenlabs/types/agent_workflow_response_model.py index f724ef7b..3e1f14b2 100644 --- a/src/elevenlabs/types/agent_workflow_response_model.py +++ b/src/elevenlabs/types/agent_workflow_response_model.py @@ -25,15 +25,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(AgentWorkflowResponseModel) diff --git a/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py b/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py index 3b71808b..5fda9571 100644 --- a/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py +++ b/src/elevenlabs/types/agent_workflow_response_model_nodes_value.py @@ -53,10 +53,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - - class AgentWorkflowResponseModelNodesValue_PhoneNumber(UncheckedBaseModel): type: typing.Literal["phone_number"] = "phone_number" position: PositionOutput diff --git a/src/elevenlabs/types/array_json_schema_property_input.py b/src/elevenlabs/types/array_json_schema_property_input.py index a991d11f..e3ed3e60 100644 --- a/src/elevenlabs/types/array_json_schema_property_input.py +++ b/src/elevenlabs/types/array_json_schema_property_input.py @@ -24,7 +24,6 @@ class Config: extra = pydantic.Extra.allow -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .array_json_schema_property_input_items import ArrayJsonSchemaPropertyInputItems # noqa: E402, F401, I001 +from .array_json_schema_property_input_items import ArrayJsonSchemaPropertyInputItems # noqa: E402, I001 update_forward_refs(ArrayJsonSchemaPropertyInput) diff --git a/src/elevenlabs/types/array_json_schema_property_output.py b/src/elevenlabs/types/array_json_schema_property_output.py index bdc98803..be0abc8e 100644 --- a/src/elevenlabs/types/array_json_schema_property_output.py +++ b/src/elevenlabs/types/array_json_schema_property_output.py @@ -24,7 +24,6 @@ class Config: extra = pydantic.Extra.allow -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .array_json_schema_property_output_items import ArrayJsonSchemaPropertyOutputItems # noqa: E402, F401, I001 +from .array_json_schema_property_output_items import ArrayJsonSchemaPropertyOutputItems # noqa: E402, I001 update_forward_refs(ArrayJsonSchemaPropertyOutput) diff --git a/src/elevenlabs/types/ast_and_operator_node_input.py b/src/elevenlabs/types/ast_and_operator_node_input.py index b2504a87..fe537f43 100644 --- a/src/elevenlabs/types/ast_and_operator_node_input.py +++ b/src/elevenlabs/types/ast_and_operator_node_input.py @@ -25,13 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstAndOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_and_operator_node_input_children_item.py b/src/elevenlabs/types/ast_and_operator_node_input_children_item.py index b1bc8e50..64e516b0 100644 --- a/src/elevenlabs/types/ast_and_operator_node_input_children_item.py +++ b/src/elevenlabs/types/ast_and_operator_node_input_children_item.py @@ -184,16 +184,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstAndOperatorNodeInputChildrenItem_StringLiteral(UncheckedBaseModel): type: typing.Literal["string_literal"] = "string_literal" value: str @@ -226,19 +216,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstAndOperatorNodeInputChildrenItem_AndOperator) update_forward_refs(AstAndOperatorNodeInputChildrenItem_EqOperator) diff --git a/src/elevenlabs/types/ast_and_operator_node_output.py b/src/elevenlabs/types/ast_and_operator_node_output.py index 8cc3ab03..5c870678 100644 --- a/src/elevenlabs/types/ast_and_operator_node_output.py +++ b/src/elevenlabs/types/ast_and_operator_node_output.py @@ -25,13 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstAndOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_and_operator_node_output_children_item.py b/src/elevenlabs/types/ast_and_operator_node_output_children_item.py index 667673b5..85fad7ce 100644 --- a/src/elevenlabs/types/ast_and_operator_node_output_children_item.py +++ b/src/elevenlabs/types/ast_and_operator_node_output_children_item.py @@ -184,16 +184,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstAndOperatorNodeOutputChildrenItem_StringLiteral(UncheckedBaseModel): type: typing.Literal["string_literal"] = "string_literal" value: str @@ -226,19 +216,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstAndOperatorNodeOutputChildrenItem_AndOperator) update_forward_refs(AstAndOperatorNodeOutputChildrenItem_EqOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input.py b/src/elevenlabs/types/ast_equals_operator_node_input.py index 31d72218..d4548687 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_input.py +++ b/src/elevenlabs/types/ast_equals_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_equals_operator_node_input_left.py index ec16c11a..ebc92858 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_equals_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeInputLeft_AndOperator) update_forward_refs(AstEqualsOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_equals_operator_node_input_right.py index 0b7828eb..c97a67c2 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_equals_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeInputRight_AndOperator) update_forward_refs(AstEqualsOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output.py b/src/elevenlabs/types/ast_equals_operator_node_output.py index 1fb84043..0b3162a6 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_output.py +++ b/src/elevenlabs/types/ast_equals_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_equals_operator_node_output_left.py index 0d65c56d..ad7dfd5e 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_equals_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstEqualsOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_equals_operator_node_output_right.py index b38f9889..031a6a3a 100644 --- a/src/elevenlabs/types/ast_equals_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_equals_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstEqualsOperatorNodeOutputRight_AndOperator) update_forward_refs(AstEqualsOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input.py b/src/elevenlabs/types/ast_greater_than_operator_node_input.py index 2b8b161b..74c9dc88 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_input.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py index e5e9c80a..5a5e53d4 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstGreaterThanOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeInputLeft_AndOperator) update_forward_refs(AstGreaterThanOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py index 3bbf349b..db1ae96d 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstGreaterThanOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeInputRight_AndOperator) update_forward_refs(AstGreaterThanOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output.py b/src/elevenlabs/types/ast_greater_than_operator_node_output.py index aabac66f..10ea75c8 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_output.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py b/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py index d0b19b56..372729ab 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstGreaterThanOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstGreaterThanOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py b/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py index 66c2cc39..ddd39ff1 100644 --- a/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_greater_than_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstGreaterThanOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOperatorNodeOutputRight_AndOperator) update_forward_refs(AstGreaterThanOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py index 17ab197d..66325801 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py index a91dee4f..bfa111fc 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstGreaterThanOrEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_AndOperator) update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py index cb9d9aac..d22dec65 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstGreaterThanOrEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_AndOperator) update_forward_refs(AstGreaterThanOrEqualsOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py index 8b879478..e35f5695 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py index c19c321a..6fa56033 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstGreaterThanOrEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py index 743bd1f3..d9f3c86c 100644 --- a/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_greater_than_or_equals_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstGreaterThanOrEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_AndOperator) update_forward_refs(AstGreaterThanOrEqualsOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input.py b/src/elevenlabs/types/ast_less_than_operator_node_input.py index 3e9e770a..9347d69b 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_input.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input_left.py b/src/elevenlabs/types/ast_less_than_operator_node_input_left.py index 9912e4f5..642c92d5 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstLessThanOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeInputLeft_AndOperator) update_forward_refs(AstLessThanOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_input_right.py b/src/elevenlabs/types/ast_less_than_operator_node_input_right.py index cb1de1d6..8829456c 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstLessThanOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeInputRight_AndOperator) update_forward_refs(AstLessThanOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output.py b/src/elevenlabs/types/ast_less_than_operator_node_output.py index 00afccdc..ac785a45 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_output.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output_left.py b/src/elevenlabs/types/ast_less_than_operator_node_output_left.py index cc3e684d..0cdfeb41 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstLessThanOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstLessThanOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_operator_node_output_right.py b/src/elevenlabs/types/ast_less_than_operator_node_output_right.py index 993f9337..02c207d8 100644 --- a/src/elevenlabs/types/ast_less_than_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_less_than_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstLessThanOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOperatorNodeOutputRight_AndOperator) update_forward_refs(AstLessThanOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py index 6e243f44..c5b0ca43 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py index 3feb468a..f3ef576f 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstLessThanOrEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_AndOperator) update_forward_refs(AstLessThanOrEqualsOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py index e761f2a1..15cbef7c 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstLessThanOrEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_AndOperator) update_forward_refs(AstLessThanOrEqualsOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py index e6e45da1..b771c6d6 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py index 2206d65f..f13bbc4f 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstLessThanOrEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py index 582578ed..861aa5dc 100644 --- a/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_less_than_or_equals_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstLessThanOrEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_AndOperator) update_forward_refs(AstLessThanOrEqualsOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input.py b/src/elevenlabs/types/ast_not_equals_operator_node_input.py index 952a5c31..e30ff14d 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_input.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py index 8f062154..62d1bcfa 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstNotEqualsOperatorNodeInputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeInputLeft_AndOperator) update_forward_refs(AstNotEqualsOperatorNodeInputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py index 3bf92b15..42b081e4 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_input_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstNotEqualsOperatorNodeInputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeInputRight_AndOperator) update_forward_refs(AstNotEqualsOperatorNodeInputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output.py b/src/elevenlabs/types/ast_not_equals_operator_node_output.py index 235bc762..539c5106 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_output.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output.py @@ -30,14 +30,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py b/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py index 845d74e3..fb524fb2 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output_left.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstNotEqualsOperatorNodeOutputLeft_StringLiteral(UncheckedBaseModel): """ Left operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_AndOperator) update_forward_refs(AstNotEqualsOperatorNodeOutputLeft_EqOperator) diff --git a/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py b/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py index e3005fb2..e12aabbc 100644 --- a/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py +++ b/src/elevenlabs/types/ast_not_equals_operator_node_output_right.py @@ -232,16 +232,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstNotEqualsOperatorNodeOutputRight_StringLiteral(UncheckedBaseModel): """ Right operand of the binary operator. @@ -278,19 +268,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstNotEqualsOperatorNodeOutputRight_AndOperator) update_forward_refs(AstNotEqualsOperatorNodeOutputRight_EqOperator) diff --git a/src/elevenlabs/types/ast_or_operator_node_input.py b/src/elevenlabs/types/ast_or_operator_node_input.py index 40ff4759..0b44b921 100644 --- a/src/elevenlabs/types/ast_or_operator_node_input.py +++ b/src/elevenlabs/types/ast_or_operator_node_input.py @@ -25,13 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 update_forward_refs(AstOrOperatorNodeInput) diff --git a/src/elevenlabs/types/ast_or_operator_node_input_children_item.py b/src/elevenlabs/types/ast_or_operator_node_input_children_item.py index efa1c4e1..6f4ae425 100644 --- a/src/elevenlabs/types/ast_or_operator_node_input_children_item.py +++ b/src/elevenlabs/types/ast_or_operator_node_input_children_item.py @@ -184,16 +184,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class AstOrOperatorNodeInputChildrenItem_StringLiteral(UncheckedBaseModel): type: typing.Literal["string_literal"] = "string_literal" value: str @@ -226,19 +216,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 update_forward_refs(AstOrOperatorNodeInputChildrenItem_AndOperator) update_forward_refs(AstOrOperatorNodeInputChildrenItem_EqOperator) diff --git a/src/elevenlabs/types/ast_or_operator_node_output.py b/src/elevenlabs/types/ast_or_operator_node_output.py index f1d2eeda..086372b2 100644 --- a/src/elevenlabs/types/ast_or_operator_node_output.py +++ b/src/elevenlabs/types/ast_or_operator_node_output.py @@ -25,13 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 update_forward_refs(AstOrOperatorNodeOutput) diff --git a/src/elevenlabs/types/ast_or_operator_node_output_children_item.py b/src/elevenlabs/types/ast_or_operator_node_output_children_item.py index 70c671c8..6d2d4a67 100644 --- a/src/elevenlabs/types/ast_or_operator_node_output_children_item.py +++ b/src/elevenlabs/types/ast_or_operator_node_output_children_item.py @@ -184,16 +184,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class AstOrOperatorNodeOutputChildrenItem_StringLiteral(UncheckedBaseModel): type: typing.Literal["string_literal"] = "string_literal" value: str @@ -226,19 +216,19 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 update_forward_refs(AstOrOperatorNodeOutputChildrenItem_AndOperator) update_forward_refs(AstOrOperatorNodeOutputChildrenItem_EqOperator) diff --git a/src/elevenlabs/types/audio_with_timestamps_and_voice_segments_response_model.py b/src/elevenlabs/types/audio_with_timestamps_and_voice_segments_response_model.py new file mode 100644 index 00000000..b0021a56 --- /dev/null +++ b/src/elevenlabs/types/audio_with_timestamps_and_voice_segments_response_model.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .character_alignment_response_model import CharacterAlignmentResponseModel +from .voice_segment import VoiceSegment + + +class AudioWithTimestampsAndVoiceSegmentsResponseModel(UncheckedBaseModel): + audio_base_64: typing_extensions.Annotated[str, FieldMetadata(alias="audio_base64")] = pydantic.Field() + """ + Base64 encoded audio data + """ + + alignment: typing.Optional[CharacterAlignmentResponseModel] = pydantic.Field(default=None) + """ + Timestamp information for each character in the original text + """ + + normalized_alignment: typing.Optional[CharacterAlignmentResponseModel] = pydantic.Field(default=None) + """ + Timestamp information for each character in the normalized text + """ + + voice_segments: typing.List[VoiceSegment] = pydantic.Field() + """ + Voice segments for the audio + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/client_tool_config_input.py b/src/elevenlabs/types/client_tool_config_input.py index 4048dc90..8250f4cb 100644 --- a/src/elevenlabs/types/client_tool_config_input.py +++ b/src/elevenlabs/types/client_tool_config_input.py @@ -85,7 +85,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, I001 update_forward_refs(ClientToolConfigInput) diff --git a/src/elevenlabs/types/client_tool_config_output.py b/src/elevenlabs/types/client_tool_config_output.py index 702d90d2..f6103e49 100644 --- a/src/elevenlabs/types/client_tool_config_output.py +++ b/src/elevenlabs/types/client_tool_config_output.py @@ -85,7 +85,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, I001 update_forward_refs(ClientToolConfigOutput) diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py index 02f60289..f6655738 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_input.py @@ -50,10 +50,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 - update_forward_refs(ConversationHistoryTranscriptCommonModelInput) diff --git a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py index ad2840a7..151f91a3 100644 --- a/src/elevenlabs/types/conversation_history_transcript_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_common_model_output.py @@ -50,10 +50,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(ConversationHistoryTranscriptCommonModelOutput) diff --git a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py index 4ee627b4..30f26755 100644 --- a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py +++ b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_input.py @@ -31,7 +31,6 @@ class Config: extra = pydantic.Extra.allow -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 +from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, I001 update_forward_refs(ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput) diff --git a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py index 11e4b2d0..268e0dd0 100644 --- a/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py +++ b/src/elevenlabs/types/conversation_history_transcript_workflow_tools_result_common_model_output.py @@ -31,7 +31,6 @@ class Config: extra = pydantic.Extra.allow -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 +from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, I001 update_forward_refs(ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput) diff --git a/src/elevenlabs/types/conversation_simulation_specification.py b/src/elevenlabs/types/conversation_simulation_specification.py index 4d1967fb..0d44434b 100644 --- a/src/elevenlabs/types/conversation_simulation_specification.py +++ b/src/elevenlabs/types/conversation_simulation_specification.py @@ -43,12 +43,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 - update_forward_refs(ConversationSimulationSpecification) diff --git a/src/elevenlabs/types/conversational_config.py b/src/elevenlabs/types/conversational_config.py index 56110fe6..94653ec0 100644 --- a/src/elevenlabs/types/conversational_config.py +++ b/src/elevenlabs/types/conversational_config.py @@ -62,7 +62,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(ConversationalConfig) diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py index db10edb1..e29a56da 100644 --- a/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override_input.py @@ -64,7 +64,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(ConversationalConfigApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py b/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py index b8b8addd..699b51a1 100644 --- a/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py +++ b/src/elevenlabs/types/conversational_config_api_model_workflow_override_output.py @@ -64,7 +64,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(ConversationalConfigApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/create_twilio_phone_number_request.py b/src/elevenlabs/types/create_twilio_phone_number_request.py index a5270ba8..e19badbe 100644 --- a/src/elevenlabs/types/create_twilio_phone_number_request.py +++ b/src/elevenlabs/types/create_twilio_phone_number_request.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .region_config_request import RegionConfigRequest class CreateTwilioPhoneNumberRequest(UncheckedBaseModel): @@ -38,6 +39,11 @@ class CreateTwilioPhoneNumberRequest(UncheckedBaseModel): Twilio Auth Token """ + region_config: typing.Optional[RegionConfigRequest] = pydantic.Field(default=None) + """ + Twilio Additional Region Configuration + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py index 4dc41306..46c1b68b 100644 --- a/src/elevenlabs/types/get_agent_response_model.py +++ b/src/elevenlabs/types/get_agent_response_model.py @@ -71,15 +71,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - update_forward_refs(GetAgentResponseModel) diff --git a/src/elevenlabs/types/get_conversation_response_model.py b/src/elevenlabs/types/get_conversation_response_model.py index 662716c6..29e48163 100644 --- a/src/elevenlabs/types/get_conversation_response_model.py +++ b/src/elevenlabs/types/get_conversation_response_model.py @@ -37,10 +37,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(GetConversationResponseModel) diff --git a/src/elevenlabs/types/get_test_suite_invocation_response_model.py b/src/elevenlabs/types/get_test_suite_invocation_response_model.py index fd929136..e9d2d6a4 100644 --- a/src/elevenlabs/types/get_test_suite_invocation_response_model.py +++ b/src/elevenlabs/types/get_test_suite_invocation_response_model.py @@ -26,10 +26,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(GetTestSuiteInvocationResponseModel) diff --git a/src/elevenlabs/types/get_unit_test_response_model.py b/src/elevenlabs/types/get_unit_test_response_model.py index 6ff10752..739e662b 100644 --- a/src/elevenlabs/types/get_unit_test_response_model.py +++ b/src/elevenlabs/types/get_unit_test_response_model.py @@ -64,10 +64,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(GetUnitTestResponseModel) diff --git a/src/elevenlabs/types/guardrails_v_1_input.py b/src/elevenlabs/types/guardrails_v_1_input.py new file mode 100644 index 00000000..0a2dfe1e --- /dev/null +++ b/src/elevenlabs/types/guardrails_v_1_input.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .moderation_guardrail_input import ModerationGuardrailInput + + +class GuardrailsV1Input(UncheckedBaseModel): + version: typing.Optional[typing.Literal["1"]] = None + moderation: typing.Optional[ModerationGuardrailInput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/guardrails_v_1_output.py b/src/elevenlabs/types/guardrails_v_1_output.py new file mode 100644 index 00000000..c6470e27 --- /dev/null +++ b/src/elevenlabs/types/guardrails_v_1_output.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .moderation_guardrail_output import ModerationGuardrailOutput + + +class GuardrailsV1Output(UncheckedBaseModel): + version: typing.Optional[typing.Literal["1"]] = None + moderation: typing.Optional[ModerationGuardrailOutput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/mcp_server_config_input.py b/src/elevenlabs/types/mcp_server_config_input.py index fe5d38cd..6d78f36a 100644 --- a/src/elevenlabs/types/mcp_server_config_input.py +++ b/src/elevenlabs/types/mcp_server_config_input.py @@ -11,6 +11,7 @@ from .mcp_server_config_input_url import McpServerConfigInputUrl from .mcp_server_transport import McpServerTransport from .mcp_tool_approval_hash import McpToolApprovalHash +from .tool_execution_mode import ToolExecutionMode class McpServerConfigInput(UncheckedBaseModel): @@ -54,6 +55,11 @@ class McpServerConfigInput(UncheckedBaseModel): If true, the user will not be able to interrupt the agent while tools from this MCP server are running """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/mcp_server_config_input_request_headers_value.py b/src/elevenlabs/types/mcp_server_config_input_request_headers_value.py index 2377b3f8..978d1295 100644 --- a/src/elevenlabs/types/mcp_server_config_input_request_headers_value.py +++ b/src/elevenlabs/types/mcp_server_config_input_request_headers_value.py @@ -2,6 +2,7 @@ import typing +from .conv_ai_dynamic_variable import ConvAiDynamicVariable from .conv_ai_secret_locator import ConvAiSecretLocator -McpServerConfigInputRequestHeadersValue = typing.Union[str, ConvAiSecretLocator] +McpServerConfigInputRequestHeadersValue = typing.Union[str, ConvAiSecretLocator, ConvAiDynamicVariable] diff --git a/src/elevenlabs/types/mcp_server_config_output.py b/src/elevenlabs/types/mcp_server_config_output.py index 86f383d5..79f78cb2 100644 --- a/src/elevenlabs/types/mcp_server_config_output.py +++ b/src/elevenlabs/types/mcp_server_config_output.py @@ -11,6 +11,7 @@ from .mcp_server_config_output_url import McpServerConfigOutputUrl from .mcp_server_transport import McpServerTransport from .mcp_tool_approval_hash import McpToolApprovalHash +from .tool_execution_mode import ToolExecutionMode class McpServerConfigOutput(UncheckedBaseModel): @@ -54,6 +55,11 @@ class McpServerConfigOutput(UncheckedBaseModel): If true, the user will not be able to interrupt the agent while tools from this MCP server are running """ + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/mcp_server_config_output_request_headers_value.py b/src/elevenlabs/types/mcp_server_config_output_request_headers_value.py index 7f80f4c8..ab5ee3d6 100644 --- a/src/elevenlabs/types/mcp_server_config_output_request_headers_value.py +++ b/src/elevenlabs/types/mcp_server_config_output_request_headers_value.py @@ -2,6 +2,7 @@ import typing +from .conv_ai_dynamic_variable import ConvAiDynamicVariable from .conv_ai_secret_locator import ConvAiSecretLocator -McpServerConfigOutputRequestHeadersValue = typing.Union[str, ConvAiSecretLocator] +McpServerConfigOutputRequestHeadersValue = typing.Union[str, ConvAiSecretLocator, ConvAiDynamicVariable] diff --git a/src/elevenlabs/types/metric_type.py b/src/elevenlabs/types/metric_type.py index c57c8944..3b634fb5 100644 --- a/src/elevenlabs/types/metric_type.py +++ b/src/elevenlabs/types/metric_type.py @@ -5,6 +5,7 @@ MetricType = typing.Union[ typing.Literal[ "credits", + "tts_characters", "minutes_used", "request_count", "ttfb_avg", diff --git a/src/elevenlabs/types/moderation_config.py b/src/elevenlabs/types/moderation_config.py new file mode 100644 index 00000000..4dbe9a8a --- /dev/null +++ b/src/elevenlabs/types/moderation_config.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .threshold_guardrail import ThresholdGuardrail + + +class ModerationConfig(UncheckedBaseModel): + sexual: typing.Optional[ThresholdGuardrail] = None + violence: typing.Optional[ThresholdGuardrail] = None + violence_graphic: typing.Optional[ThresholdGuardrail] = None + harassment: typing.Optional[ThresholdGuardrail] = None + harassment_threatening: typing.Optional[ThresholdGuardrail] = None + hate: typing.Optional[ThresholdGuardrail] = None + hate_threatening: typing.Optional[ThresholdGuardrail] = None + self_harm_instructions: typing.Optional[ThresholdGuardrail] = None + self_harm: typing.Optional[ThresholdGuardrail] = None + self_harm_intent: typing.Optional[ThresholdGuardrail] = None + sexual_minors: typing.Optional[ThresholdGuardrail] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/moderation_guardrail_input.py b/src/elevenlabs/types/moderation_guardrail_input.py new file mode 100644 index 00000000..8a35b24e --- /dev/null +++ b/src/elevenlabs/types/moderation_guardrail_input.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .moderation_config import ModerationConfig + + +class ModerationGuardrailInput(UncheckedBaseModel): + config: typing.Optional[ModerationConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/moderation_guardrail_output.py b/src/elevenlabs/types/moderation_guardrail_output.py new file mode 100644 index 00000000..a2f108a9 --- /dev/null +++ b/src/elevenlabs/types/moderation_guardrail_output.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .moderation_config import ModerationConfig + + +class ModerationGuardrailOutput(UncheckedBaseModel): + config: typing.Optional[ModerationConfig] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/object_json_schema_property_input.py b/src/elevenlabs/types/object_json_schema_property_input.py index 48fdb785..a175d147 100644 --- a/src/elevenlabs/types/object_json_schema_property_input.py +++ b/src/elevenlabs/types/object_json_schema_property_input.py @@ -25,7 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue # noqa: E402, F401, I001 +from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue # noqa: E402, I001 update_forward_refs(ObjectJsonSchemaPropertyInput) diff --git a/src/elevenlabs/types/object_json_schema_property_output.py b/src/elevenlabs/types/object_json_schema_property_output.py index 1cafccd6..e9e6169d 100644 --- a/src/elevenlabs/types/object_json_schema_property_output.py +++ b/src/elevenlabs/types/object_json_schema_property_output.py @@ -25,7 +25,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue # noqa: E402, F401, I001 +from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue # noqa: E402, I001 update_forward_refs(ObjectJsonSchemaPropertyOutput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_input.py b/src/elevenlabs/types/prompt_agent_api_model_input.py index 4cababa7..cefe8237 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input.py @@ -113,7 +113,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(PromptAgentApiModelInput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index 7931143a..af099778 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -113,8 +113,7 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, I001 PromptAgentApiModelInputToolsItem = typing_extensions.Annotated[ typing.Union[ diff --git a/src/elevenlabs/types/prompt_agent_api_model_output.py b/src/elevenlabs/types/prompt_agent_api_model_output.py index 3748253e..ca11d74c 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output.py @@ -113,7 +113,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(PromptAgentApiModelOutput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index fa93c049..6809954a 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -113,8 +113,7 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, I001 PromptAgentApiModelOutputToolsItem = typing_extensions.Annotated[ typing.Union[ diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py index 8801645a..9678493e 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input.py @@ -119,7 +119,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(PromptAgentApiModelWorkflowOverrideInput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py index ffee6bf6..047ca05b 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py @@ -113,8 +113,7 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, I001 PromptAgentApiModelWorkflowOverrideInputToolsItem = typing_extensions.Annotated[ typing.Union[ diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py index 26b57988..65cd1e52 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output.py @@ -121,7 +121,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(PromptAgentApiModelWorkflowOverrideOutput) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py index 6c60d77e..6c9cdb80 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py @@ -113,8 +113,7 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, I001 PromptAgentApiModelWorkflowOverrideOutputToolsItem = typing_extensions.Annotated[ typing.Union[ diff --git a/src/elevenlabs/types/referenced_tool_common_model.py b/src/elevenlabs/types/referenced_tool_common_model.py index 2b12ce47..4a1cc261 100644 --- a/src/elevenlabs/types/referenced_tool_common_model.py +++ b/src/elevenlabs/types/referenced_tool_common_model.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .tool_type import ToolType +from .referenced_tool_common_model_type import ReferencedToolCommonModelType class ReferencedToolCommonModel(UncheckedBaseModel): @@ -18,7 +18,7 @@ class ReferencedToolCommonModel(UncheckedBaseModel): The ID of the tool """ - type: ToolType = pydantic.Field() + type: ReferencedToolCommonModelType = pydantic.Field() """ The type of the tool """ diff --git a/src/elevenlabs/types/referenced_tool_common_model_type.py b/src/elevenlabs/types/referenced_tool_common_model_type.py new file mode 100644 index 00000000..7c20433c --- /dev/null +++ b/src/elevenlabs/types/referenced_tool_common_model_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ReferencedToolCommonModelType = typing.Union[typing.Literal["system", "webhook", "client", "workflow"], typing.Any] diff --git a/src/elevenlabs/types/region_config_request.py b/src/elevenlabs/types/region_config_request.py new file mode 100644 index 00000000..d26f8539 --- /dev/null +++ b/src/elevenlabs/types/region_config_request.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .twilio_edge_location import TwilioEdgeLocation +from .twilio_region_id import TwilioRegionId + + +class RegionConfigRequest(UncheckedBaseModel): + region_id: TwilioRegionId = pydantic.Field() + """ + Region ID + """ + + token: str = pydantic.Field() + """ + Auth Token for this region + """ + + edge_location: TwilioEdgeLocation = pydantic.Field() + """ + Edge location for this region + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/single_use_token_response_model.py b/src/elevenlabs/types/single_use_token_response_model.py new file mode 100644 index 00000000..1510d754 --- /dev/null +++ b/src/elevenlabs/types/single_use_token_response_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SingleUseTokenResponseModel(UncheckedBaseModel): + token: str = pydantic.Field() + """ + A time bound single use token that expires after 15 minutes. Will be consumed on use. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/single_use_token_type.py b/src/elevenlabs/types/single_use_token_type.py new file mode 100644 index 00000000..121fa7c4 --- /dev/null +++ b/src/elevenlabs/types/single_use_token_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SingleUseTokenType = typing.Literal["realtime_scribe"] diff --git a/src/elevenlabs/types/song_section.py b/src/elevenlabs/types/song_section.py index 79ef3c72..f96bbb00 100644 --- a/src/elevenlabs/types/song_section.py +++ b/src/elevenlabs/types/song_section.py @@ -31,7 +31,7 @@ class SongSection(UncheckedBaseModel): lines: typing.List[str] = pydantic.Field() """ - The lyrics of the section. + The lyrics of the section. Max 200 characters per line. """ source_from: typing.Optional[SectionSource] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/streaming_audio_chunk_with_timestamps_and_voice_segments_response_model.py b/src/elevenlabs/types/streaming_audio_chunk_with_timestamps_and_voice_segments_response_model.py new file mode 100644 index 00000000..f7efaeac --- /dev/null +++ b/src/elevenlabs/types/streaming_audio_chunk_with_timestamps_and_voice_segments_response_model.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .character_alignment_response_model import CharacterAlignmentResponseModel +from .voice_segment import VoiceSegment + + +class StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel(UncheckedBaseModel): + audio_base_64: typing_extensions.Annotated[str, FieldMetadata(alias="audio_base64")] = pydantic.Field() + """ + Base64 encoded audio data + """ + + alignment: typing.Optional[CharacterAlignmentResponseModel] = pydantic.Field(default=None) + """ + Timestamp information for each character in the original text + """ + + normalized_alignment: typing.Optional[CharacterAlignmentResponseModel] = pydantic.Field(default=None) + """ + Timestamp information for each character in the normalized text + """ + + voice_segments: typing.List[VoiceSegment] = pydantic.Field() + """ + Voice segments for the audio + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/test_from_conversation_metadata_input.py b/src/elevenlabs/types/test_from_conversation_metadata_input.py index 1fb43f82..bdee3172 100644 --- a/src/elevenlabs/types/test_from_conversation_metadata_input.py +++ b/src/elevenlabs/types/test_from_conversation_metadata_input.py @@ -26,10 +26,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 - update_forward_refs(TestFromConversationMetadataInput) diff --git a/src/elevenlabs/types/test_from_conversation_metadata_output.py b/src/elevenlabs/types/test_from_conversation_metadata_output.py index 9c7571df..2933eafa 100644 --- a/src/elevenlabs/types/test_from_conversation_metadata_output.py +++ b/src/elevenlabs/types/test_from_conversation_metadata_output.py @@ -26,10 +26,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(TestFromConversationMetadataOutput) diff --git a/src/elevenlabs/types/threshold_guardrail.py b/src/elevenlabs/types/threshold_guardrail.py new file mode 100644 index 00000000..b7233286 --- /dev/null +++ b/src/elevenlabs/types/threshold_guardrail.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ThresholdGuardrail(UncheckedBaseModel): + is_enabled: typing.Optional[bool] = None + threshold: typing.Optional[float] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/tool_request_model.py b/src/elevenlabs/types/tool_request_model.py index d32683e8..06e1048b 100644 --- a/src/elevenlabs/types/tool_request_model.py +++ b/src/elevenlabs/types/tool_request_model.py @@ -26,7 +26,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(ToolRequestModel) diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index 2fec738d..1f4aecba 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -46,19 +46,6 @@ class Config: extra = pydantic.Extra.allow -class ToolRequestModelToolConfig_Mcp(UncheckedBaseModel): - value: typing.Optional[typing.Any] = None - type: typing.Literal["mcp"] = "mcp" - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - - class ToolRequestModelToolConfig_System(UncheckedBaseModel): """ Configuration for the tool @@ -113,15 +100,11 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, I001 ToolRequestModelToolConfig = typing_extensions.Annotated[ typing.Union[ - ToolRequestModelToolConfig_Client, - ToolRequestModelToolConfig_Mcp, - ToolRequestModelToolConfig_System, - ToolRequestModelToolConfig_Webhook, + ToolRequestModelToolConfig_Client, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/tool_response_model.py b/src/elevenlabs/types/tool_response_model.py index 551990b0..bdcfa349 100644 --- a/src/elevenlabs/types/tool_response_model.py +++ b/src/elevenlabs/types/tool_response_model.py @@ -32,7 +32,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(ToolResponseModel) diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index f5f639b2..0b08d465 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -113,8 +113,7 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, I001 ToolResponseModelToolConfig = typing_extensions.Annotated[ typing.Union[ diff --git a/src/elevenlabs/types/tools_response_model.py b/src/elevenlabs/types/tools_response_model.py index e408c726..75187f2e 100644 --- a/src/elevenlabs/types/tools_response_model.py +++ b/src/elevenlabs/types/tools_response_model.py @@ -23,7 +23,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(ToolsResponseModel) diff --git a/src/elevenlabs/types/turn_config.py b/src/elevenlabs/types/turn_config.py index 8e3ad153..9d762482 100644 --- a/src/elevenlabs/types/turn_config.py +++ b/src/elevenlabs/types/turn_config.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .turn_mode import TurnMode +from .turn_eagerness import TurnEagerness class TurnConfig(UncheckedBaseModel): @@ -19,9 +19,9 @@ class TurnConfig(UncheckedBaseModel): Maximum wait time since the user last spoke before terminating the call """ - mode: typing.Optional[TurnMode] = pydantic.Field(default=None) + turn_eagerness: typing.Optional[TurnEagerness] = pydantic.Field(default=None) """ - The mode of turn detection + Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner) """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/turn_config_workflow_override.py b/src/elevenlabs/types/turn_config_workflow_override.py index 8a790c95..e3a5d3bd 100644 --- a/src/elevenlabs/types/turn_config_workflow_override.py +++ b/src/elevenlabs/types/turn_config_workflow_override.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .turn_mode import TurnMode +from .turn_eagerness import TurnEagerness class TurnConfigWorkflowOverride(UncheckedBaseModel): @@ -19,9 +19,9 @@ class TurnConfigWorkflowOverride(UncheckedBaseModel): Maximum wait time since the user last spoke before terminating the call """ - mode: typing.Optional[TurnMode] = pydantic.Field(default=None) + turn_eagerness: typing.Optional[TurnEagerness] = pydantic.Field(default=None) """ - The mode of turn detection + Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner) """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/turn_eagerness.py b/src/elevenlabs/types/turn_eagerness.py new file mode 100644 index 00000000..f1d566ba --- /dev/null +++ b/src/elevenlabs/types/turn_eagerness.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TurnEagerness = typing.Union[typing.Literal["patient", "normal", "eager"], typing.Any] diff --git a/src/elevenlabs/types/twilio_edge_location.py b/src/elevenlabs/types/twilio_edge_location.py new file mode 100644 index 00000000..03f01079 --- /dev/null +++ b/src/elevenlabs/types/twilio_edge_location.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioEdgeLocation = typing.Union[ + typing.Literal[ + "ashburn", "dublin", "frankfurt", "sao-paulo", "singapore", "sydney", "tokyo", "umatilla", "roaming" + ], + typing.Any, +] diff --git a/src/elevenlabs/types/twilio_region_id.py b/src/elevenlabs/types/twilio_region_id.py new file mode 100644 index 00000000..993d8a6f --- /dev/null +++ b/src/elevenlabs/types/twilio_region_id.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioRegionId = typing.Union[typing.Literal["us1", "ie1", "au1"], typing.Any] diff --git a/src/elevenlabs/types/unit_test_common_model.py b/src/elevenlabs/types/unit_test_common_model.py index a678eb62..f53fec17 100644 --- a/src/elevenlabs/types/unit_test_common_model.py +++ b/src/elevenlabs/types/unit_test_common_model.py @@ -65,10 +65,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(UnitTestCommonModel) diff --git a/src/elevenlabs/types/unit_test_run_response_model.py b/src/elevenlabs/types/unit_test_run_response_model.py index 99913ced..f89590bb 100644 --- a/src/elevenlabs/types/unit_test_run_response_model.py +++ b/src/elevenlabs/types/unit_test_run_response_model.py @@ -38,10 +38,4 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - update_forward_refs(UnitTestRunResponseModel) diff --git a/src/elevenlabs/types/vad_config.py b/src/elevenlabs/types/vad_config.py index e15f61d9..49ca3b3a 100644 --- a/src/elevenlabs/types/vad_config.py +++ b/src/elevenlabs/types/vad_config.py @@ -8,11 +8,6 @@ class VadConfig(UncheckedBaseModel): - background_voice_detection: typing.Optional[bool] = pydantic.Field(default=None) - """ - Whether to use background voice filtering - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/vad_config_workflow_override.py b/src/elevenlabs/types/vad_config_workflow_override.py index d025badf..d6125cda 100644 --- a/src/elevenlabs/types/vad_config_workflow_override.py +++ b/src/elevenlabs/types/vad_config_workflow_override.py @@ -8,11 +8,6 @@ class VadConfigWorkflowOverride(UncheckedBaseModel): - background_voice_detection: typing.Optional[bool] = pydantic.Field(default=None) - """ - Whether to use background voice filtering - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/voice_segment.py b/src/elevenlabs/types/voice_segment.py new file mode 100644 index 00000000..4392e331 --- /dev/null +++ b/src/elevenlabs/types/voice_segment.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VoiceSegment(UncheckedBaseModel): + voice_id: str = pydantic.Field() + """ + The voice ID used for this segment + """ + + start_time_seconds: float = pydantic.Field() + """ + Start time of this voice segment + """ + + end_time_seconds: float = pydantic.Field() + """ + End time of this voice segment + """ + + character_start_index: int = pydantic.Field() + """ + Start index in the characters array + """ + + character_end_index: int = pydantic.Field() + """ + End index in the characters array (exclusive) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/webhook_tool_api_schema_config_input.py b/src/elevenlabs/types/webhook_tool_api_schema_config_input.py index 6302ba1d..78de7627 100644 --- a/src/elevenlabs/types/webhook_tool_api_schema_config_input.py +++ b/src/elevenlabs/types/webhook_tool_api_schema_config_input.py @@ -68,7 +68,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 +from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, I001 update_forward_refs(WebhookToolApiSchemaConfigInput) diff --git a/src/elevenlabs/types/webhook_tool_api_schema_config_output.py b/src/elevenlabs/types/webhook_tool_api_schema_config_output.py index a25fd5e6..a110d14f 100644 --- a/src/elevenlabs/types/webhook_tool_api_schema_config_output.py +++ b/src/elevenlabs/types/webhook_tool_api_schema_config_output.py @@ -68,7 +68,6 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 +from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, I001 update_forward_refs(WebhookToolApiSchemaConfigOutput) diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index e9403a4f..9d938b01 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -81,7 +81,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(WebhookToolConfigInput) diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index 661c1193..82d73fd5 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -81,7 +81,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(WebhookToolConfigOutput) diff --git a/src/elevenlabs/types/workflow_edge_model_input.py b/src/elevenlabs/types/workflow_edge_model_input.py index 1be36d58..c9527eb4 100644 --- a/src/elevenlabs/types/workflow_edge_model_input.py +++ b/src/elevenlabs/types/workflow_edge_model_input.py @@ -42,13 +42,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - update_forward_refs(WorkflowEdgeModelInput) diff --git a/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py index 3a1ea626..02166cce 100644 --- a/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_input_backward_condition.py @@ -26,16 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class WorkflowEdgeModelInputBackwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None diff --git a/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py index 8ec133f8..9c2ec742 100644 --- a/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_input_forward_condition.py @@ -26,16 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - - class WorkflowEdgeModelInputForwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None diff --git a/src/elevenlabs/types/workflow_edge_model_output.py b/src/elevenlabs/types/workflow_edge_model_output.py index fc4a8b0b..232ca7c5 100644 --- a/src/elevenlabs/types/workflow_edge_model_output.py +++ b/src/elevenlabs/types/workflow_edge_model_output.py @@ -42,13 +42,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - update_forward_refs(WorkflowEdgeModelOutput) diff --git a/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py b/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py index 24c07504..490d18a0 100644 --- a/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_output_backward_condition.py @@ -26,16 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class WorkflowEdgeModelOutputBackwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None diff --git a/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py b/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py index 6f59214f..bfd30670 100644 --- a/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py +++ b/src/elevenlabs/types/workflow_edge_model_output_forward_condition.py @@ -26,16 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - - class WorkflowEdgeModelOutputForwardCondition_Llm(UncheckedBaseModel): type: typing.Literal["llm"] = "llm" label: typing.Optional[str] = None diff --git a/src/elevenlabs/types/workflow_expression_condition_model_input.py b/src/elevenlabs/types/workflow_expression_condition_model_input.py index 551c37c3..ec02f454 100644 --- a/src/elevenlabs/types/workflow_expression_condition_model_input.py +++ b/src/elevenlabs/types/workflow_expression_condition_model_input.py @@ -31,13 +31,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 - update_forward_refs(WorkflowExpressionConditionModelInput) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py index ad5d3674..296c1875 100644 --- a/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py +++ b/src/elevenlabs/types/workflow_expression_condition_model_input_expression.py @@ -28,7 +28,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_input_children_item import AstAndOperatorNodeInputChildrenItem # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_BooleanLiteral(UncheckedBaseModel): @@ -86,8 +86,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_equals_operator_node_input_left import AstEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_equals_operator_node_input_right import AstEqualsOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_GtOperator(UncheckedBaseModel): @@ -109,8 +109,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_input_left import AstGreaterThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_input_right import AstGreaterThanOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_GteOperator(UncheckedBaseModel): @@ -132,8 +132,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_input_left import AstGreaterThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_input_right import AstGreaterThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_Llm(UncheckedBaseModel): @@ -173,8 +173,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_input_left import AstLessThanOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_input_right import AstLessThanOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_LteOperator(UncheckedBaseModel): @@ -196,8 +196,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_input_left import AstLessThanOrEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_input_right import AstLessThanOrEqualsOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_NeqOperator(UncheckedBaseModel): @@ -219,8 +219,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_input_left import AstNotEqualsOperatorNodeInputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_input_right import AstNotEqualsOperatorNodeInputRight # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_NumberLiteral(UncheckedBaseModel): @@ -259,15 +259,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_input import AstAndOperatorNodeInput # noqa: E402, F401, I001 -from .ast_equals_operator_node_input import AstEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_input import AstGreaterThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_input import AstGreaterThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_input import AstLessThanOperatorNodeInput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_input import AstLessThanOrEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_input import AstNotEqualsOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input import AstOrOperatorNodeInput # noqa: E402, F401, I001 -from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, F401, I001 +from .ast_or_operator_node_input_children_item import AstOrOperatorNodeInputChildrenItem # noqa: E402, I001 class WorkflowExpressionConditionModelInputExpression_StringLiteral(UncheckedBaseModel): diff --git a/src/elevenlabs/types/workflow_expression_condition_model_output.py b/src/elevenlabs/types/workflow_expression_condition_model_output.py index 6bb13d77..05de32f7 100644 --- a/src/elevenlabs/types/workflow_expression_condition_model_output.py +++ b/src/elevenlabs/types/workflow_expression_condition_model_output.py @@ -31,13 +31,4 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 - update_forward_refs(WorkflowExpressionConditionModelOutput) diff --git a/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py b/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py index 542228da..e58a2eed 100644 --- a/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py +++ b/src/elevenlabs/types/workflow_expression_condition_model_output_expression.py @@ -28,7 +28,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_and_operator_node_output_children_item import AstAndOperatorNodeOutputChildrenItem # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_BooleanLiteral(UncheckedBaseModel): @@ -86,8 +86,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_equals_operator_node_output_left import AstEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_equals_operator_node_output_right import AstEqualsOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_GtOperator(UncheckedBaseModel): @@ -109,8 +109,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_operator_node_output_left import AstGreaterThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_operator_node_output_right import AstGreaterThanOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_GteOperator(UncheckedBaseModel): @@ -132,8 +132,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_greater_than_or_equals_operator_node_output_left import AstGreaterThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_greater_than_or_equals_operator_node_output_right import AstGreaterThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_Llm(UncheckedBaseModel): @@ -173,8 +173,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_operator_node_output_left import AstLessThanOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_operator_node_output_right import AstLessThanOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_LteOperator(UncheckedBaseModel): @@ -196,8 +196,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_less_than_or_equals_operator_node_output_left import AstLessThanOrEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_less_than_or_equals_operator_node_output_right import AstLessThanOrEqualsOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_NeqOperator(UncheckedBaseModel): @@ -219,8 +219,8 @@ class Config: extra = pydantic.Extra.allow -from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, F401, I001 +from .ast_not_equals_operator_node_output_left import AstNotEqualsOperatorNodeOutputLeft # noqa: E402, I001 +from .ast_not_equals_operator_node_output_right import AstNotEqualsOperatorNodeOutputRight # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_NumberLiteral(UncheckedBaseModel): @@ -259,15 +259,7 @@ class Config: extra = pydantic.Extra.allow -from .ast_and_operator_node_output import AstAndOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_equals_operator_node_output import AstEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_operator_node_output import AstGreaterThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_greater_than_or_equals_operator_node_output import AstGreaterThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_operator_node_output import AstLessThanOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_less_than_or_equals_operator_node_output import AstLessThanOrEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_not_equals_operator_node_output import AstNotEqualsOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output import AstOrOperatorNodeOutput # noqa: E402, F401, I001 -from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, F401, I001 +from .ast_or_operator_node_output_children_item import AstOrOperatorNodeOutputChildrenItem # noqa: E402, I001 class WorkflowExpressionConditionModelOutputExpression_StringLiteral(UncheckedBaseModel): diff --git a/src/elevenlabs/types/workflow_override_agent_node_model_input.py b/src/elevenlabs/types/workflow_override_agent_node_model_input.py index f571dbba..89c1de30 100644 --- a/src/elevenlabs/types/workflow_override_agent_node_model_input.py +++ b/src/elevenlabs/types/workflow_override_agent_node_model_input.py @@ -60,7 +60,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - update_forward_refs(WorkflowOverrideAgentNodeModelInput) diff --git a/src/elevenlabs/types/workflow_override_agent_node_model_output.py b/src/elevenlabs/types/workflow_override_agent_node_model_output.py index db491424..e2c68584 100644 --- a/src/elevenlabs/types/workflow_override_agent_node_model_output.py +++ b/src/elevenlabs/types/workflow_override_agent_node_model_output.py @@ -58,7 +58,4 @@ class Config: extra = pydantic.Extra.allow -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - update_forward_refs(WorkflowOverrideAgentNodeModelOutput) diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py index 31e597de..4dc93686 100644 --- a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_input.py @@ -27,10 +27,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, I001 update_forward_refs(WorkflowToolNestedToolsStepModelInput) diff --git a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py index 88a7ad96..7c1ed4c6 100644 --- a/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py +++ b/src/elevenlabs/types/workflow_tool_nested_tools_step_model_output.py @@ -27,10 +27,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, I001 update_forward_refs(WorkflowToolNestedToolsStepModelOutput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_input.py b/src/elevenlabs/types/workflow_tool_response_model_input.py index 4efdab87..ef7c032c 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_input.py +++ b/src/elevenlabs/types/workflow_tool_response_model_input.py @@ -26,10 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input_steps_item import WorkflowToolResponseModelInputStepsItem # noqa: E402, F401, I001 +from .workflow_tool_response_model_input_steps_item import WorkflowToolResponseModelInputStepsItem # noqa: E402, I001 update_forward_refs(WorkflowToolResponseModelInput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py b/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py index c0b1aed8..b0992e08 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py +++ b/src/elevenlabs/types/workflow_tool_response_model_input_steps_item.py @@ -60,12 +60,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_input import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput # noqa: E402, F401, I001 -from .workflow_tool_response_model_input import WorkflowToolResponseModelInput # noqa: E402, F401, I001 - WorkflowToolResponseModelInputStepsItem = typing_extensions.Annotated[ typing.Union[ WorkflowToolResponseModelInputStepsItem_Edge, @@ -74,6 +68,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_input_results_item import WorkflowToolNestedToolsStepModelInputResultsItem # noqa: E402, I001 update_forward_refs(WorkflowToolResponseModelInputStepsItem_NestedTools) diff --git a/src/elevenlabs/types/workflow_tool_response_model_output.py b/src/elevenlabs/types/workflow_tool_response_model_output.py index 740bf0a5..9f84aefd 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_output.py +++ b/src/elevenlabs/types/workflow_tool_response_model_output.py @@ -26,10 +26,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output_steps_item import WorkflowToolResponseModelOutputStepsItem # noqa: E402, F401, I001 +from .workflow_tool_response_model_output_steps_item import WorkflowToolResponseModelOutputStepsItem # noqa: E402, I001 update_forward_refs(WorkflowToolResponseModelOutput) diff --git a/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py b/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py index 475718b5..e7b6e178 100644 --- a/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py +++ b/src/elevenlabs/types/workflow_tool_response_model_output_steps_item.py @@ -60,12 +60,6 @@ class Config: extra = pydantic.Extra.allow -from .conversation_history_transcript_workflow_tools_result_common_model_output import ( - ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput, -) # noqa: E402, F401, I001 -from .workflow_tool_nested_tools_step_model_output import WorkflowToolNestedToolsStepModelOutput # noqa: E402, F401, I001 -from .workflow_tool_response_model_output import WorkflowToolResponseModelOutput # noqa: E402, F401, I001 - WorkflowToolResponseModelOutputStepsItem = typing_extensions.Annotated[ typing.Union[ WorkflowToolResponseModelOutputStepsItem_Edge, @@ -74,6 +68,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] -from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, F401, I001 +from .workflow_tool_nested_tools_step_model_output_results_item import WorkflowToolNestedToolsStepModelOutputResultsItem # noqa: E402, I001 update_forward_refs(WorkflowToolResponseModelOutputStepsItem_NestedTools) diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 2223cdc0..71f7a24f 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -21,6 +21,8 @@ "convai_batch_calls", "convai_agent_response_tests", "convai_test_suite_invocations", + "convai_crawl_jobs", + "convai_crawl_tasks", "convai_whatsapp_accounts", ], typing.Any, From 13dbb7e33b17bcaa66c644333a416cac31ae7f69 Mon Sep 17 00:00:00 2001 From: Paul Asjes Date: Wed, 29 Oct 2025 14:54:43 +0100 Subject: [PATCH 33/34] Replace prints with logging (#664) * Replace prints with logging * Don't need this --- .../conversational_ai/conversation.py | 34 +++++++++++-------- src/elevenlabs/music_custom.py | 18 +++++----- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/elevenlabs/conversational_ai/conversation.py b/src/elevenlabs/conversational_ai/conversation.py index 6feceb5d..26bbece0 100644 --- a/src/elevenlabs/conversational_ai/conversation.py +++ b/src/elevenlabs/conversational_ai/conversation.py @@ -1,21 +1,25 @@ from abc import ABC, abstractmethod -import base64 -import json -import threading -from typing import Callable, Optional, Awaitable, Union, Any, Literal, Dict, Tuple import asyncio +import base64 from concurrent.futures import ThreadPoolExecutor from enum import Enum +import json +import logging +import threading +from typing import Any, Awaitable, Callable, Dict, Literal, Optional, Tuple, Union import urllib.parse -from websockets.sync.client import connect, Connection import websockets from websockets.exceptions import ConnectionClosedOK +from websockets.sync.client import Connection, connect from ..base_client import BaseElevenLabs from ..version import __version__ +logger = logging.getLogger(__name__) + + class ClientToOrchestratorEvent(str, Enum): """Event types that can be sent from client to orchestrator.""" @@ -613,7 +617,7 @@ def send_user_message(self, text: str): try: self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error sending user message: {e}") + logger.error(f"Error sending user message: {e}") raise def register_user_activity(self): @@ -631,7 +635,7 @@ def register_user_activity(self): try: self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error registering user activity: {e}") + logger.error(f"Error registering user activity: {e}") raise def send_contextual_update(self, text: str): @@ -653,7 +657,7 @@ def send_contextual_update(self, text: str): try: self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error sending contextual update: {e}") + logger.error(f"Error sending contextual update: {e}") raise def _run(self, ws_url: str): @@ -674,7 +678,7 @@ def input_callback(audio): except ConnectionClosedOK: self.end_session() except Exception as e: - print(f"Error sending user audio chunk: {e}") + logger.error(f"Error sending user audio chunk: {e}") self.end_session() self.audio_interface.start(input_callback) @@ -689,7 +693,7 @@ def input_callback(audio): except TimeoutError: pass except Exception as e: - print(f"Error receiving message: {e}") + logger.error(f"Error receiving message: {e}") self.end_session() self._ws = None @@ -866,7 +870,7 @@ async def send_user_message(self, text: str): try: await self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error sending user message: {e}") + logger.error(f"Error sending user message: {e}") raise async def register_user_activity(self): @@ -884,7 +888,7 @@ async def register_user_activity(self): try: await self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error registering user activity: {e}") + logger.error(f"Error registering user activity: {e}") raise async def send_contextual_update(self, text: str): @@ -906,7 +910,7 @@ async def send_contextual_update(self, text: str): try: await self._ws.send(json.dumps(event.to_dict())) except Exception as e: - print(f"Error sending contextual update: {e}") + logger.error(f"Error sending contextual update: {e}") raise async def _run(self, ws_url: str): @@ -926,7 +930,7 @@ async def input_callback(audio): except ConnectionClosedOK: await self.end_session() except Exception as e: - print(f"Error sending user audio chunk: {e}") + logger.error(f"Error sending user audio chunk: {e}") await self.end_session() await self.audio_interface.start(input_callback) @@ -945,7 +949,7 @@ async def input_callback(audio): await self.end_session() break except Exception as e: - print(f"Error receiving message: {e}") + logger.error(f"Error receiving message: {e}") await self.end_session() break finally: diff --git a/src/elevenlabs/music_custom.py b/src/elevenlabs/music_custom.py index 19d05cb1..dc6dbfc3 100644 --- a/src/elevenlabs/music_custom.py +++ b/src/elevenlabs/music_custom.py @@ -1,16 +1,20 @@ -import typing import json +import logging import re +import typing from dataclasses import dataclass -from elevenlabs.music.client import MusicClient as AutogeneratedMusicClient, AsyncMusicClient as AutogeneratedAsyncMusicClient -from elevenlabs.types.music_prompt import MusicPrompt -from elevenlabs.music.types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from elevenlabs.core.request_options import RequestOptions +from elevenlabs.music.client import AsyncMusicClient as AutogeneratedAsyncMusicClient +from elevenlabs.music.client import MusicClient as AutogeneratedMusicClient +from elevenlabs.music.types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat +from elevenlabs.types.music_prompt import MusicPrompt # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) +logger = logging.getLogger(__name__) + @dataclass class SongMetadata: @@ -101,9 +105,8 @@ def _parse_multipart(self, stream: typing.Iterator[bytes]) -> MultipartResponse: if json_line.strip() and json_line.startswith('{'): try: json_data = json.loads(json_line) - print('✓ Successfully parsed JSON metadata') except json.JSONDecodeError as e: - print(f'Failed to parse JSON: {e}') + logger.error(f'Failed to parse composition plan JSON: {e}') break # Extract filename from headers @@ -228,9 +231,8 @@ async def _parse_multipart_async(self, stream: typing.AsyncIterator[bytes]) -> M if json_line.strip() and json_line.startswith('{'): try: json_data = json.loads(json_line) - print('✓ Successfully parsed JSON metadata') except json.JSONDecodeError as e: - print(f'Failed to parse JSON: {e}') + logger.error(f'Failed to parse JSON: {e}') break # Extract filename from headers From 2081ce5e13a7b3e5f560609720d347ae09a11f1b Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:21:39 +0100 Subject: [PATCH 34/34] SDK regeneration (#666) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- reference.md | 470 +++++++++++- src/elevenlabs/__init__.py | 96 +++ .../conversational_ai/batch_calls/client.py | 38 +- .../batch_calls/raw_client.py | 24 +- .../conversational_ai/mcp_servers/__init__.py | 11 +- .../conversational_ai/mcp_servers/client.py | 53 +- .../mcp_servers/raw_client.py | 34 +- .../mcp_servers/tool_configs/__init__.py | 4 + .../mcp_servers/tool_configs/client.py | 528 +++++++++++++ .../mcp_servers/tool_configs/raw_client.py | 695 ++++++++++++++++++ .../conversational_ai/tools/client.py | 28 +- src/elevenlabs/core/client_wrapper.py | 4 +- src/elevenlabs/errors/__init__.py | 3 + src/elevenlabs/errors/conflict_error.py | 10 + src/elevenlabs/music/__init__.py | 6 + src/elevenlabs/music/client.py | 74 ++ src/elevenlabs/music/raw_client.py | 156 ++++ src/elevenlabs/music/types/__init__.py | 6 + ...ic_separate_stems_request_output_format.py | 30 + ...eparate_stems_request_stem_variation_id.py | 5 + src/elevenlabs/types/__init__.py | 93 +++ ...api_integration_webhook_overrides_input.py | 42 ++ ...k_overrides_input_request_headers_value.py | 7 + ...pi_integration_webhook_overrides_output.py | 42 ++ ..._overrides_output_request_headers_value.py | 7 + ...i_integration_webhook_tool_config_input.py | 87 +++ ..._integration_webhook_tool_config_output.py | 87 +++ .../types/batch_call_detailed_response.py | 3 +- src/elevenlabs/types/batch_call_response.py | 3 +- src/elevenlabs/types/invoice_response.py | 10 + .../types/literal_json_schema_property.py | 5 + src/elevenlabs/types/literal_override.py | 23 + .../types/literal_override_constant_value.py | 5 + .../types/mcp_server_config_input.py | 22 +- .../types/mcp_server_config_output.py | 22 +- .../types/mcp_tool_config_override.py | 57 ++ src/elevenlabs/types/object_override_input.py | 29 + .../object_override_input_properties_value.py | 11 + .../types/object_override_output.py | 29 + ...object_override_output_properties_value.py | 11 + .../types/outbound_call_recipient.py | 3 +- .../outbound_call_recipient_response_model.py | 3 +- ...ding_subscription_switch_response_model.py | 8 + ...itch_response_model_next_billing_period.py | 7 + ...r_dynamic_variable_transfer_destination.py | 20 + ...ne_number_transfer_transfer_destination.py | 35 +- ...prompt_agent_api_model_input_tools_item.py | 36 +- ...rompt_agent_api_model_output_tools_item.py | 36 +- ...odel_workflow_override_input_tools_item.py | 36 +- ...del_workflow_override_output_tools_item.py | 36 +- src/elevenlabs/types/query_override.py | 22 + .../referenced_tool_common_model_type.py | 4 +- ...i_dynamic_variable_transfer_destination.py | 20 + .../types/tool_request_model_tool_config.py | 40 +- .../types/tool_response_model_tool_config.py | 36 +- src/elevenlabs/types/tool_type.py | 5 +- src/elevenlabs/types/voice_segment.py | 5 + .../types/webhook_tool_config_input.py | 10 +- .../types/webhook_tool_config_output.py | 10 +- ...r_node_model_input_transfer_destination.py | 30 + ..._node_model_output_transfer_destination.py | 30 + .../types/workspace_resource_type.py | 2 + 63 files changed, 3203 insertions(+), 103 deletions(-) create mode 100644 src/elevenlabs/conversational_ai/mcp_servers/tool_configs/__init__.py create mode 100644 src/elevenlabs/conversational_ai/mcp_servers/tool_configs/client.py create mode 100644 src/elevenlabs/conversational_ai/mcp_servers/tool_configs/raw_client.py create mode 100644 src/elevenlabs/errors/conflict_error.py create mode 100644 src/elevenlabs/music/types/music_separate_stems_request_output_format.py create mode 100644 src/elevenlabs/music/types/music_separate_stems_request_stem_variation_id.py create mode 100644 src/elevenlabs/types/api_integration_webhook_overrides_input.py create mode 100644 src/elevenlabs/types/api_integration_webhook_overrides_input_request_headers_value.py create mode 100644 src/elevenlabs/types/api_integration_webhook_overrides_output.py create mode 100644 src/elevenlabs/types/api_integration_webhook_overrides_output_request_headers_value.py create mode 100644 src/elevenlabs/types/api_integration_webhook_tool_config_input.py create mode 100644 src/elevenlabs/types/api_integration_webhook_tool_config_output.py create mode 100644 src/elevenlabs/types/literal_override.py create mode 100644 src/elevenlabs/types/literal_override_constant_value.py create mode 100644 src/elevenlabs/types/mcp_tool_config_override.py create mode 100644 src/elevenlabs/types/object_override_input.py create mode 100644 src/elevenlabs/types/object_override_input_properties_value.py create mode 100644 src/elevenlabs/types/object_override_output.py create mode 100644 src/elevenlabs/types/object_override_output_properties_value.py create mode 100644 src/elevenlabs/types/pending_subscription_switch_response_model_next_billing_period.py create mode 100644 src/elevenlabs/types/phone_number_dynamic_variable_transfer_destination.py create mode 100644 src/elevenlabs/types/query_override.py create mode 100644 src/elevenlabs/types/sip_uri_dynamic_variable_transfer_destination.py diff --git a/pyproject.toml b/pyproject.toml index 95313f5a..b29775d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.21.0" +version = "v2.22.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 24df9806..d2a3ee9d 100644 --- a/reference.md +++ b/reference.md @@ -9523,7 +9523,7 @@ Add a new tool to the available tools in the workspace. from elevenlabs import ( ElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = ElevenLabs( @@ -9531,10 +9531,11 @@ client = ElevenLabs( ) client.conversational_ai.tools.create( request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) @@ -9743,7 +9744,7 @@ Update tool that is available in the workspace. from elevenlabs import ( ElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = ElevenLabs( @@ -9752,10 +9753,11 @@ client = ElevenLabs( client.conversational_ai.tools.update( tool_id="tool_id", request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) @@ -10385,12 +10387,7 @@ client = ElevenLabs( client.conversational_ai.batch_calls.create( call_name="call_name", agent_id="agent_id", - agent_phone_number_id="agent_phone_number_id", - recipients=[ - OutboundCallRecipient( - phone_number="phone_number", - ) - ], + recipients=[OutboundCallRecipient()], ) ``` @@ -10423,7 +10420,7 @@ client.conversational_ai.batch_calls.create(
-**agent_phone_number_id:** `str` +**recipients:** `typing.Sequence[OutboundCallRecipient]`
@@ -10431,7 +10428,7 @@ client.conversational_ai.batch_calls.create(
-**recipients:** `typing.Sequence[OutboundCallRecipient]` +**scheduled_time_unix:** `typing.Optional[int]`
@@ -10439,7 +10436,15 @@ client.conversational_ai.batch_calls.create(
-**scheduled_time_unix:** `typing.Optional[int]` +**agent_phone_number_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**agent_whatsapp_business_account_id:** `typing.Optional[str]`
@@ -11115,7 +11120,23 @@ client.conversational_ai.mcp_servers.update(
-**force_pre_tool_speech:** `typing.Optional[bool]` — Whether to force pre-tool speech for all tools from this MCP server +**force_pre_tool_speech:** `typing.Optional[bool]` — If set, overrides the server's force_pre_tool_speech setting for this tool + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — If set, overrides the server's disable_interruptions setting for this tool + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[ToolCallSoundType]` — Predefined tool call sound type to play during tool execution for all tools from this MCP server
@@ -11123,7 +11144,7 @@ client.conversational_ai.mcp_servers.update(
-**disable_interruptions:** `typing.Optional[bool]` — Whether to disable interruptions for all tools from this MCP server +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — Determines when the tool call sound should play for all tools from this MCP server
@@ -11131,7 +11152,7 @@ client.conversational_ai.mcp_servers.update(
-**execution_mode:** `typing.Optional[ToolExecutionMode]` — The execution mode for all tools from this MCP server +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool
@@ -12963,6 +12984,419 @@ client.conversational_ai.mcp_servers.tool_approvals.delete( + + +
+ +## ConversationalAi McpServers ToolConfigs +
client.conversational_ai.mcp_servers.tool_configs.create(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.tool_configs.create( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — The name of the MCP tool + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — If set, overrides the server's force_pre_tool_speech setting for this tool + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — If set, overrides the server's disable_interruptions setting for this tool + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[ToolCallSoundType]` — If set, overrides the server's tool_call_sound setting for this tool + +
+
+ +
+
+ +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — If set, overrides the server's tool_call_sound_behavior setting for this tool + +
+
+ +
+
+ +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool + +
+
+ +
+
+ +**assignments:** `typing.Optional[typing.Sequence[DynamicVariableAssignment]]` — Dynamic variable assignments for this MCP tool + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.tool_configs.get( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to retrieve config overrides for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.tool_configs.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to remove config overrides for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.update(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.conversational_ai.mcp_servers.tool_configs.update( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to update config overrides for. + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — If set, overrides the server's force_pre_tool_speech setting for this tool + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — If set, overrides the server's disable_interruptions setting for this tool + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[ToolCallSoundType]` — If set, overrides the server's tool_call_sound setting for this tool + +
+
+ +
+
+ +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — If set, overrides the server's tool_call_sound_behavior setting for this tool + +
+
+ +
+
+ +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool + +
+
+ +
+
+ +**assignments:** `typing.Optional[typing.Sequence[DynamicVariableAssignment]]` — Dynamic variable assignments for this MCP tool + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index 5dcdc66f..cc9b5331 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -64,6 +64,12 @@ AgentWorkspaceOverridesOutput, Alignment, AllowlistItem, + ApiIntegrationWebhookOverridesInput, + ApiIntegrationWebhookOverridesInputRequestHeadersValue, + ApiIntegrationWebhookOverridesOutput, + ApiIntegrationWebhookOverridesOutputRequestHeadersValue, + ApiIntegrationWebhookToolConfigInput, + ApiIntegrationWebhookToolConfigOutput, ArrayJsonSchemaPropertyInput, ArrayJsonSchemaPropertyInputItems, ArrayJsonSchemaPropertyOutput, @@ -869,6 +875,8 @@ LiteralJsonSchemaProperty, LiteralJsonSchemaPropertyConstantValue, LiteralJsonSchemaPropertyType, + LiteralOverride, + LiteralOverrideConstantValue, LivekitStackType, Llm, LlmCategoryUsage, @@ -901,6 +909,7 @@ McpServersResponseModel, McpToolApprovalHash, McpToolApprovalPolicy, + McpToolConfigOverride, MetricRecord, MetricType, Model, @@ -917,6 +926,10 @@ ObjectJsonSchemaPropertyInputPropertiesValue, ObjectJsonSchemaPropertyOutput, ObjectJsonSchemaPropertyOutputPropertiesValue, + ObjectOverrideInput, + ObjectOverrideInputPropertiesValue, + ObjectOverrideOutput, + ObjectOverrideOutputPropertiesValue, OrbAvatar, OutboundCallRecipient, OutboundCallRecipientResponseModel, @@ -925,13 +938,17 @@ PdfExportOptions, PendingCancellationResponseModel, PendingSubscriptionSwitchResponseModel, + PendingSubscriptionSwitchResponseModelNextBillingPeriod, PendingSubscriptionSwitchResponseModelNextTier, PhoneNumberAgentInfo, + PhoneNumberDynamicVariableTransferDestination, PhoneNumberTransfer, PhoneNumberTransferDestination, PhoneNumberTransferTransferDestination, PhoneNumberTransferTransferDestination_Phone, + PhoneNumberTransferTransferDestination_PhoneDynamicVariable, PhoneNumberTransferTransferDestination_SipUri, + PhoneNumberTransferTransferDestination_SipUriDynamicVariable, PlayDtmfResultErrorModel, PlayDtmfResultSuccessModel, PlayDtmfToolConfig, @@ -975,6 +992,7 @@ PromptAgentApiModelInputBackupLlmConfig_Disabled, PromptAgentApiModelInputBackupLlmConfig_Override, PromptAgentApiModelInputToolsItem, + PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelInputToolsItem_Client, PromptAgentApiModelInputToolsItem_Mcp, PromptAgentApiModelInputToolsItem_System, @@ -985,6 +1003,7 @@ PromptAgentApiModelOutputBackupLlmConfig_Disabled, PromptAgentApiModelOutputBackupLlmConfig_Override, PromptAgentApiModelOutputToolsItem, + PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelOutputToolsItem_Client, PromptAgentApiModelOutputToolsItem_Mcp, PromptAgentApiModelOutputToolsItem_System, @@ -994,6 +1013,7 @@ PromptAgentApiModelWorkflowOverrideInput, PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig, PromptAgentApiModelWorkflowOverrideInputToolsItem, + PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideInputToolsItem_System, @@ -1001,6 +1021,7 @@ PromptAgentApiModelWorkflowOverrideOutput, PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig, PromptAgentApiModelWorkflowOverrideOutputToolsItem, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, @@ -1016,6 +1037,7 @@ PronunciationDictionaryVersionResponseModel, PronunciationDictionaryVersionResponseModelPermissionOnResource, PydanticPronunciationDictionaryVersionLocator, + QueryOverride, QueryParamsJsonSchema, RagChunkMetadata, RagConfig, @@ -1074,6 +1096,7 @@ SipTrunkCredentialsRequestModel, SipTrunkOutboundCallResponse, SipTrunkTransportEnum, + SipUriDynamicVariableTransferDestination, SipUriTransferDestination, SkipTurnToolConfig, SkipTurnToolResponseModel, @@ -1153,11 +1176,13 @@ ToolMockConfig, ToolRequestModel, ToolRequestModelToolConfig, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ToolRequestModelToolConfig_Client, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook, ToolResponseModel, ToolResponseModelToolConfig, + ToolResponseModelToolConfig_ApiIntegrationWebhook, ToolResponseModelToolConfig_Client, ToolResponseModelToolConfig_Mcp, ToolResponseModelToolConfig_System, @@ -1340,11 +1365,15 @@ WorkflowPhoneNumberNodeModelInput, WorkflowPhoneNumberNodeModelInputTransferDestination, WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable, WorkflowPhoneNumberNodeModelOutput, WorkflowPhoneNumberNodeModelOutputTransferDestination, WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable, WorkflowResultConditionModelInput, WorkflowResultConditionModelOutput, WorkflowStandaloneAgentNodeModelInput, @@ -1388,6 +1417,7 @@ ) from .errors import ( BadRequestError, + ConflictError, ForbiddenError, NotFoundError, TooEarlyError, @@ -1436,6 +1466,8 @@ from .music import ( MusicComposeDetailedRequestOutputFormat, MusicComposeRequestOutputFormat, + MusicSeparateStemsRequestOutputFormat, + MusicSeparateStemsRequestStemVariationId, MusicStreamRequestOutputFormat, ) from .play import play, save, stream @@ -1565,6 +1597,12 @@ "AgentWorkspaceOverridesOutput": ".types", "Alignment": ".types", "AllowlistItem": ".types", + "ApiIntegrationWebhookOverridesInput": ".types", + "ApiIntegrationWebhookOverridesInputRequestHeadersValue": ".types", + "ApiIntegrationWebhookOverridesOutput": ".types", + "ApiIntegrationWebhookOverridesOutputRequestHeadersValue": ".types", + "ApiIntegrationWebhookToolConfigInput": ".types", + "ApiIntegrationWebhookToolConfigOutput": ".types", "ArrayJsonSchemaPropertyInput": ".types", "ArrayJsonSchemaPropertyInputItems": ".types", "ArrayJsonSchemaPropertyOutput": ".types", @@ -2097,6 +2135,7 @@ "CloseContext": ".types", "CloseSocket": ".types", "CommitStrategy": ".realtime", + "ConflictError": ".errors", "ConvAiDynamicVariable": ".types", "ConvAiSecretLocator": ".types", "ConvAiStoredSecretDependencies": ".types", @@ -2408,6 +2447,8 @@ "LiteralJsonSchemaProperty": ".types", "LiteralJsonSchemaPropertyConstantValue": ".types", "LiteralJsonSchemaPropertyType": ".types", + "LiteralOverride": ".types", + "LiteralOverrideConstantValue": ".types", "LivekitStackType": ".types", "Llm": ".types", "LlmCategoryUsage": ".types", @@ -2440,6 +2481,7 @@ "McpServersResponseModel": ".types", "McpToolApprovalHash": ".types", "McpToolApprovalPolicy": ".types", + "McpToolConfigOverride": ".types", "MetricRecord": ".types", "MetricType": ".types", "Model": ".types", @@ -2453,6 +2495,8 @@ "MusicComposeDetailedRequestOutputFormat": ".music", "MusicComposeRequestOutputFormat": ".music", "MusicPrompt": ".types", + "MusicSeparateStemsRequestOutputFormat": ".music", + "MusicSeparateStemsRequestStemVariationId": ".music", "MusicStreamRequestOutputFormat": ".music", "NormalizedAlignment": ".types", "NotFoundError": ".errors", @@ -2460,6 +2504,10 @@ "ObjectJsonSchemaPropertyInputPropertiesValue": ".types", "ObjectJsonSchemaPropertyOutput": ".types", "ObjectJsonSchemaPropertyOutputPropertiesValue": ".types", + "ObjectOverrideInput": ".types", + "ObjectOverrideInputPropertiesValue": ".types", + "ObjectOverrideOutput": ".types", + "ObjectOverrideOutputPropertiesValue": ".types", "OrbAvatar": ".types", "OutboundCallRecipient": ".types", "OutboundCallRecipientResponseModel": ".types", @@ -2468,13 +2516,17 @@ "PdfExportOptions": ".types", "PendingCancellationResponseModel": ".types", "PendingSubscriptionSwitchResponseModel": ".types", + "PendingSubscriptionSwitchResponseModelNextBillingPeriod": ".types", "PendingSubscriptionSwitchResponseModelNextTier": ".types", "PhoneNumberAgentInfo": ".types", + "PhoneNumberDynamicVariableTransferDestination": ".types", "PhoneNumberTransfer": ".types", "PhoneNumberTransferDestination": ".types", "PhoneNumberTransferTransferDestination": ".types", "PhoneNumberTransferTransferDestination_Phone": ".types", + "PhoneNumberTransferTransferDestination_PhoneDynamicVariable": ".types", "PhoneNumberTransferTransferDestination_SipUri": ".types", + "PhoneNumberTransferTransferDestination_SipUriDynamicVariable": ".types", "PlayDtmfResultErrorModel": ".types", "PlayDtmfResultSuccessModel": ".types", "PlayDtmfToolConfig": ".types", @@ -2518,6 +2570,7 @@ "PromptAgentApiModelInputBackupLlmConfig_Disabled": ".types", "PromptAgentApiModelInputBackupLlmConfig_Override": ".types", "PromptAgentApiModelInputToolsItem": ".types", + "PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook": ".types", "PromptAgentApiModelInputToolsItem_Client": ".types", "PromptAgentApiModelInputToolsItem_Mcp": ".types", "PromptAgentApiModelInputToolsItem_System": ".types", @@ -2528,6 +2581,7 @@ "PromptAgentApiModelOutputBackupLlmConfig_Disabled": ".types", "PromptAgentApiModelOutputBackupLlmConfig_Override": ".types", "PromptAgentApiModelOutputToolsItem": ".types", + "PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook": ".types", "PromptAgentApiModelOutputToolsItem_Client": ".types", "PromptAgentApiModelOutputToolsItem_Mcp": ".types", "PromptAgentApiModelOutputToolsItem_System": ".types", @@ -2537,6 +2591,7 @@ "PromptAgentApiModelWorkflowOverrideInput": ".types", "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig": ".types", "PromptAgentApiModelWorkflowOverrideInputToolsItem": ".types", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook": ".types", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client": ".types", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp": ".types", "PromptAgentApiModelWorkflowOverrideInputToolsItem_System": ".types", @@ -2544,6 +2599,7 @@ "PromptAgentApiModelWorkflowOverrideOutput": ".types", "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig": ".types", "PromptAgentApiModelWorkflowOverrideOutputToolsItem": ".types", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook": ".types", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client": ".types", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp": ".types", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System": ".types", @@ -2561,6 +2617,7 @@ "PronunciationDictionaryVersionResponseModel": ".types", "PronunciationDictionaryVersionResponseModelPermissionOnResource": ".types", "PydanticPronunciationDictionaryVersionLocator": ".types", + "QueryOverride": ".types", "QueryParamsJsonSchema": ".types", "RagChunkMetadata": ".types", "RagConfig": ".types", @@ -2627,6 +2684,7 @@ "SipTrunkCredentialsRequestModel": ".types", "SipTrunkOutboundCallResponse": ".types", "SipTrunkTransportEnum": ".types", + "SipUriDynamicVariableTransferDestination": ".types", "SipUriTransferDestination": ".types", "SkipTurnToolConfig": ".types", "SkipTurnToolResponseModel": ".types", @@ -2727,11 +2785,13 @@ "ToolMockConfig": ".types", "ToolRequestModel": ".types", "ToolRequestModelToolConfig": ".types", + "ToolRequestModelToolConfig_ApiIntegrationWebhook": ".types", "ToolRequestModelToolConfig_Client": ".types", "ToolRequestModelToolConfig_System": ".types", "ToolRequestModelToolConfig_Webhook": ".types", "ToolResponseModel": ".types", "ToolResponseModelToolConfig": ".types", + "ToolResponseModelToolConfig_ApiIntegrationWebhook": ".types", "ToolResponseModelToolConfig_Client": ".types", "ToolResponseModelToolConfig_Mcp": ".types", "ToolResponseModelToolConfig_System": ".types", @@ -2918,11 +2978,15 @@ "WorkflowPhoneNumberNodeModelInput": ".types", "WorkflowPhoneNumberNodeModelInputTransferDestination": ".types", "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone": ".types", + "WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable": ".types", "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri": ".types", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable": ".types", "WorkflowPhoneNumberNodeModelOutput": ".types", "WorkflowPhoneNumberNodeModelOutputTransferDestination": ".types", "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone": ".types", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable": ".types", "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri": ".types", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable": ".types", "WorkflowResultConditionModelInput": ".types", "WorkflowResultConditionModelOutput": ".types", "WorkflowStandaloneAgentNodeModelInput": ".types", @@ -3072,6 +3136,12 @@ def __dir__(): "AgentWorkspaceOverridesOutput", "Alignment", "AllowlistItem", + "ApiIntegrationWebhookOverridesInput", + "ApiIntegrationWebhookOverridesInputRequestHeadersValue", + "ApiIntegrationWebhookOverridesOutput", + "ApiIntegrationWebhookOverridesOutputRequestHeadersValue", + "ApiIntegrationWebhookToolConfigInput", + "ApiIntegrationWebhookToolConfigOutput", "ArrayJsonSchemaPropertyInput", "ArrayJsonSchemaPropertyInputItems", "ArrayJsonSchemaPropertyOutput", @@ -3604,6 +3674,7 @@ def __dir__(): "CloseContext", "CloseSocket", "CommitStrategy", + "ConflictError", "ConvAiDynamicVariable", "ConvAiSecretLocator", "ConvAiStoredSecretDependencies", @@ -3915,6 +3986,8 @@ def __dir__(): "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", + "LiteralOverride", + "LiteralOverrideConstantValue", "LivekitStackType", "Llm", "LlmCategoryUsage", @@ -3947,6 +4020,7 @@ def __dir__(): "McpServersResponseModel", "McpToolApprovalHash", "McpToolApprovalPolicy", + "McpToolConfigOverride", "MetricRecord", "MetricType", "Model", @@ -3960,6 +4034,8 @@ def __dir__(): "MusicComposeDetailedRequestOutputFormat", "MusicComposeRequestOutputFormat", "MusicPrompt", + "MusicSeparateStemsRequestOutputFormat", + "MusicSeparateStemsRequestStemVariationId", "MusicStreamRequestOutputFormat", "NormalizedAlignment", "NotFoundError", @@ -3967,6 +4043,10 @@ def __dir__(): "ObjectJsonSchemaPropertyInputPropertiesValue", "ObjectJsonSchemaPropertyOutput", "ObjectJsonSchemaPropertyOutputPropertiesValue", + "ObjectOverrideInput", + "ObjectOverrideInputPropertiesValue", + "ObjectOverrideOutput", + "ObjectOverrideOutputPropertiesValue", "OrbAvatar", "OutboundCallRecipient", "OutboundCallRecipientResponseModel", @@ -3975,13 +4055,17 @@ def __dir__(): "PdfExportOptions", "PendingCancellationResponseModel", "PendingSubscriptionSwitchResponseModel", + "PendingSubscriptionSwitchResponseModelNextBillingPeriod", "PendingSubscriptionSwitchResponseModelNextTier", "PhoneNumberAgentInfo", + "PhoneNumberDynamicVariableTransferDestination", "PhoneNumberTransfer", "PhoneNumberTransferDestination", "PhoneNumberTransferTransferDestination", "PhoneNumberTransferTransferDestination_Phone", + "PhoneNumberTransferTransferDestination_PhoneDynamicVariable", "PhoneNumberTransferTransferDestination_SipUri", + "PhoneNumberTransferTransferDestination_SipUriDynamicVariable", "PlayDtmfResultErrorModel", "PlayDtmfResultSuccessModel", "PlayDtmfToolConfig", @@ -4025,6 +4109,7 @@ def __dir__(): "PromptAgentApiModelInputBackupLlmConfig_Disabled", "PromptAgentApiModelInputBackupLlmConfig_Override", "PromptAgentApiModelInputToolsItem", + "PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelInputToolsItem_Client", "PromptAgentApiModelInputToolsItem_Mcp", "PromptAgentApiModelInputToolsItem_System", @@ -4035,6 +4120,7 @@ def __dir__(): "PromptAgentApiModelOutputBackupLlmConfig_Disabled", "PromptAgentApiModelOutputBackupLlmConfig_Override", "PromptAgentApiModelOutputToolsItem", + "PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelOutputToolsItem_Client", "PromptAgentApiModelOutputToolsItem_Mcp", "PromptAgentApiModelOutputToolsItem_System", @@ -4044,6 +4130,7 @@ def __dir__(): "PromptAgentApiModelWorkflowOverrideInput", "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig", "PromptAgentApiModelWorkflowOverrideInputToolsItem", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp", "PromptAgentApiModelWorkflowOverrideInputToolsItem_System", @@ -4051,6 +4138,7 @@ def __dir__(): "PromptAgentApiModelWorkflowOverrideOutput", "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig", "PromptAgentApiModelWorkflowOverrideOutputToolsItem", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System", @@ -4068,6 +4156,7 @@ def __dir__(): "PronunciationDictionaryVersionResponseModel", "PronunciationDictionaryVersionResponseModelPermissionOnResource", "PydanticPronunciationDictionaryVersionLocator", + "QueryOverride", "QueryParamsJsonSchema", "RagChunkMetadata", "RagConfig", @@ -4134,6 +4223,7 @@ def __dir__(): "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", "SipTrunkTransportEnum", + "SipUriDynamicVariableTransferDestination", "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", @@ -4234,11 +4324,13 @@ def __dir__(): "ToolMockConfig", "ToolRequestModel", "ToolRequestModelToolConfig", + "ToolRequestModelToolConfig_ApiIntegrationWebhook", "ToolRequestModelToolConfig_Client", "ToolRequestModelToolConfig_System", "ToolRequestModelToolConfig_Webhook", "ToolResponseModel", "ToolResponseModelToolConfig", + "ToolResponseModelToolConfig_ApiIntegrationWebhook", "ToolResponseModelToolConfig_Client", "ToolResponseModelToolConfig_Mcp", "ToolResponseModelToolConfig_System", @@ -4425,11 +4517,15 @@ def __dir__(): "WorkflowPhoneNumberNodeModelInput", "WorkflowPhoneNumberNodeModelInputTransferDestination", "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable", "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable", "WorkflowPhoneNumberNodeModelOutput", "WorkflowPhoneNumberNodeModelOutputTransferDestination", "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable", "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable", "WorkflowResultConditionModelInput", "WorkflowResultConditionModelOutput", "WorkflowStandaloneAgentNodeModelInput", diff --git a/src/elevenlabs/conversational_ai/batch_calls/client.py b/src/elevenlabs/conversational_ai/batch_calls/client.py index beee75f9..4b84029d 100644 --- a/src/elevenlabs/conversational_ai/batch_calls/client.py +++ b/src/elevenlabs/conversational_ai/batch_calls/client.py @@ -34,9 +34,10 @@ def create( *, call_name: str, agent_id: str, - agent_phone_number_id: str, recipients: typing.Sequence[OutboundCallRecipient], scheduled_time_unix: typing.Optional[int] = OMIT, + agent_phone_number_id: typing.Optional[str] = OMIT, + agent_whatsapp_business_account_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BatchCallResponse: """ @@ -48,12 +49,14 @@ def create( agent_id : str - agent_phone_number_id : str - recipients : typing.Sequence[OutboundCallRecipient] scheduled_time_unix : typing.Optional[int] + agent_phone_number_id : typing.Optional[str] + + agent_whatsapp_business_account_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -72,20 +75,16 @@ def create( client.conversational_ai.batch_calls.create( call_name="call_name", agent_id="agent_id", - agent_phone_number_id="agent_phone_number_id", - recipients=[ - OutboundCallRecipient( - phone_number="phone_number", - ) - ], + recipients=[OutboundCallRecipient()], ) """ _response = self._raw_client.create( call_name=call_name, agent_id=agent_id, - agent_phone_number_id=agent_phone_number_id, recipients=recipients, scheduled_time_unix=scheduled_time_unix, + agent_phone_number_id=agent_phone_number_id, + agent_whatsapp_business_account_id=agent_whatsapp_business_account_id, request_options=request_options, ) return _response.data @@ -242,9 +241,10 @@ async def create( *, call_name: str, agent_id: str, - agent_phone_number_id: str, recipients: typing.Sequence[OutboundCallRecipient], scheduled_time_unix: typing.Optional[int] = OMIT, + agent_phone_number_id: typing.Optional[str] = OMIT, + agent_whatsapp_business_account_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BatchCallResponse: """ @@ -256,12 +256,14 @@ async def create( agent_id : str - agent_phone_number_id : str - recipients : typing.Sequence[OutboundCallRecipient] scheduled_time_unix : typing.Optional[int] + agent_phone_number_id : typing.Optional[str] + + agent_whatsapp_business_account_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -285,12 +287,7 @@ async def main() -> None: await client.conversational_ai.batch_calls.create( call_name="call_name", agent_id="agent_id", - agent_phone_number_id="agent_phone_number_id", - recipients=[ - OutboundCallRecipient( - phone_number="phone_number", - ) - ], + recipients=[OutboundCallRecipient()], ) @@ -299,9 +296,10 @@ async def main() -> None: _response = await self._raw_client.create( call_name=call_name, agent_id=agent_id, - agent_phone_number_id=agent_phone_number_id, recipients=recipients, scheduled_time_unix=scheduled_time_unix, + agent_phone_number_id=agent_phone_number_id, + agent_whatsapp_business_account_id=agent_whatsapp_business_account_id, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py index 07172c6e..c96e3526 100644 --- a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py +++ b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py @@ -30,9 +30,10 @@ def create( *, call_name: str, agent_id: str, - agent_phone_number_id: str, recipients: typing.Sequence[OutboundCallRecipient], scheduled_time_unix: typing.Optional[int] = OMIT, + agent_phone_number_id: typing.Optional[str] = OMIT, + agent_whatsapp_business_account_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[BatchCallResponse]: """ @@ -44,12 +45,14 @@ def create( agent_id : str - agent_phone_number_id : str - recipients : typing.Sequence[OutboundCallRecipient] scheduled_time_unix : typing.Optional[int] + agent_phone_number_id : typing.Optional[str] + + agent_whatsapp_business_account_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -64,11 +67,12 @@ def create( json={ "call_name": call_name, "agent_id": agent_id, - "agent_phone_number_id": agent_phone_number_id, "recipients": convert_and_respect_annotation_metadata( object_=recipients, annotation=typing.Sequence[OutboundCallRecipient], direction="write" ), "scheduled_time_unix": scheduled_time_unix, + "agent_phone_number_id": agent_phone_number_id, + "agent_whatsapp_business_account_id": agent_whatsapp_business_account_id, }, headers={ "content-type": "application/json", @@ -318,9 +322,10 @@ async def create( *, call_name: str, agent_id: str, - agent_phone_number_id: str, recipients: typing.Sequence[OutboundCallRecipient], scheduled_time_unix: typing.Optional[int] = OMIT, + agent_phone_number_id: typing.Optional[str] = OMIT, + agent_whatsapp_business_account_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[BatchCallResponse]: """ @@ -332,12 +337,14 @@ async def create( agent_id : str - agent_phone_number_id : str - recipients : typing.Sequence[OutboundCallRecipient] scheduled_time_unix : typing.Optional[int] + agent_phone_number_id : typing.Optional[str] + + agent_whatsapp_business_account_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -352,11 +359,12 @@ async def create( json={ "call_name": call_name, "agent_id": agent_id, - "agent_phone_number_id": agent_phone_number_id, "recipients": convert_and_respect_annotation_metadata( object_=recipients, annotation=typing.Sequence[OutboundCallRecipient], direction="write" ), "scheduled_time_unix": scheduled_time_unix, + "agent_phone_number_id": agent_phone_number_id, + "agent_whatsapp_business_account_id": agent_whatsapp_business_account_id, }, headers={ "content-type": "application/json", diff --git a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py index bc6acd72..d6c0c75c 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/__init__.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/__init__.py @@ -7,11 +7,12 @@ if typing.TYPE_CHECKING: from .types import McpServerConfigUpdateRequestModelRequestHeadersValue - from . import approval_policy, tool_approvals, tools + from . import approval_policy, tool_approvals, tool_configs, tools _dynamic_imports: typing.Dict[str, str] = { "McpServerConfigUpdateRequestModelRequestHeadersValue": ".types", "approval_policy": ".approval_policy", "tool_approvals": ".tool_approvals", + "tool_configs": ".tool_configs", "tools": ".tools", } @@ -37,4 +38,10 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["McpServerConfigUpdateRequestModelRequestHeadersValue", "approval_policy", "tool_approvals", "tools"] +__all__ = [ + "McpServerConfigUpdateRequestModelRequestHeadersValue", + "approval_policy", + "tool_approvals", + "tool_configs", + "tools", +] diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py index 21aff505..a88a908f 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py @@ -10,6 +10,8 @@ from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel +from ...types.tool_call_sound_behavior import ToolCallSoundBehavior +from ...types.tool_call_sound_type import ToolCallSoundType from ...types.tool_execution_mode import ToolExecutionMode from .raw_client import AsyncRawMcpServersClient, RawMcpServersClient from .types.mcp_server_config_update_request_model_request_headers_value import ( @@ -19,6 +21,7 @@ if typing.TYPE_CHECKING: from .approval_policy.client import ApprovalPolicyClient, AsyncApprovalPolicyClient from .tool_approvals.client import AsyncToolApprovalsClient, ToolApprovalsClient + from .tool_configs.client import AsyncToolConfigsClient, ToolConfigsClient from .tools.client import AsyncToolsClient, ToolsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -31,6 +34,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._tools: typing.Optional[ToolsClient] = None self._approval_policy: typing.Optional[ApprovalPolicyClient] = None self._tool_approvals: typing.Optional[ToolApprovalsClient] = None + self._tool_configs: typing.Optional[ToolConfigsClient] = None @property def with_raw_response(self) -> RawMcpServersClient: @@ -145,6 +149,8 @@ def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, execution_mode: typing.Optional[ToolExecutionMode] = OMIT, request_headers: typing.Optional[ typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] @@ -163,13 +169,19 @@ def update( The approval mode to set for the MCP server force_pre_tool_speech : typing.Optional[bool] - Whether to force pre-tool speech for all tools from this MCP server + If set, overrides the server's force_pre_tool_speech setting for this tool disable_interruptions : typing.Optional[bool] - Whether to disable interruptions for all tools from this MCP server + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + Predefined tool call sound type to play during tool execution for all tools from this MCP server + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + Determines when the tool call sound should play for all tools from this MCP server execution_mode : typing.Optional[ToolExecutionMode] - The execution mode for all tools from this MCP server + If set, overrides the server's execution_mode setting for this tool request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] The headers to include in requests to the MCP server @@ -198,6 +210,8 @@ def update( approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, execution_mode=execution_mode, request_headers=request_headers, request_options=request_options, @@ -228,6 +242,14 @@ def tool_approvals(self): self._tool_approvals = ToolApprovalsClient(client_wrapper=self._client_wrapper) return self._tool_approvals + @property + def tool_configs(self): + if self._tool_configs is None: + from .tool_configs.client import ToolConfigsClient # noqa: E402 + + self._tool_configs = ToolConfigsClient(client_wrapper=self._client_wrapper) + return self._tool_configs + class AsyncMcpServersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -236,6 +258,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._tools: typing.Optional[AsyncToolsClient] = None self._approval_policy: typing.Optional[AsyncApprovalPolicyClient] = None self._tool_approvals: typing.Optional[AsyncToolApprovalsClient] = None + self._tool_configs: typing.Optional[AsyncToolConfigsClient] = None @property def with_raw_response(self) -> AsyncRawMcpServersClient: @@ -374,6 +397,8 @@ async def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, execution_mode: typing.Optional[ToolExecutionMode] = OMIT, request_headers: typing.Optional[ typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] @@ -392,13 +417,19 @@ async def update( The approval mode to set for the MCP server force_pre_tool_speech : typing.Optional[bool] - Whether to force pre-tool speech for all tools from this MCP server + If set, overrides the server's force_pre_tool_speech setting for this tool disable_interruptions : typing.Optional[bool] - Whether to disable interruptions for all tools from this MCP server + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + Predefined tool call sound type to play during tool execution for all tools from this MCP server + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + Determines when the tool call sound should play for all tools from this MCP server execution_mode : typing.Optional[ToolExecutionMode] - The execution mode for all tools from this MCP server + If set, overrides the server's execution_mode setting for this tool request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] The headers to include in requests to the MCP server @@ -435,6 +466,8 @@ async def main() -> None: approval_policy=approval_policy, force_pre_tool_speech=force_pre_tool_speech, disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, execution_mode=execution_mode, request_headers=request_headers, request_options=request_options, @@ -464,3 +497,11 @@ def tool_approvals(self): self._tool_approvals = AsyncToolApprovalsClient(client_wrapper=self._client_wrapper) return self._tool_approvals + + @property + def tool_configs(self): + if self._tool_configs is None: + from .tool_configs.client import AsyncToolConfigsClient # noqa: E402 + + self._tool_configs = AsyncToolConfigsClient(client_wrapper=self._client_wrapper) + return self._tool_configs diff --git a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py index d43b9c2d..e320fb04 100644 --- a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py +++ b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py @@ -16,6 +16,8 @@ from ...types.mcp_server_config_input import McpServerConfigInput from ...types.mcp_server_response_model import McpServerResponseModel from ...types.mcp_servers_response_model import McpServersResponseModel +from ...types.tool_call_sound_behavior import ToolCallSoundBehavior +from ...types.tool_call_sound_type import ToolCallSoundType from ...types.tool_execution_mode import ToolExecutionMode from .types.mcp_server_config_update_request_model_request_headers_value import ( McpServerConfigUpdateRequestModelRequestHeadersValue, @@ -190,6 +192,8 @@ def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, execution_mode: typing.Optional[ToolExecutionMode] = OMIT, request_headers: typing.Optional[ typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] @@ -208,13 +212,19 @@ def update( The approval mode to set for the MCP server force_pre_tool_speech : typing.Optional[bool] - Whether to force pre-tool speech for all tools from this MCP server + If set, overrides the server's force_pre_tool_speech setting for this tool disable_interruptions : typing.Optional[bool] - Whether to disable interruptions for all tools from this MCP server + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + Predefined tool call sound type to play during tool execution for all tools from this MCP server + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + Determines when the tool call sound should play for all tools from this MCP server execution_mode : typing.Optional[ToolExecutionMode] - The execution mode for all tools from this MCP server + If set, overrides the server's execution_mode setting for this tool request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] The headers to include in requests to the MCP server @@ -234,6 +244,8 @@ def update( "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, "execution_mode": execution_mode, "request_headers": convert_and_respect_annotation_metadata( object_=request_headers, @@ -441,6 +453,8 @@ async def update( approval_policy: typing.Optional[McpApprovalPolicy] = OMIT, force_pre_tool_speech: typing.Optional[bool] = OMIT, disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, execution_mode: typing.Optional[ToolExecutionMode] = OMIT, request_headers: typing.Optional[ typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]] @@ -459,13 +473,19 @@ async def update( The approval mode to set for the MCP server force_pre_tool_speech : typing.Optional[bool] - Whether to force pre-tool speech for all tools from this MCP server + If set, overrides the server's force_pre_tool_speech setting for this tool disable_interruptions : typing.Optional[bool] - Whether to disable interruptions for all tools from this MCP server + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + Predefined tool call sound type to play during tool execution for all tools from this MCP server + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + Determines when the tool call sound should play for all tools from this MCP server execution_mode : typing.Optional[ToolExecutionMode] - The execution mode for all tools from this MCP server + If set, overrides the server's execution_mode setting for this tool request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]] The headers to include in requests to the MCP server @@ -485,6 +505,8 @@ async def update( "approval_policy": approval_policy, "force_pre_tool_speech": force_pre_tool_speech, "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, "execution_mode": execution_mode, "request_headers": convert_and_respect_annotation_metadata( object_=request_headers, diff --git a/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/__init__.py b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/__init__.py new file mode 100644 index 00000000..5cde0202 --- /dev/null +++ b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/client.py b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/client.py new file mode 100644 index 00000000..53984ed9 --- /dev/null +++ b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/client.py @@ -0,0 +1,528 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.request_options import RequestOptions +from ....types.dynamic_variable_assignment import DynamicVariableAssignment +from ....types.mcp_server_response_model import McpServerResponseModel +from ....types.mcp_tool_config_override import McpToolConfigOverride +from ....types.tool_call_sound_behavior import ToolCallSoundBehavior +from ....types.tool_call_sound_type import ToolCallSoundType +from ....types.tool_execution_mode import ToolExecutionMode +from .raw_client import AsyncRawToolConfigsClient, RawToolConfigsClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ToolConfigsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawToolConfigsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawToolConfigsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawToolConfigsClient + """ + return self._raw_client + + def create( + self, + mcp_server_id: str, + *, + tool_name: str, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Create configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + The name of the MCP tool + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.mcp_servers.tool_configs.create( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + """ + _response = self._raw_client.create( + mcp_server_id, + tool_name=tool_name, + force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, + execution_mode=execution_mode, + assignments=assignments, + request_options=request_options, + ) + return _response.data + + def get( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> McpToolConfigOverride: + """ + Retrieve configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to retrieve config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpToolConfigOverride + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.mcp_servers.tool_configs.get( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + """ + _response = self._raw_client.get(mcp_server_id, tool_name, request_options=request_options) + return _response.data + + def delete( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> McpServerResponseModel: + """ + Remove configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to remove config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.mcp_servers.tool_configs.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + """ + _response = self._raw_client.delete(mcp_server_id, tool_name, request_options=request_options) + return _response.data + + def update( + self, + mcp_server_id: str, + tool_name: str, + *, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Update configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to update config overrides for. + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.conversational_ai.mcp_servers.tool_configs.update( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + """ + _response = self._raw_client.update( + mcp_server_id, + tool_name, + force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, + execution_mode=execution_mode, + assignments=assignments, + request_options=request_options, + ) + return _response.data + + +class AsyncToolConfigsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawToolConfigsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawToolConfigsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawToolConfigsClient + """ + return self._raw_client + + async def create( + self, + mcp_server_id: str, + *, + tool_name: str, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Create configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + The name of the MCP tool + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.mcp_servers.tool_configs.create( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + mcp_server_id, + tool_name=tool_name, + force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, + execution_mode=execution_mode, + assignments=assignments, + request_options=request_options, + ) + return _response.data + + async def get( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> McpToolConfigOverride: + """ + Retrieve configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to retrieve config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpToolConfigOverride + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.mcp_servers.tool_configs.get( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(mcp_server_id, tool_name, request_options=request_options) + return _response.data + + async def delete( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> McpServerResponseModel: + """ + Remove configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to remove config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.mcp_servers.tool_configs.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(mcp_server_id, tool_name, request_options=request_options) + return _response.data + + async def update( + self, + mcp_server_id: str, + tool_name: str, + *, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> McpServerResponseModel: + """ + Update configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to update config overrides for. + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + McpServerResponseModel + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.conversational_ai.mcp_servers.tool_configs.update( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + mcp_server_id, + tool_name, + force_pre_tool_speech=force_pre_tool_speech, + disable_interruptions=disable_interruptions, + tool_call_sound=tool_call_sound, + tool_call_sound_behavior=tool_call_sound_behavior, + execution_mode=execution_mode, + assignments=assignments, + request_options=request_options, + ) + return _response.data diff --git a/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/raw_client.py new file mode 100644 index 00000000..ebbf05e1 --- /dev/null +++ b/src/elevenlabs/conversational_ai/mcp_servers/tool_configs/raw_client.py @@ -0,0 +1,695 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ....core.api_error import ApiError +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.http_response import AsyncHttpResponse, HttpResponse +from ....core.jsonable_encoder import jsonable_encoder +from ....core.request_options import RequestOptions +from ....core.serialization import convert_and_respect_annotation_metadata +from ....core.unchecked_base_model import construct_type +from ....errors.conflict_error import ConflictError +from ....errors.not_found_error import NotFoundError +from ....errors.unprocessable_entity_error import UnprocessableEntityError +from ....types.dynamic_variable_assignment import DynamicVariableAssignment +from ....types.http_validation_error import HttpValidationError +from ....types.mcp_server_response_model import McpServerResponseModel +from ....types.mcp_tool_config_override import McpToolConfigOverride +from ....types.tool_call_sound_behavior import ToolCallSoundBehavior +from ....types.tool_call_sound_type import ToolCallSoundType +from ....types.tool_execution_mode import ToolExecutionMode + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawToolConfigsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, + mcp_server_id: str, + *, + tool_name: str, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[McpServerResponseModel]: + """ + Create configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + The name of the MCP tool + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[McpServerResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs", + method="POST", + json={ + "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, + "execution_mode": execution_mode, + "assignments": convert_and_respect_annotation_metadata( + object_=assignments, annotation=typing.Sequence[DynamicVariableAssignment], direction="write" + ), + "tool_name": tool_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[McpToolConfigOverride]: + """ + Retrieve configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to retrieve config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[McpToolConfigOverride] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpToolConfigOverride, + construct_type( + type_=McpToolConfigOverride, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[McpServerResponseModel]: + """ + Remove configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to remove config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[McpServerResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + mcp_server_id: str, + tool_name: str, + *, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[McpServerResponseModel]: + """ + Update configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to update config overrides for. + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[McpServerResponseModel] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="PATCH", + json={ + "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, + "execution_mode": execution_mode, + "assignments": convert_and_respect_annotation_metadata( + object_=assignments, annotation=typing.Sequence[DynamicVariableAssignment], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawToolConfigsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, + mcp_server_id: str, + *, + tool_name: str, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[McpServerResponseModel]: + """ + Create configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + The name of the MCP tool + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[McpServerResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs", + method="POST", + json={ + "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, + "execution_mode": execution_mode, + "assignments": convert_and_respect_annotation_metadata( + object_=assignments, annotation=typing.Sequence[DynamicVariableAssignment], direction="write" + ), + "tool_name": tool_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[McpToolConfigOverride]: + """ + Retrieve configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to retrieve config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[McpToolConfigOverride] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpToolConfigOverride, + construct_type( + type_=McpToolConfigOverride, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, mcp_server_id: str, tool_name: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[McpServerResponseModel]: + """ + Remove configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to remove config overrides for. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[McpServerResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + mcp_server_id: str, + tool_name: str, + *, + force_pre_tool_speech: typing.Optional[bool] = OMIT, + disable_interruptions: typing.Optional[bool] = OMIT, + tool_call_sound: typing.Optional[ToolCallSoundType] = OMIT, + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = OMIT, + execution_mode: typing.Optional[ToolExecutionMode] = OMIT, + assignments: typing.Optional[typing.Sequence[DynamicVariableAssignment]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[McpServerResponseModel]: + """ + Update configuration overrides for a specific MCP tool. + + Parameters + ---------- + mcp_server_id : str + ID of the MCP Server. + + tool_name : str + Name of the MCP tool to update config overrides for. + + force_pre_tool_speech : typing.Optional[bool] + If set, overrides the server's force_pre_tool_speech setting for this tool + + disable_interruptions : typing.Optional[bool] + If set, overrides the server's disable_interruptions setting for this tool + + tool_call_sound : typing.Optional[ToolCallSoundType] + If set, overrides the server's tool_call_sound setting for this tool + + tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior] + If set, overrides the server's tool_call_sound_behavior setting for this tool + + execution_mode : typing.Optional[ToolExecutionMode] + If set, overrides the server's execution_mode setting for this tool + + assignments : typing.Optional[typing.Sequence[DynamicVariableAssignment]] + Dynamic variable assignments for this MCP tool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[McpServerResponseModel] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/convai/mcp-servers/{jsonable_encoder(mcp_server_id)}/tool-configs/{jsonable_encoder(tool_name)}", + method="PATCH", + json={ + "force_pre_tool_speech": force_pre_tool_speech, + "disable_interruptions": disable_interruptions, + "tool_call_sound": tool_call_sound, + "tool_call_sound_behavior": tool_call_sound_behavior, + "execution_mode": execution_mode, + "assignments": convert_and_respect_annotation_metadata( + object_=assignments, annotation=typing.Sequence[DynamicVariableAssignment], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + McpServerResponseModel, + construct_type( + type_=McpServerResponseModel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/conversational_ai/tools/client.py b/src/elevenlabs/conversational_ai/tools/client.py index e8d230ca..cb745011 100644 --- a/src/elevenlabs/conversational_ai/tools/client.py +++ b/src/elevenlabs/conversational_ai/tools/client.py @@ -78,7 +78,7 @@ def create( from elevenlabs import ( ElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = ElevenLabs( @@ -86,10 +86,11 @@ def create( ) client.conversational_ai.tools.create( request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) @@ -187,7 +188,7 @@ def update( from elevenlabs import ( ElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = ElevenLabs( @@ -196,10 +197,11 @@ def update( client.conversational_ai.tools.update( tool_id="tool_id", request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) @@ -330,7 +332,7 @@ async def create( from elevenlabs import ( AsyncElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = AsyncElevenLabs( @@ -341,10 +343,11 @@ async def create( async def main() -> None: await client.conversational_ai.tools.create( request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) @@ -463,7 +466,7 @@ async def update( from elevenlabs import ( AsyncElevenLabs, ToolRequestModel, - ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ) client = AsyncElevenLabs( @@ -475,10 +478,11 @@ async def main() -> None: await client.conversational_ai.tools.update( tool_id="tool_id", request=ToolRequestModel( - tool_config=ToolRequestModelToolConfig_Client( + tool_config=ToolRequestModelToolConfig_ApiIntegrationWebhook( name="name", description="description", - expects_response=False, + api_integration_id="api_integration_id", + api_integration_connection_id="api_integration_connection_id", ), ), ) diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 132e1c8f..f2059cde 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.21.0", + "User-Agent": "elevenlabs/v2.22.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.21.0", + "X-Fern-SDK-Version": "v2.22.0", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/src/elevenlabs/errors/__init__.py b/src/elevenlabs/errors/__init__.py index 2363ce48..cf2bd8f1 100644 --- a/src/elevenlabs/errors/__init__.py +++ b/src/elevenlabs/errors/__init__.py @@ -7,6 +7,7 @@ if typing.TYPE_CHECKING: from .bad_request_error import BadRequestError + from .conflict_error import ConflictError from .forbidden_error import ForbiddenError from .not_found_error import NotFoundError from .too_early_error import TooEarlyError @@ -14,6 +15,7 @@ from .unprocessable_entity_error import UnprocessableEntityError _dynamic_imports: typing.Dict[str, str] = { "BadRequestError": ".bad_request_error", + "ConflictError": ".conflict_error", "ForbiddenError": ".forbidden_error", "NotFoundError": ".not_found_error", "TooEarlyError": ".too_early_error", @@ -45,6 +47,7 @@ def __dir__(): __all__ = [ "BadRequestError", + "ConflictError", "ForbiddenError", "NotFoundError", "TooEarlyError", diff --git a/src/elevenlabs/errors/conflict_error.py b/src/elevenlabs/errors/conflict_error.py new file mode 100644 index 00000000..d340b91c --- /dev/null +++ b/src/elevenlabs/errors/conflict_error.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.api_error import ApiError + + +class ConflictError(ApiError): + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=409, headers=headers, body=body) diff --git a/src/elevenlabs/music/__init__.py b/src/elevenlabs/music/__init__.py index d12d1182..f8250de9 100644 --- a/src/elevenlabs/music/__init__.py +++ b/src/elevenlabs/music/__init__.py @@ -9,12 +9,16 @@ from .types import ( MusicComposeDetailedRequestOutputFormat, MusicComposeRequestOutputFormat, + MusicSeparateStemsRequestOutputFormat, + MusicSeparateStemsRequestStemVariationId, MusicStreamRequestOutputFormat, ) from . import composition_plan _dynamic_imports: typing.Dict[str, str] = { "MusicComposeDetailedRequestOutputFormat": ".types", "MusicComposeRequestOutputFormat": ".types", + "MusicSeparateStemsRequestOutputFormat": ".types", + "MusicSeparateStemsRequestStemVariationId": ".types", "MusicStreamRequestOutputFormat": ".types", "composition_plan": ".composition_plan", } @@ -44,6 +48,8 @@ def __dir__(): __all__ = [ "MusicComposeDetailedRequestOutputFormat", "MusicComposeRequestOutputFormat", + "MusicSeparateStemsRequestOutputFormat", + "MusicSeparateStemsRequestStemVariationId", "MusicStreamRequestOutputFormat", "composition_plan", ] diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py index 57a7231f..93f77371 100644 --- a/src/elevenlabs/music/client.py +++ b/src/elevenlabs/music/client.py @@ -4,12 +4,15 @@ import typing +from .. import core from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.music_prompt import MusicPrompt from .raw_client import AsyncRawMusicClient, RawMusicClient from .types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat +from .types.music_separate_stems_request_output_format import MusicSeparateStemsRequestOutputFormat +from .types.music_separate_stems_request_stem_variation_id import MusicSeparateStemsRequestStemVariationId from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat if typing.TYPE_CHECKING: @@ -241,6 +244,41 @@ def stream( ) as r: yield from r.data + def separate_stems( + self, + *, + file: core.File, + output_format: typing.Optional[MusicSeparateStemsRequestOutputFormat] = None, + stem_variation_id: typing.Optional[MusicSeparateStemsRequestStemVariationId] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Separate a music file into individual stems + + Parameters + ---------- + file : core.File + See core.File for more documentation + + output_format : typing.Optional[MusicSeparateStemsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + stem_variation_id : typing.Optional[MusicSeparateStemsRequestStemVariationId] + The id of the stem variation to use. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[bytes] + ZIP archive containing separated audio stems. Each stem is provided as a separate audio file in the requested output format. + """ + with self._raw_client.separate_stems( + file=file, output_format=output_format, stem_variation_id=stem_variation_id, request_options=request_options + ) as r: + yield from r.data + @property def composition_plan(self): if self._composition_plan is None: @@ -500,6 +538,42 @@ async def main() -> None: async for _chunk in r.data: yield _chunk + async def separate_stems( + self, + *, + file: core.File, + output_format: typing.Optional[MusicSeparateStemsRequestOutputFormat] = None, + stem_variation_id: typing.Optional[MusicSeparateStemsRequestStemVariationId] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Separate a music file into individual stems + + Parameters + ---------- + file : core.File + See core.File for more documentation + + output_format : typing.Optional[MusicSeparateStemsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + stem_variation_id : typing.Optional[MusicSeparateStemsRequestStemVariationId] + The id of the stem variation to use. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[bytes] + ZIP archive containing separated audio stems. Each stem is provided as a separate audio file in the requested output format. + """ + async with self._raw_client.separate_stems( + file=file, output_format=output_format, stem_variation_id=stem_variation_id, request_options=request_options + ) as r: + async for _chunk in r.data: + yield _chunk + @property def composition_plan(self): if self._composition_plan is None: diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py index 51ae1fc7..422ab168 100644 --- a/src/elevenlabs/music/raw_client.py +++ b/src/elevenlabs/music/raw_client.py @@ -4,6 +4,7 @@ import typing from json.decoder import JSONDecodeError +from .. import core from ..core.api_error import ApiError from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.http_response import AsyncHttpResponse, HttpResponse @@ -15,6 +16,8 @@ from ..types.music_prompt import MusicPrompt from .types.music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .types.music_compose_request_output_format import MusicComposeRequestOutputFormat +from .types.music_separate_stems_request_output_format import MusicSeparateStemsRequestOutputFormat +from .types.music_separate_stems_request_stem_variation_id import MusicSeparateStemsRequestStemVariationId from .types.music_stream_request_output_format import MusicStreamRequestOutputFormat # this is used as the default value for optional parameters @@ -324,6 +327,82 @@ def _stream() -> HttpResponse[typing.Iterator[bytes]]: yield _stream() + @contextlib.contextmanager + def separate_stems( + self, + *, + file: core.File, + output_format: typing.Optional[MusicSeparateStemsRequestOutputFormat] = None, + stem_variation_id: typing.Optional[MusicSeparateStemsRequestStemVariationId] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Separate a music file into individual stems + + Parameters + ---------- + file : core.File + See core.File for more documentation + + output_format : typing.Optional[MusicSeparateStemsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + stem_variation_id : typing.Optional[MusicSeparateStemsRequestStemVariationId] + The id of the stem variation to use. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.Iterator[HttpResponse[typing.Iterator[bytes]]] + ZIP archive containing separated audio stems. Each stem is provided as a separate audio file in the requested output format. + """ + with self._client_wrapper.httpx_client.stream( + "v1/music/stem-separation", + method="POST", + params={ + "output_format": output_format, + }, + data={ + "stem_variation_id": stem_variation_id, + }, + files={ + "file": file, + }, + request_options=request_options, + omit=OMIT, + force_multipart=True, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + class AsyncRawMusicClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -630,3 +709,80 @@ async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) yield await _stream() + + @contextlib.asynccontextmanager + async def separate_stems( + self, + *, + file: core.File, + output_format: typing.Optional[MusicSeparateStemsRequestOutputFormat] = None, + stem_variation_id: typing.Optional[MusicSeparateStemsRequestStemVariationId] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Separate a music file into individual stems + + Parameters + ---------- + file : core.File + See core.File for more documentation + + output_format : typing.Optional[MusicSeparateStemsRequestOutputFormat] + Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + + stem_variation_id : typing.Optional[MusicSeparateStemsRequestStemVariationId] + The id of the stem variation to use. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Returns + ------- + typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + ZIP archive containing separated audio stems. Each stem is provided as a separate audio file in the requested output format. + """ + async with self._client_wrapper.httpx_client.stream( + "v1/music/stem-separation", + method="POST", + params={ + "output_format": output_format, + }, + data={ + "stem_variation_id": stem_variation_id, + }, + files={ + "file": file, + }, + request_options=request_options, + omit=OMIT, + force_multipart=True, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", 1024) if request_options is not None else 1024 + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() diff --git a/src/elevenlabs/music/types/__init__.py b/src/elevenlabs/music/types/__init__.py index a57bb95e..04990e7f 100644 --- a/src/elevenlabs/music/types/__init__.py +++ b/src/elevenlabs/music/types/__init__.py @@ -8,10 +8,14 @@ if typing.TYPE_CHECKING: from .music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat from .music_compose_request_output_format import MusicComposeRequestOutputFormat + from .music_separate_stems_request_output_format import MusicSeparateStemsRequestOutputFormat + from .music_separate_stems_request_stem_variation_id import MusicSeparateStemsRequestStemVariationId from .music_stream_request_output_format import MusicStreamRequestOutputFormat _dynamic_imports: typing.Dict[str, str] = { "MusicComposeDetailedRequestOutputFormat": ".music_compose_detailed_request_output_format", "MusicComposeRequestOutputFormat": ".music_compose_request_output_format", + "MusicSeparateStemsRequestOutputFormat": ".music_separate_stems_request_output_format", + "MusicSeparateStemsRequestStemVariationId": ".music_separate_stems_request_stem_variation_id", "MusicStreamRequestOutputFormat": ".music_stream_request_output_format", } @@ -40,5 +44,7 @@ def __dir__(): __all__ = [ "MusicComposeDetailedRequestOutputFormat", "MusicComposeRequestOutputFormat", + "MusicSeparateStemsRequestOutputFormat", + "MusicSeparateStemsRequestStemVariationId", "MusicStreamRequestOutputFormat", ] diff --git a/src/elevenlabs/music/types/music_separate_stems_request_output_format.py b/src/elevenlabs/music/types/music_separate_stems_request_output_format.py new file mode 100644 index 00000000..4fcb4edc --- /dev/null +++ b/src/elevenlabs/music/types/music_separate_stems_request_output_format.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MusicSeparateStemsRequestOutputFormat = typing.Union[ + typing.Literal[ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192", + ], + typing.Any, +] diff --git a/src/elevenlabs/music/types/music_separate_stems_request_stem_variation_id.py b/src/elevenlabs/music/types/music_separate_stems_request_stem_variation_id.py new file mode 100644 index 00000000..33fdb8d3 --- /dev/null +++ b/src/elevenlabs/music/types/music_separate_stems_request_stem_variation_id.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MusicSeparateStemsRequestStemVariationId = typing.Union[typing.Literal["two_stems_v1", "six_stems_v1"], typing.Any] diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 0fc859b3..81714956 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -66,6 +66,16 @@ from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput from .alignment import Alignment from .allowlist_item import AllowlistItem + from .api_integration_webhook_overrides_input import ApiIntegrationWebhookOverridesInput + from .api_integration_webhook_overrides_input_request_headers_value import ( + ApiIntegrationWebhookOverridesInputRequestHeadersValue, + ) + from .api_integration_webhook_overrides_output import ApiIntegrationWebhookOverridesOutput + from .api_integration_webhook_overrides_output_request_headers_value import ( + ApiIntegrationWebhookOverridesOutputRequestHeadersValue, + ) + from .api_integration_webhook_tool_config_input import ApiIntegrationWebhookToolConfigInput + from .api_integration_webhook_tool_config_output import ApiIntegrationWebhookToolConfigOutput from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput from .array_json_schema_property_input_items import ArrayJsonSchemaPropertyInputItems from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput @@ -1023,6 +1033,8 @@ from .literal_json_schema_property import LiteralJsonSchemaProperty from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType + from .literal_override import LiteralOverride + from .literal_override_constant_value import LiteralOverrideConstantValue from .livekit_stack_type import LivekitStackType from .llm import Llm from .llm_category_usage import LlmCategoryUsage @@ -1057,6 +1069,7 @@ from .mcp_servers_response_model import McpServersResponseModel from .mcp_tool_approval_hash import McpToolApprovalHash from .mcp_tool_approval_policy import McpToolApprovalPolicy + from .mcp_tool_config_override import McpToolConfigOverride from .metric_record import MetricRecord from .metric_type import MetricType from .model import Model @@ -1073,6 +1086,10 @@ from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue + from .object_override_input import ObjectOverrideInput + from .object_override_input_properties_value import ObjectOverrideInputPropertiesValue + from .object_override_output import ObjectOverrideOutput + from .object_override_output_properties_value import ObjectOverrideOutputPropertiesValue from .orb_avatar import OrbAvatar from .outbound_call_recipient import OutboundCallRecipient from .outbound_call_recipient_response_model import OutboundCallRecipientResponseModel @@ -1081,14 +1098,20 @@ from .pdf_export_options import PdfExportOptions from .pending_cancellation_response_model import PendingCancellationResponseModel from .pending_subscription_switch_response_model import PendingSubscriptionSwitchResponseModel + from .pending_subscription_switch_response_model_next_billing_period import ( + PendingSubscriptionSwitchResponseModelNextBillingPeriod, + ) from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier from .phone_number_agent_info import PhoneNumberAgentInfo + from .phone_number_dynamic_variable_transfer_destination import PhoneNumberDynamicVariableTransferDestination from .phone_number_transfer import PhoneNumberTransfer from .phone_number_transfer_destination import PhoneNumberTransferDestination from .phone_number_transfer_transfer_destination import ( PhoneNumberTransferTransferDestination, PhoneNumberTransferTransferDestination_Phone, + PhoneNumberTransferTransferDestination_PhoneDynamicVariable, PhoneNumberTransferTransferDestination_SipUri, + PhoneNumberTransferTransferDestination_SipUriDynamicVariable, ) from .play_dtmf_result_error_model import PlayDtmfResultErrorModel from .play_dtmf_result_success_model import PlayDtmfResultSuccessModel @@ -1138,6 +1161,7 @@ ) from .prompt_agent_api_model_input_tools_item import ( PromptAgentApiModelInputToolsItem, + PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelInputToolsItem_Client, PromptAgentApiModelInputToolsItem_Mcp, PromptAgentApiModelInputToolsItem_System, @@ -1152,6 +1176,7 @@ ) from .prompt_agent_api_model_output_tools_item import ( PromptAgentApiModelOutputToolsItem, + PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelOutputToolsItem_Client, PromptAgentApiModelOutputToolsItem_Mcp, PromptAgentApiModelOutputToolsItem_System, @@ -1165,6 +1190,7 @@ ) from .prompt_agent_api_model_workflow_override_input_tools_item import ( PromptAgentApiModelWorkflowOverrideInputToolsItem, + PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideInputToolsItem_System, @@ -1176,6 +1202,7 @@ ) from .prompt_agent_api_model_workflow_override_output_tools_item import ( PromptAgentApiModelWorkflowOverrideOutputToolsItem, + PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, @@ -1194,6 +1221,7 @@ PronunciationDictionaryVersionResponseModelPermissionOnResource, ) from .pydantic_pronunciation_dictionary_version_locator import PydanticPronunciationDictionaryVersionLocator + from .query_override import QueryOverride from .query_params_json_schema import QueryParamsJsonSchema from .rag_chunk_metadata import RagChunkMetadata from .rag_config import RagConfig @@ -1254,6 +1282,7 @@ from .sip_trunk_credentials_request_model import SipTrunkCredentialsRequestModel from .sip_trunk_outbound_call_response import SipTrunkOutboundCallResponse from .sip_trunk_transport_enum import SipTrunkTransportEnum + from .sip_uri_dynamic_variable_transfer_destination import SipUriDynamicVariableTransferDestination from .sip_uri_transfer_destination import SipUriTransferDestination from .skip_turn_tool_config import SkipTurnToolConfig from .skip_turn_tool_response_model import SkipTurnToolResponseModel @@ -1340,6 +1369,7 @@ from .tool_request_model import ToolRequestModel from .tool_request_model_tool_config import ( ToolRequestModelToolConfig, + ToolRequestModelToolConfig_ApiIntegrationWebhook, ToolRequestModelToolConfig_Client, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook, @@ -1347,6 +1377,7 @@ from .tool_response_model import ToolResponseModel from .tool_response_model_tool_config import ( ToolResponseModelToolConfig, + ToolResponseModelToolConfig_ApiIntegrationWebhook, ToolResponseModelToolConfig_Client, ToolResponseModelToolConfig_Mcp, ToolResponseModelToolConfig_System, @@ -1555,13 +1586,17 @@ from .workflow_phone_number_node_model_input_transfer_destination import ( WorkflowPhoneNumberNodeModelInputTransferDestination, WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable, ) from .workflow_phone_number_node_model_output import WorkflowPhoneNumberNodeModelOutput from .workflow_phone_number_node_model_output_transfer_destination import ( WorkflowPhoneNumberNodeModelOutputTransferDestination, WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable, ) from .workflow_result_condition_model_input import WorkflowResultConditionModelInput from .workflow_result_condition_model_output import WorkflowResultConditionModelOutput @@ -1666,6 +1701,12 @@ "AgentWorkspaceOverridesOutput": ".agent_workspace_overrides_output", "Alignment": ".alignment", "AllowlistItem": ".allowlist_item", + "ApiIntegrationWebhookOverridesInput": ".api_integration_webhook_overrides_input", + "ApiIntegrationWebhookOverridesInputRequestHeadersValue": ".api_integration_webhook_overrides_input_request_headers_value", + "ApiIntegrationWebhookOverridesOutput": ".api_integration_webhook_overrides_output", + "ApiIntegrationWebhookOverridesOutputRequestHeadersValue": ".api_integration_webhook_overrides_output_request_headers_value", + "ApiIntegrationWebhookToolConfigInput": ".api_integration_webhook_tool_config_input", + "ApiIntegrationWebhookToolConfigOutput": ".api_integration_webhook_tool_config_output", "ArrayJsonSchemaPropertyInput": ".array_json_schema_property_input", "ArrayJsonSchemaPropertyInputItems": ".array_json_schema_property_input_items", "ArrayJsonSchemaPropertyOutput": ".array_json_schema_property_output", @@ -2471,6 +2512,8 @@ "LiteralJsonSchemaProperty": ".literal_json_schema_property", "LiteralJsonSchemaPropertyConstantValue": ".literal_json_schema_property_constant_value", "LiteralJsonSchemaPropertyType": ".literal_json_schema_property_type", + "LiteralOverride": ".literal_override", + "LiteralOverrideConstantValue": ".literal_override_constant_value", "LivekitStackType": ".livekit_stack_type", "Llm": ".llm", "LlmCategoryUsage": ".llm_category_usage", @@ -2503,6 +2546,7 @@ "McpServersResponseModel": ".mcp_servers_response_model", "McpToolApprovalHash": ".mcp_tool_approval_hash", "McpToolApprovalPolicy": ".mcp_tool_approval_policy", + "McpToolConfigOverride": ".mcp_tool_config_override", "MetricRecord": ".metric_record", "MetricType": ".metric_type", "Model": ".model", @@ -2519,6 +2563,10 @@ "ObjectJsonSchemaPropertyInputPropertiesValue": ".object_json_schema_property_input_properties_value", "ObjectJsonSchemaPropertyOutput": ".object_json_schema_property_output", "ObjectJsonSchemaPropertyOutputPropertiesValue": ".object_json_schema_property_output_properties_value", + "ObjectOverrideInput": ".object_override_input", + "ObjectOverrideInputPropertiesValue": ".object_override_input_properties_value", + "ObjectOverrideOutput": ".object_override_output", + "ObjectOverrideOutputPropertiesValue": ".object_override_output_properties_value", "OrbAvatar": ".orb_avatar", "OutboundCallRecipient": ".outbound_call_recipient", "OutboundCallRecipientResponseModel": ".outbound_call_recipient_response_model", @@ -2527,13 +2575,17 @@ "PdfExportOptions": ".pdf_export_options", "PendingCancellationResponseModel": ".pending_cancellation_response_model", "PendingSubscriptionSwitchResponseModel": ".pending_subscription_switch_response_model", + "PendingSubscriptionSwitchResponseModelNextBillingPeriod": ".pending_subscription_switch_response_model_next_billing_period", "PendingSubscriptionSwitchResponseModelNextTier": ".pending_subscription_switch_response_model_next_tier", "PhoneNumberAgentInfo": ".phone_number_agent_info", + "PhoneNumberDynamicVariableTransferDestination": ".phone_number_dynamic_variable_transfer_destination", "PhoneNumberTransfer": ".phone_number_transfer", "PhoneNumberTransferDestination": ".phone_number_transfer_destination", "PhoneNumberTransferTransferDestination": ".phone_number_transfer_transfer_destination", "PhoneNumberTransferTransferDestination_Phone": ".phone_number_transfer_transfer_destination", + "PhoneNumberTransferTransferDestination_PhoneDynamicVariable": ".phone_number_transfer_transfer_destination", "PhoneNumberTransferTransferDestination_SipUri": ".phone_number_transfer_transfer_destination", + "PhoneNumberTransferTransferDestination_SipUriDynamicVariable": ".phone_number_transfer_transfer_destination", "PlayDtmfResultErrorModel": ".play_dtmf_result_error_model", "PlayDtmfResultSuccessModel": ".play_dtmf_result_success_model", "PlayDtmfToolConfig": ".play_dtmf_tool_config", @@ -2577,6 +2629,7 @@ "PromptAgentApiModelInputBackupLlmConfig_Disabled": ".prompt_agent_api_model_input_backup_llm_config", "PromptAgentApiModelInputBackupLlmConfig_Override": ".prompt_agent_api_model_input_backup_llm_config", "PromptAgentApiModelInputToolsItem": ".prompt_agent_api_model_input_tools_item", + "PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_Client": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_Mcp": ".prompt_agent_api_model_input_tools_item", "PromptAgentApiModelInputToolsItem_System": ".prompt_agent_api_model_input_tools_item", @@ -2587,6 +2640,7 @@ "PromptAgentApiModelOutputBackupLlmConfig_Disabled": ".prompt_agent_api_model_output_backup_llm_config", "PromptAgentApiModelOutputBackupLlmConfig_Override": ".prompt_agent_api_model_output_backup_llm_config", "PromptAgentApiModelOutputToolsItem": ".prompt_agent_api_model_output_tools_item", + "PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOutputToolsItem_Client": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOutputToolsItem_Mcp": ".prompt_agent_api_model_output_tools_item", "PromptAgentApiModelOutputToolsItem_System": ".prompt_agent_api_model_output_tools_item", @@ -2596,6 +2650,7 @@ "PromptAgentApiModelWorkflowOverrideInput": ".prompt_agent_api_model_workflow_override_input", "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig": ".prompt_agent_api_model_workflow_override_input_backup_llm_config", "PromptAgentApiModelWorkflowOverrideInputToolsItem": ".prompt_agent_api_model_workflow_override_input_tools_item", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook": ".prompt_agent_api_model_workflow_override_input_tools_item", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client": ".prompt_agent_api_model_workflow_override_input_tools_item", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_input_tools_item", "PromptAgentApiModelWorkflowOverrideInputToolsItem_System": ".prompt_agent_api_model_workflow_override_input_tools_item", @@ -2603,6 +2658,7 @@ "PromptAgentApiModelWorkflowOverrideOutput": ".prompt_agent_api_model_workflow_override_output", "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig": ".prompt_agent_api_model_workflow_override_output_backup_llm_config", "PromptAgentApiModelWorkflowOverrideOutputToolsItem": ".prompt_agent_api_model_workflow_override_output_tools_item", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook": ".prompt_agent_api_model_workflow_override_output_tools_item", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client": ".prompt_agent_api_model_workflow_override_output_tools_item", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp": ".prompt_agent_api_model_workflow_override_output_tools_item", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System": ".prompt_agent_api_model_workflow_override_output_tools_item", @@ -2618,6 +2674,7 @@ "PronunciationDictionaryVersionResponseModel": ".pronunciation_dictionary_version_response_model", "PronunciationDictionaryVersionResponseModelPermissionOnResource": ".pronunciation_dictionary_version_response_model_permission_on_resource", "PydanticPronunciationDictionaryVersionLocator": ".pydantic_pronunciation_dictionary_version_locator", + "QueryOverride": ".query_override", "QueryParamsJsonSchema": ".query_params_json_schema", "RagChunkMetadata": ".rag_chunk_metadata", "RagConfig": ".rag_config", @@ -2676,6 +2733,7 @@ "SipTrunkCredentialsRequestModel": ".sip_trunk_credentials_request_model", "SipTrunkOutboundCallResponse": ".sip_trunk_outbound_call_response", "SipTrunkTransportEnum": ".sip_trunk_transport_enum", + "SipUriDynamicVariableTransferDestination": ".sip_uri_dynamic_variable_transfer_destination", "SipUriTransferDestination": ".sip_uri_transfer_destination", "SkipTurnToolConfig": ".skip_turn_tool_config", "SkipTurnToolResponseModel": ".skip_turn_tool_response_model", @@ -2755,11 +2813,13 @@ "ToolMockConfig": ".tool_mock_config", "ToolRequestModel": ".tool_request_model", "ToolRequestModelToolConfig": ".tool_request_model_tool_config", + "ToolRequestModelToolConfig_ApiIntegrationWebhook": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_Client": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_System": ".tool_request_model_tool_config", "ToolRequestModelToolConfig_Webhook": ".tool_request_model_tool_config", "ToolResponseModel": ".tool_response_model", "ToolResponseModelToolConfig": ".tool_response_model_tool_config", + "ToolResponseModelToolConfig_ApiIntegrationWebhook": ".tool_response_model_tool_config", "ToolResponseModelToolConfig_Client": ".tool_response_model_tool_config", "ToolResponseModelToolConfig_Mcp": ".tool_response_model_tool_config", "ToolResponseModelToolConfig_System": ".tool_response_model_tool_config", @@ -2942,11 +3002,15 @@ "WorkflowPhoneNumberNodeModelInput": ".workflow_phone_number_node_model_input", "WorkflowPhoneNumberNodeModelInputTransferDestination": ".workflow_phone_number_node_model_input_transfer_destination", "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone": ".workflow_phone_number_node_model_input_transfer_destination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable": ".workflow_phone_number_node_model_input_transfer_destination", "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri": ".workflow_phone_number_node_model_input_transfer_destination", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable": ".workflow_phone_number_node_model_input_transfer_destination", "WorkflowPhoneNumberNodeModelOutput": ".workflow_phone_number_node_model_output", "WorkflowPhoneNumberNodeModelOutputTransferDestination": ".workflow_phone_number_node_model_output_transfer_destination", "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone": ".workflow_phone_number_node_model_output_transfer_destination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable": ".workflow_phone_number_node_model_output_transfer_destination", "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri": ".workflow_phone_number_node_model_output_transfer_destination", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable": ".workflow_phone_number_node_model_output_transfer_destination", "WorkflowResultConditionModelInput": ".workflow_result_condition_model_input", "WorkflowResultConditionModelOutput": ".workflow_result_condition_model_output", "WorkflowStandaloneAgentNodeModelInput": ".workflow_standalone_agent_node_model_input", @@ -3066,6 +3130,12 @@ def __dir__(): "AgentWorkspaceOverridesOutput", "Alignment", "AllowlistItem", + "ApiIntegrationWebhookOverridesInput", + "ApiIntegrationWebhookOverridesInputRequestHeadersValue", + "ApiIntegrationWebhookOverridesOutput", + "ApiIntegrationWebhookOverridesOutputRequestHeadersValue", + "ApiIntegrationWebhookToolConfigInput", + "ApiIntegrationWebhookToolConfigOutput", "ArrayJsonSchemaPropertyInput", "ArrayJsonSchemaPropertyInputItems", "ArrayJsonSchemaPropertyOutput", @@ -3871,6 +3941,8 @@ def __dir__(): "LiteralJsonSchemaProperty", "LiteralJsonSchemaPropertyConstantValue", "LiteralJsonSchemaPropertyType", + "LiteralOverride", + "LiteralOverrideConstantValue", "LivekitStackType", "Llm", "LlmCategoryUsage", @@ -3903,6 +3975,7 @@ def __dir__(): "McpServersResponseModel", "McpToolApprovalHash", "McpToolApprovalPolicy", + "McpToolConfigOverride", "MetricRecord", "MetricType", "Model", @@ -3919,6 +3992,10 @@ def __dir__(): "ObjectJsonSchemaPropertyInputPropertiesValue", "ObjectJsonSchemaPropertyOutput", "ObjectJsonSchemaPropertyOutputPropertiesValue", + "ObjectOverrideInput", + "ObjectOverrideInputPropertiesValue", + "ObjectOverrideOutput", + "ObjectOverrideOutputPropertiesValue", "OrbAvatar", "OutboundCallRecipient", "OutboundCallRecipientResponseModel", @@ -3927,13 +4004,17 @@ def __dir__(): "PdfExportOptions", "PendingCancellationResponseModel", "PendingSubscriptionSwitchResponseModel", + "PendingSubscriptionSwitchResponseModelNextBillingPeriod", "PendingSubscriptionSwitchResponseModelNextTier", "PhoneNumberAgentInfo", + "PhoneNumberDynamicVariableTransferDestination", "PhoneNumberTransfer", "PhoneNumberTransferDestination", "PhoneNumberTransferTransferDestination", "PhoneNumberTransferTransferDestination_Phone", + "PhoneNumberTransferTransferDestination_PhoneDynamicVariable", "PhoneNumberTransferTransferDestination_SipUri", + "PhoneNumberTransferTransferDestination_SipUriDynamicVariable", "PlayDtmfResultErrorModel", "PlayDtmfResultSuccessModel", "PlayDtmfToolConfig", @@ -3977,6 +4058,7 @@ def __dir__(): "PromptAgentApiModelInputBackupLlmConfig_Disabled", "PromptAgentApiModelInputBackupLlmConfig_Override", "PromptAgentApiModelInputToolsItem", + "PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelInputToolsItem_Client", "PromptAgentApiModelInputToolsItem_Mcp", "PromptAgentApiModelInputToolsItem_System", @@ -3987,6 +4069,7 @@ def __dir__(): "PromptAgentApiModelOutputBackupLlmConfig_Disabled", "PromptAgentApiModelOutputBackupLlmConfig_Override", "PromptAgentApiModelOutputToolsItem", + "PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelOutputToolsItem_Client", "PromptAgentApiModelOutputToolsItem_Mcp", "PromptAgentApiModelOutputToolsItem_System", @@ -3996,6 +4079,7 @@ def __dir__(): "PromptAgentApiModelWorkflowOverrideInput", "PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig", "PromptAgentApiModelWorkflowOverrideInputToolsItem", + "PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Client", "PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp", "PromptAgentApiModelWorkflowOverrideInputToolsItem_System", @@ -4003,6 +4087,7 @@ def __dir__(): "PromptAgentApiModelWorkflowOverrideOutput", "PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig", "PromptAgentApiModelWorkflowOverrideOutputToolsItem", + "PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp", "PromptAgentApiModelWorkflowOverrideOutputToolsItem_System", @@ -4018,6 +4103,7 @@ def __dir__(): "PronunciationDictionaryVersionResponseModel", "PronunciationDictionaryVersionResponseModelPermissionOnResource", "PydanticPronunciationDictionaryVersionLocator", + "QueryOverride", "QueryParamsJsonSchema", "RagChunkMetadata", "RagConfig", @@ -4076,6 +4162,7 @@ def __dir__(): "SipTrunkCredentialsRequestModel", "SipTrunkOutboundCallResponse", "SipTrunkTransportEnum", + "SipUriDynamicVariableTransferDestination", "SipUriTransferDestination", "SkipTurnToolConfig", "SkipTurnToolResponseModel", @@ -4155,11 +4242,13 @@ def __dir__(): "ToolMockConfig", "ToolRequestModel", "ToolRequestModelToolConfig", + "ToolRequestModelToolConfig_ApiIntegrationWebhook", "ToolRequestModelToolConfig_Client", "ToolRequestModelToolConfig_System", "ToolRequestModelToolConfig_Webhook", "ToolResponseModel", "ToolResponseModelToolConfig", + "ToolResponseModelToolConfig_ApiIntegrationWebhook", "ToolResponseModelToolConfig_Client", "ToolResponseModelToolConfig_Mcp", "ToolResponseModelToolConfig_System", @@ -4342,11 +4431,15 @@ def __dir__(): "WorkflowPhoneNumberNodeModelInput", "WorkflowPhoneNumberNodeModelInputTransferDestination", "WorkflowPhoneNumberNodeModelInputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable", "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable", "WorkflowPhoneNumberNodeModelOutput", "WorkflowPhoneNumberNodeModelOutputTransferDestination", "WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable", "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri", + "WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable", "WorkflowResultConditionModelInput", "WorkflowResultConditionModelOutput", "WorkflowStandaloneAgentNodeModelInput", diff --git a/src/elevenlabs/types/api_integration_webhook_overrides_input.py b/src/elevenlabs/types/api_integration_webhook_overrides_input.py new file mode 100644 index 00000000..5df0a955 --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_overrides_input.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .api_integration_webhook_overrides_input_request_headers_value import ( + ApiIntegrationWebhookOverridesInputRequestHeadersValue, +) +from .literal_override import LiteralOverride +from .query_override import QueryOverride + + +class ApiIntegrationWebhookOverridesInput(UncheckedBaseModel): + """ + A whitelist of fields that can be overridden by users when + configuring an API Integration Webhook Tool. + """ + + path_params_schema: typing.Optional[typing.Dict[str, typing.Optional[LiteralOverride]]] = None + query_params_schema: typing.Optional[QueryOverride] = None + request_body_schema: typing.Optional["ObjectOverrideInput"] = None + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[ApiIntegrationWebhookOverridesInputRequestHeadersValue]] + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .object_override_input import ObjectOverrideInput # noqa: E402, I001 + +update_forward_refs(ApiIntegrationWebhookOverridesInput) diff --git a/src/elevenlabs/types/api_integration_webhook_overrides_input_request_headers_value.py b/src/elevenlabs/types/api_integration_webhook_overrides_input_request_headers_value.py new file mode 100644 index 00000000..0965e3bf --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_overrides_input_request_headers_value.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .conv_ai_dynamic_variable import ConvAiDynamicVariable + +ApiIntegrationWebhookOverridesInputRequestHeadersValue = typing.Union[str, ConvAiDynamicVariable] diff --git a/src/elevenlabs/types/api_integration_webhook_overrides_output.py b/src/elevenlabs/types/api_integration_webhook_overrides_output.py new file mode 100644 index 00000000..77c7c2c1 --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_overrides_output.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .api_integration_webhook_overrides_output_request_headers_value import ( + ApiIntegrationWebhookOverridesOutputRequestHeadersValue, +) +from .literal_override import LiteralOverride +from .query_override import QueryOverride + + +class ApiIntegrationWebhookOverridesOutput(UncheckedBaseModel): + """ + A whitelist of fields that can be overridden by users when + configuring an API Integration Webhook Tool. + """ + + path_params_schema: typing.Optional[typing.Dict[str, typing.Optional[LiteralOverride]]] = None + query_params_schema: typing.Optional[QueryOverride] = None + request_body_schema: typing.Optional["ObjectOverrideOutput"] = None + request_headers: typing.Optional[ + typing.Dict[str, typing.Optional[ApiIntegrationWebhookOverridesOutputRequestHeadersValue]] + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .object_override_output import ObjectOverrideOutput # noqa: E402, I001 + +update_forward_refs(ApiIntegrationWebhookOverridesOutput) diff --git a/src/elevenlabs/types/api_integration_webhook_overrides_output_request_headers_value.py b/src/elevenlabs/types/api_integration_webhook_overrides_output_request_headers_value.py new file mode 100644 index 00000000..5af88741 --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_overrides_output_request_headers_value.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .conv_ai_dynamic_variable import ConvAiDynamicVariable + +ApiIntegrationWebhookOverridesOutputRequestHeadersValue = typing.Union[str, ConvAiDynamicVariable] diff --git a/src/elevenlabs/types/api_integration_webhook_tool_config_input.py b/src/elevenlabs/types/api_integration_webhook_tool_config_input.py new file mode 100644 index 00000000..2a2401fd --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_tool_config_input.py @@ -0,0 +1,87 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .api_integration_webhook_overrides_input import ApiIntegrationWebhookOverridesInput +from .dynamic_variable_assignment import DynamicVariableAssignment +from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType +from .tool_execution_mode import ToolExecutionMode + + +class ApiIntegrationWebhookToolConfigInput(UncheckedBaseModel): + name: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) + """ + The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). + """ + + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + + dynamic_variables: typing.Optional[DynamicVariablesConfig] = pydantic.Field(default=None) + """ + Configuration for dynamic variables + """ + + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + + tool_version: typing.Optional[str] = pydantic.Field(default=None) + """ + The version of the API integration tool + """ + + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesInput] = pydantic.Field(default=None) + """ + User overrides applied on top of the base api_schema + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ApiIntegrationWebhookToolConfigInput) diff --git a/src/elevenlabs/types/api_integration_webhook_tool_config_output.py b/src/elevenlabs/types/api_integration_webhook_tool_config_output.py new file mode 100644 index 00000000..723f829d --- /dev/null +++ b/src/elevenlabs/types/api_integration_webhook_tool_config_output.py @@ -0,0 +1,87 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .api_integration_webhook_overrides_output import ApiIntegrationWebhookOverridesOutput +from .dynamic_variable_assignment import DynamicVariableAssignment +from .dynamic_variables_config import DynamicVariablesConfig +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType +from .tool_execution_mode import ToolExecutionMode + + +class ApiIntegrationWebhookToolConfigOutput(UncheckedBaseModel): + name: str + description: str = pydantic.Field() + """ + Description of when the tool should be used and what it does. + """ + + response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) + """ + The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive). + """ + + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the user will not be able to interrupt the agent while this tool is running. + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the agent will speak before the tool call. + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Configuration for extracting values from tool responses and assigning them to dynamic variables + """ + + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played. + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. + """ + + dynamic_variables: typing.Optional[DynamicVariablesConfig] = pydantic.Field(default=None) + """ + Configuration for dynamic variables + """ + + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + + tool_version: typing.Optional[str] = pydantic.Field(default=None) + """ + The version of the API integration tool + """ + + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesOutput] = pydantic.Field(default=None) + """ + User overrides applied on top of the base api_schema + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ApiIntegrationWebhookToolConfigOutput) diff --git a/src/elevenlabs/types/batch_call_detailed_response.py b/src/elevenlabs/types/batch_call_detailed_response.py index f6849313..51e42bb6 100644 --- a/src/elevenlabs/types/batch_call_detailed_response.py +++ b/src/elevenlabs/types/batch_call_detailed_response.py @@ -16,8 +16,9 @@ class BatchCallDetailedResponse(UncheckedBaseModel): """ id: str - phone_number_id: str + phone_number_id: typing.Optional[str] = None phone_provider: typing.Optional[TelephonyProvider] = None + whatsapp_business_account_id: typing.Optional[str] = None name: str agent_id: str created_at_unix: int diff --git a/src/elevenlabs/types/batch_call_response.py b/src/elevenlabs/types/batch_call_response.py index e29afc03..0f60ed6c 100644 --- a/src/elevenlabs/types/batch_call_response.py +++ b/src/elevenlabs/types/batch_call_response.py @@ -11,8 +11,9 @@ class BatchCallResponse(UncheckedBaseModel): id: str - phone_number_id: str + phone_number_id: typing.Optional[str] = None phone_provider: typing.Optional[TelephonyProvider] = None + whatsapp_business_account_id: typing.Optional[str] = None name: str agent_id: str created_at_unix: int diff --git a/src/elevenlabs/types/invoice_response.py b/src/elevenlabs/types/invoice_response.py index 8a57cea9..0e9f27f3 100644 --- a/src/elevenlabs/types/invoice_response.py +++ b/src/elevenlabs/types/invoice_response.py @@ -14,6 +14,16 @@ class InvoiceResponse(UncheckedBaseModel): The amount due in cents. """ + subtotal_cents: typing.Optional[int] = pydantic.Field(default=None) + """ + The subtotal amount in cents before tax (exclusive of tax and discounts). + """ + + tax_cents: typing.Optional[int] = pydantic.Field(default=None) + """ + The tax amount in cents. + """ + discount_percent_off: typing.Optional[float] = pydantic.Field(default=None) """ The discount applied to the invoice. E.g. [20.0f] for 20% off. diff --git a/src/elevenlabs/types/literal_json_schema_property.py b/src/elevenlabs/types/literal_json_schema_property.py index f62e68cf..60e10fa8 100644 --- a/src/elevenlabs/types/literal_json_schema_property.py +++ b/src/elevenlabs/types/literal_json_schema_property.py @@ -21,6 +21,11 @@ class LiteralJsonSchemaProperty(UncheckedBaseModel): List of allowed string values for string type parameters """ + is_system_provided: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, the value will be populated by the system at runtime. Used by Api Integration Webhook tools for templating. + """ + dynamic_variable: typing.Optional[str] = pydantic.Field(default=None) """ The dynamic variable of the property diff --git a/src/elevenlabs/types/literal_override.py b/src/elevenlabs/types/literal_override.py new file mode 100644 index 00000000..8bf3279a --- /dev/null +++ b/src/elevenlabs/types/literal_override.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .literal_override_constant_value import LiteralOverrideConstantValue + + +class LiteralOverride(UncheckedBaseModel): + description: typing.Optional[str] = None + dynamic_variable: typing.Optional[str] = None + constant_value: typing.Optional[LiteralOverrideConstantValue] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/literal_override_constant_value.py b/src/elevenlabs/types/literal_override_constant_value.py new file mode 100644 index 00000000..2bff1e1b --- /dev/null +++ b/src/elevenlabs/types/literal_override_constant_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LiteralOverrideConstantValue = typing.Union[str, int, float, bool] diff --git a/src/elevenlabs/types/mcp_server_config_input.py b/src/elevenlabs/types/mcp_server_config_input.py index 6d78f36a..65a8d3af 100644 --- a/src/elevenlabs/types/mcp_server_config_input.py +++ b/src/elevenlabs/types/mcp_server_config_input.py @@ -11,6 +11,9 @@ from .mcp_server_config_input_url import McpServerConfigInputUrl from .mcp_server_transport import McpServerTransport from .mcp_tool_approval_hash import McpToolApprovalHash +from .mcp_tool_config_override import McpToolConfigOverride +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode @@ -52,12 +55,27 @@ class McpServerConfigInput(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) """ - If true, the user will not be able to interrupt the agent while tools from this MCP server are running + If true, the user will not be able to interrupt the agent while any tool from this MCP server is running. + """ + + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution for all tools from this MCP server + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play for all tools from this MCP server """ execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) """ - Determines when and how tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + Determines when and how all tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + + tool_config_overrides: typing.Optional[typing.List[McpToolConfigOverride]] = pydantic.Field(default=None) + """ + List of per-tool configuration overrides that override the server-level defaults for specific tools """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/mcp_server_config_output.py b/src/elevenlabs/types/mcp_server_config_output.py index 79f78cb2..2df67115 100644 --- a/src/elevenlabs/types/mcp_server_config_output.py +++ b/src/elevenlabs/types/mcp_server_config_output.py @@ -11,6 +11,9 @@ from .mcp_server_config_output_url import McpServerConfigOutputUrl from .mcp_server_transport import McpServerTransport from .mcp_tool_approval_hash import McpToolApprovalHash +from .mcp_tool_config_override import McpToolConfigOverride +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType from .tool_execution_mode import ToolExecutionMode @@ -52,12 +55,27 @@ class McpServerConfigOutput(UncheckedBaseModel): disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) """ - If true, the user will not be able to interrupt the agent while tools from this MCP server are running + If true, the user will not be able to interrupt the agent while any tool from this MCP server is running. + """ + + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + Predefined tool call sound type to play during tool execution for all tools from this MCP server + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + Determines when the tool call sound should play for all tools from this MCP server """ execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) """ - Determines when and how tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + Determines when and how all tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. + """ + + tool_config_overrides: typing.Optional[typing.List[McpToolConfigOverride]] = pydantic.Field(default=None) + """ + List of per-tool configuration overrides that override the server-level defaults for specific tools """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/mcp_tool_config_override.py b/src/elevenlabs/types/mcp_tool_config_override.py new file mode 100644 index 00000000..b7ce05a1 --- /dev/null +++ b/src/elevenlabs/types/mcp_tool_config_override.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .dynamic_variable_assignment import DynamicVariableAssignment +from .tool_call_sound_behavior import ToolCallSoundBehavior +from .tool_call_sound_type import ToolCallSoundType +from .tool_execution_mode import ToolExecutionMode + + +class McpToolConfigOverride(UncheckedBaseModel): + tool_name: str = pydantic.Field() + """ + The name of the MCP tool + """ + + force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None) + """ + If set, overrides the server's force_pre_tool_speech setting for this tool + """ + + disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None) + """ + If set, overrides the server's disable_interruptions setting for this tool + """ + + tool_call_sound: typing.Optional[ToolCallSoundType] = pydantic.Field(default=None) + """ + If set, overrides the server's tool_call_sound setting for this tool + """ + + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None) + """ + If set, overrides the server's tool_call_sound_behavior setting for this tool + """ + + execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None) + """ + If set, overrides the server's execution_mode setting for this tool + """ + + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None) + """ + Dynamic variable assignments for this MCP tool + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/object_override_input.py b/src/elevenlabs/types/object_override_input.py new file mode 100644 index 00000000..7ea9ebdd --- /dev/null +++ b/src/elevenlabs/types/object_override_input.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ObjectOverrideInput(UncheckedBaseModel): + description: typing.Optional[str] = None + properties: typing.Optional[typing.Dict[str, typing.Optional["ObjectOverrideInputPropertiesValue"]]] = None + required: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .object_override_input_properties_value import ObjectOverrideInputPropertiesValue # noqa: E402, I001 + +update_forward_refs(ObjectOverrideInput) diff --git a/src/elevenlabs/types/object_override_input_properties_value.py b/src/elevenlabs/types/object_override_input_properties_value.py new file mode 100644 index 00000000..aea3b4d9 --- /dev/null +++ b/src/elevenlabs/types/object_override_input_properties_value.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .literal_override import LiteralOverride + +if typing.TYPE_CHECKING: + from .object_override_input import ObjectOverrideInput +ObjectOverrideInputPropertiesValue = typing.Union[LiteralOverride, "ObjectOverrideInput"] diff --git a/src/elevenlabs/types/object_override_output.py b/src/elevenlabs/types/object_override_output.py new file mode 100644 index 00000000..9e7d1cd6 --- /dev/null +++ b/src/elevenlabs/types/object_override_output.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ObjectOverrideOutput(UncheckedBaseModel): + description: typing.Optional[str] = None + properties: typing.Optional[typing.Dict[str, typing.Optional["ObjectOverrideOutputPropertiesValue"]]] = None + required: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .object_override_output_properties_value import ObjectOverrideOutputPropertiesValue # noqa: E402, I001 + +update_forward_refs(ObjectOverrideOutput) diff --git a/src/elevenlabs/types/object_override_output_properties_value.py b/src/elevenlabs/types/object_override_output_properties_value.py new file mode 100644 index 00000000..587497fc --- /dev/null +++ b/src/elevenlabs/types/object_override_output_properties_value.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .literal_override import LiteralOverride + +if typing.TYPE_CHECKING: + from .object_override_output import ObjectOverrideOutput +ObjectOverrideOutputPropertiesValue = typing.Union[LiteralOverride, "ObjectOverrideOutput"] diff --git a/src/elevenlabs/types/outbound_call_recipient.py b/src/elevenlabs/types/outbound_call_recipient.py index 34a1cdd1..a03e367a 100644 --- a/src/elevenlabs/types/outbound_call_recipient.py +++ b/src/elevenlabs/types/outbound_call_recipient.py @@ -10,7 +10,8 @@ class OutboundCallRecipient(UncheckedBaseModel): id: typing.Optional[str] = None - phone_number: str + phone_number: typing.Optional[str] = None + whatsapp_user_id: typing.Optional[str] = None conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestInput] = None if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/outbound_call_recipient_response_model.py b/src/elevenlabs/types/outbound_call_recipient_response_model.py index d29bec68..a58d96d1 100644 --- a/src/elevenlabs/types/outbound_call_recipient_response_model.py +++ b/src/elevenlabs/types/outbound_call_recipient_response_model.py @@ -11,7 +11,8 @@ class OutboundCallRecipientResponseModel(UncheckedBaseModel): id: str - phone_number: str + phone_number: typing.Optional[str] = None + whatsapp_user_id: typing.Optional[str] = None status: BatchCallRecipientStatus created_at_unix: int updated_at_unix: int diff --git a/src/elevenlabs/types/pending_subscription_switch_response_model.py b/src/elevenlabs/types/pending_subscription_switch_response_model.py index c7b14c12..94d4163a 100644 --- a/src/elevenlabs/types/pending_subscription_switch_response_model.py +++ b/src/elevenlabs/types/pending_subscription_switch_response_model.py @@ -5,6 +5,9 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .pending_subscription_switch_response_model_next_billing_period import ( + PendingSubscriptionSwitchResponseModelNextBillingPeriod, +) from .pending_subscription_switch_response_model_next_tier import PendingSubscriptionSwitchResponseModelNextTier @@ -15,6 +18,11 @@ class PendingSubscriptionSwitchResponseModel(UncheckedBaseModel): The tier to change to. """ + next_billing_period: PendingSubscriptionSwitchResponseModelNextBillingPeriod = pydantic.Field() + """ + The billing period to change to. + """ + timestamp_seconds: int = pydantic.Field() """ The timestamp of the change. diff --git a/src/elevenlabs/types/pending_subscription_switch_response_model_next_billing_period.py b/src/elevenlabs/types/pending_subscription_switch_response_model_next_billing_period.py new file mode 100644 index 00000000..69eb626f --- /dev/null +++ b/src/elevenlabs/types/pending_subscription_switch_response_model_next_billing_period.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PendingSubscriptionSwitchResponseModelNextBillingPeriod = typing.Union[ + typing.Literal["monthly_period", "annual_period"], typing.Any +] diff --git a/src/elevenlabs/types/phone_number_dynamic_variable_transfer_destination.py b/src/elevenlabs/types/phone_number_dynamic_variable_transfer_destination.py new file mode 100644 index 00000000..0ad9dfc2 --- /dev/null +++ b/src/elevenlabs/types/phone_number_dynamic_variable_transfer_destination.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class PhoneNumberDynamicVariableTransferDestination(UncheckedBaseModel): + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/phone_number_transfer_transfer_destination.py b/src/elevenlabs/types/phone_number_transfer_transfer_destination.py index 6c0765d1..f887d043 100644 --- a/src/elevenlabs/types/phone_number_transfer_transfer_destination.py +++ b/src/elevenlabs/types/phone_number_transfer_transfer_destination.py @@ -24,6 +24,20 @@ class Config: extra = pydantic.Extra.allow +class PhoneNumberTransferTransferDestination_PhoneDynamicVariable(UncheckedBaseModel): + type: typing.Literal["phone_dynamic_variable"] = "phone_dynamic_variable" + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class PhoneNumberTransferTransferDestination_SipUri(UncheckedBaseModel): type: typing.Literal["sip_uri"] = "sip_uri" sip_uri: str @@ -38,7 +52,26 @@ class Config: extra = pydantic.Extra.allow +class PhoneNumberTransferTransferDestination_SipUriDynamicVariable(UncheckedBaseModel): + type: typing.Literal["sip_uri_dynamic_variable"] = "sip_uri_dynamic_variable" + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + PhoneNumberTransferTransferDestination = typing_extensions.Annotated[ - typing.Union[PhoneNumberTransferTransferDestination_Phone, PhoneNumberTransferTransferDestination_SipUri], + typing.Union[ + PhoneNumberTransferTransferDestination_Phone, + PhoneNumberTransferTransferDestination_PhoneDynamicVariable, + PhoneNumberTransferTransferDestination_SipUri, + PhoneNumberTransferTransferDestination_SipUriDynamicVariable, + ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py index af099778..7f9cea6e 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_input_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_input import ApiIntegrationWebhookOverridesInput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput +class PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesInput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class PromptAgentApiModelInputToolsItem_Client(UncheckedBaseModel): """ The type of tool @@ -99,9 +131,9 @@ class PromptAgentApiModelInputToolsItem_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigInput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -117,6 +149,7 @@ class Config: PromptAgentApiModelInputToolsItem = typing_extensions.Annotated[ typing.Union[ + PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelInputToolsItem_Client, PromptAgentApiModelInputToolsItem_Mcp, PromptAgentApiModelInputToolsItem_System, @@ -124,5 +157,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] +update_forward_refs(PromptAgentApiModelInputToolsItem_ApiIntegrationWebhook) update_forward_refs(PromptAgentApiModelInputToolsItem_Client) update_forward_refs(PromptAgentApiModelInputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py index 6809954a..d7f25380 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_output_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_output import ApiIntegrationWebhookOverridesOutput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput +class PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesOutput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class PromptAgentApiModelOutputToolsItem_Client(UncheckedBaseModel): """ The type of tool @@ -99,9 +131,9 @@ class PromptAgentApiModelOutputToolsItem_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigOutput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -117,6 +149,7 @@ class Config: PromptAgentApiModelOutputToolsItem = typing_extensions.Annotated[ typing.Union[ + PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelOutputToolsItem_Client, PromptAgentApiModelOutputToolsItem_Mcp, PromptAgentApiModelOutputToolsItem_System, @@ -124,5 +157,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] +update_forward_refs(PromptAgentApiModelOutputToolsItem_ApiIntegrationWebhook) update_forward_refs(PromptAgentApiModelOutputToolsItem_Client) update_forward_refs(PromptAgentApiModelOutputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py index 047ca05b..c07b8a75 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_input_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_input import ApiIntegrationWebhookOverridesInput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput +class PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesInput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class PromptAgentApiModelWorkflowOverrideInputToolsItem_Client(UncheckedBaseModel): """ The type of tool @@ -99,9 +131,9 @@ class PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook(UncheckedBaseMod assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigInput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -117,6 +149,7 @@ class Config: PromptAgentApiModelWorkflowOverrideInputToolsItem = typing_extensions.Annotated[ typing.Union[ + PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideInputToolsItem_Client, PromptAgentApiModelWorkflowOverrideInputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideInputToolsItem_System, @@ -124,5 +157,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] +update_forward_refs(PromptAgentApiModelWorkflowOverrideInputToolsItem_ApiIntegrationWebhook) update_forward_refs(PromptAgentApiModelWorkflowOverrideInputToolsItem_Client) update_forward_refs(PromptAgentApiModelWorkflowOverrideInputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py index 6c9cdb80..e2cd45d7 100644 --- a/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_api_model_workflow_override_output_tools_item.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_output import ApiIntegrationWebhookOverridesOutput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput +class PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesOutput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client(UncheckedBaseModel): """ The type of tool @@ -99,9 +131,9 @@ class PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook(UncheckedBaseMo assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigOutput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -117,6 +149,7 @@ class Config: PromptAgentApiModelWorkflowOverrideOutputToolsItem = typing_extensions.Annotated[ typing.Union[ + PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client, PromptAgentApiModelWorkflowOverrideOutputToolsItem_Mcp, PromptAgentApiModelWorkflowOverrideOutputToolsItem_System, @@ -124,5 +157,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] +update_forward_refs(PromptAgentApiModelWorkflowOverrideOutputToolsItem_ApiIntegrationWebhook) update_forward_refs(PromptAgentApiModelWorkflowOverrideOutputToolsItem_Client) update_forward_refs(PromptAgentApiModelWorkflowOverrideOutputToolsItem_Webhook) diff --git a/src/elevenlabs/types/query_override.py b/src/elevenlabs/types/query_override.py new file mode 100644 index 00000000..557f8650 --- /dev/null +++ b/src/elevenlabs/types/query_override.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .literal_override import LiteralOverride + + +class QueryOverride(UncheckedBaseModel): + properties: typing.Optional[typing.Dict[str, typing.Optional[LiteralOverride]]] = None + required: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/referenced_tool_common_model_type.py b/src/elevenlabs/types/referenced_tool_common_model_type.py index 7c20433c..4b1961f9 100644 --- a/src/elevenlabs/types/referenced_tool_common_model_type.py +++ b/src/elevenlabs/types/referenced_tool_common_model_type.py @@ -2,4 +2,6 @@ import typing -ReferencedToolCommonModelType = typing.Union[typing.Literal["system", "webhook", "client", "workflow"], typing.Any] +ReferencedToolCommonModelType = typing.Union[ + typing.Literal["system", "webhook", "client", "workflow", "api_integration_webhook"], typing.Any +] diff --git a/src/elevenlabs/types/sip_uri_dynamic_variable_transfer_destination.py b/src/elevenlabs/types/sip_uri_dynamic_variable_transfer_destination.py new file mode 100644 index 00000000..f94cb914 --- /dev/null +++ b/src/elevenlabs/types/sip_uri_dynamic_variable_transfer_destination.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SipUriDynamicVariableTransferDestination(UncheckedBaseModel): + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/tool_request_model_tool_config.py b/src/elevenlabs/types/tool_request_model_tool_config.py index 1f4aecba..2c6a64e6 100644 --- a/src/elevenlabs/types/tool_request_model_tool_config.py +++ b/src/elevenlabs/types/tool_request_model_tool_config.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_input import ApiIntegrationWebhookOverridesInput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_input_params import SystemToolConfigInputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput +class ToolRequestModelToolConfig_ApiIntegrationWebhook(UncheckedBaseModel): + """ + Configuration for the tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesInput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class ToolRequestModelToolConfig_Client(UncheckedBaseModel): """ Configuration for the tool @@ -86,9 +118,9 @@ class ToolRequestModelToolConfig_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigInput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigInput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -104,9 +136,13 @@ class Config: ToolRequestModelToolConfig = typing_extensions.Annotated[ typing.Union[ - ToolRequestModelToolConfig_Client, ToolRequestModelToolConfig_System, ToolRequestModelToolConfig_Webhook + ToolRequestModelToolConfig_ApiIntegrationWebhook, + ToolRequestModelToolConfig_Client, + ToolRequestModelToolConfig_System, + ToolRequestModelToolConfig_Webhook, ], UnionMetadata(discriminant="type"), ] +update_forward_refs(ToolRequestModelToolConfig_ApiIntegrationWebhook) update_forward_refs(ToolRequestModelToolConfig_Client) update_forward_refs(ToolRequestModelToolConfig_Webhook) diff --git a/src/elevenlabs/types/tool_response_model_tool_config.py b/src/elevenlabs/types/tool_response_model_tool_config.py index 0b08d465..c968c71b 100644 --- a/src/elevenlabs/types/tool_response_model_tool_config.py +++ b/src/elevenlabs/types/tool_response_model_tool_config.py @@ -8,6 +8,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .api_integration_webhook_overrides_output import ApiIntegrationWebhookOverridesOutput from .dynamic_variable_assignment import DynamicVariableAssignment from .dynamic_variables_config import DynamicVariablesConfig from .system_tool_config_output_params import SystemToolConfigOutputParams @@ -17,6 +18,37 @@ from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput +class ToolResponseModelToolConfig_ApiIntegrationWebhook(UncheckedBaseModel): + """ + The type of tool + """ + + type: typing.Literal["api_integration_webhook"] = "api_integration_webhook" + name: str + description: str + response_timeout_secs: typing.Optional[int] = None + disable_interruptions: typing.Optional[bool] = None + force_pre_tool_speech: typing.Optional[bool] = None + assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None + tool_call_sound: typing.Optional[ToolCallSoundType] = None + tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None + dynamic_variables: typing.Optional[DynamicVariablesConfig] = None + execution_mode: typing.Optional[ToolExecutionMode] = None + tool_version: typing.Optional[str] = None + api_integration_id: str + api_integration_connection_id: str + api_schema_overrides: typing.Optional[ApiIntegrationWebhookOverridesOutput] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class ToolResponseModelToolConfig_Client(UncheckedBaseModel): """ The type of tool @@ -99,9 +131,9 @@ class ToolResponseModelToolConfig_Webhook(UncheckedBaseModel): assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = None tool_call_sound: typing.Optional[ToolCallSoundType] = None tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = None - api_schema: WebhookToolApiSchemaConfigOutput dynamic_variables: typing.Optional[DynamicVariablesConfig] = None execution_mode: typing.Optional[ToolExecutionMode] = None + api_schema: WebhookToolApiSchemaConfigOutput if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -117,6 +149,7 @@ class Config: ToolResponseModelToolConfig = typing_extensions.Annotated[ typing.Union[ + ToolResponseModelToolConfig_ApiIntegrationWebhook, ToolResponseModelToolConfig_Client, ToolResponseModelToolConfig_Mcp, ToolResponseModelToolConfig_System, @@ -124,5 +157,6 @@ class Config: ], UnionMetadata(discriminant="type"), ] +update_forward_refs(ToolResponseModelToolConfig_ApiIntegrationWebhook) update_forward_refs(ToolResponseModelToolConfig_Client) update_forward_refs(ToolResponseModelToolConfig_Webhook) diff --git a/src/elevenlabs/types/tool_type.py b/src/elevenlabs/types/tool_type.py index f247f22a..2ab705d8 100644 --- a/src/elevenlabs/types/tool_type.py +++ b/src/elevenlabs/types/tool_type.py @@ -2,4 +2,7 @@ import typing -ToolType = typing.Union[typing.Literal["system", "webhook", "client", "mcp", "workflow"], typing.Any] +ToolType = typing.Union[ + typing.Literal["system", "webhook", "client", "mcp", "workflow", "api_integration_webhook", "api_integration_mcp"], + typing.Any, +] diff --git a/src/elevenlabs/types/voice_segment.py b/src/elevenlabs/types/voice_segment.py index 4392e331..43e677a3 100644 --- a/src/elevenlabs/types/voice_segment.py +++ b/src/elevenlabs/types/voice_segment.py @@ -33,6 +33,11 @@ class VoiceSegment(UncheckedBaseModel): End index in the characters array (exclusive) """ + dialogue_input_index: int = pydantic.Field() + """ + Line of the dialogue (script) that this segment is a part of. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/webhook_tool_config_input.py b/src/elevenlabs/types/webhook_tool_config_input.py index 9d938b01..6921a4dc 100644 --- a/src/elevenlabs/types/webhook_tool_config_input.py +++ b/src/elevenlabs/types/webhook_tool_config_input.py @@ -56,11 +56,6 @@ class WebhookToolConfigInput(UncheckedBaseModel): Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. """ - api_schema: WebhookToolApiSchemaConfigInput = pydantic.Field() - """ - The schema for the outgoing webhoook, including parameters and URL specification - """ - dynamic_variables: typing.Optional[DynamicVariablesConfig] = pydantic.Field(default=None) """ Configuration for dynamic variables @@ -71,6 +66,11 @@ class WebhookToolConfigInput(UncheckedBaseModel): Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. """ + api_schema: WebhookToolApiSchemaConfigInput = pydantic.Field() + """ + The schema for the outgoing webhoook, including parameters and URL specification + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/webhook_tool_config_output.py b/src/elevenlabs/types/webhook_tool_config_output.py index 82d73fd5..da0c08e2 100644 --- a/src/elevenlabs/types/webhook_tool_config_output.py +++ b/src/elevenlabs/types/webhook_tool_config_output.py @@ -56,11 +56,6 @@ class WebhookToolConfigOutput(UncheckedBaseModel): Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call. """ - api_schema: WebhookToolApiSchemaConfigOutput = pydantic.Field() - """ - The schema for the outgoing webhoook, including parameters and URL specification - """ - dynamic_variables: typing.Optional[DynamicVariablesConfig] = pydantic.Field(default=None) """ Configuration for dynamic variables @@ -71,6 +66,11 @@ class WebhookToolConfigOutput(UncheckedBaseModel): Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. """ + api_schema: WebhookToolApiSchemaConfigOutput = pydantic.Field() + """ + The schema for the outgoing webhoook, including parameters and URL specification + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py b/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py index 778c15cc..7c4bb73c 100644 --- a/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py +++ b/src/elevenlabs/types/workflow_phone_number_node_model_input_transfer_destination.py @@ -24,6 +24,20 @@ class Config: extra = pydantic.Extra.allow +class WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable(UncheckedBaseModel): + type: typing.Literal["phone_dynamic_variable"] = "phone_dynamic_variable" + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri(UncheckedBaseModel): type: typing.Literal["sip_uri"] = "sip_uri" sip_uri: str @@ -38,10 +52,26 @@ class Config: extra = pydantic.Extra.allow +class WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable(UncheckedBaseModel): + type: typing.Literal["sip_uri_dynamic_variable"] = "sip_uri_dynamic_variable" + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + WorkflowPhoneNumberNodeModelInputTransferDestination = typing_extensions.Annotated[ typing.Union[ WorkflowPhoneNumberNodeModelInputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelInputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelInputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelInputTransferDestination_SipUriDynamicVariable, ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py b/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py index 0913c2dd..916d934e 100644 --- a/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py +++ b/src/elevenlabs/types/workflow_phone_number_node_model_output_transfer_destination.py @@ -24,6 +24,20 @@ class Config: extra = pydantic.Extra.allow +class WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable(UncheckedBaseModel): + type: typing.Literal["phone_dynamic_variable"] = "phone_dynamic_variable" + phone_number: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri(UncheckedBaseModel): type: typing.Literal["sip_uri"] = "sip_uri" sip_uri: str @@ -38,10 +52,26 @@ class Config: extra = pydantic.Extra.allow +class WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable(UncheckedBaseModel): + type: typing.Literal["sip_uri_dynamic_variable"] = "sip_uri_dynamic_variable" + sip_uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + WorkflowPhoneNumberNodeModelOutputTransferDestination = typing_extensions.Annotated[ typing.Union[ WorkflowPhoneNumberNodeModelOutputTransferDestination_Phone, + WorkflowPhoneNumberNodeModelOutputTransferDestination_PhoneDynamicVariable, WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUri, + WorkflowPhoneNumberNodeModelOutputTransferDestination_SipUriDynamicVariable, ], UnionMetadata(discriminant="type"), ] diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index 71f7a24f..90a54c04 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -24,6 +24,8 @@ "convai_crawl_jobs", "convai_crawl_tasks", "convai_whatsapp_accounts", + "dashboard", + "dashboard_configuration", ], typing.Any, ]