o
    lWi                     @  s\  d dl mZ d dlZddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z# ddl$m%Z%m&Z& ej'rddl(m)Z)m*Z* ddl+m,Z,m-Z- ddl.m/Z/m0Z0 ddl1m2Z2m3Z3 e4ej5dZ6G dd dZ7G dd dZ8dS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)+AdhocAgentConfigOverrideForTestRequestModel)!AgentPlatformSettingsRequestModel)#AgentSimulatedChatTestResponseModel)AgentSortBy)AgentWorkflowRequestModel)#ConversationSimulationSpecification)ConversationalConfig)CreateAgentResponseModel)GetAgentResponseModel)GetAgentsPageResponseModel)#GetTestSuiteInvocationResponseModel)PromptEvaluationCriteria)SingleTestRunRequestModel)SortDirection   )AsyncRawAgentsClientRawAgentsClient)AsyncKnowledgeBaseClientKnowledgeBaseClient)AsyncLinkClient
LinkClient)AsyncLlmUsageClientLlmUsageClient)AsyncWidgetClientWidgetClient.c                   @    e Zd ZdTddZedUddZeeeed	d
dVddZd	ddWddZd	ddXd!d"Z	eeeeed	d#dYd%d&Z
d	d	d	d	d	d	d	d'dZd3d4Zed	d5d[d6d7Zeed	d8d\d?d@Zeed	d8d]dAdBZeed	dCd^dJdKZedLdM ZedNdO ZedPdQ ZedRdS Zd	S )_AgentsClientclient_wrapperr   c                C  .   t |d| _|| _d | _d | _d | _d | _d S Nr"   )r   _raw_client_client_wrapper_widget_link_knowledge_base
_llm_usageselfr"    r.   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/conversational_ai/agents/client.py__init__#      
zAgentsClient.__init__returnr   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAgentsClient
        r&   r-   r.   r.   r/   with_raw_response+      	zAgentsClient.with_raw_responseNplatform_settingsworkflownametagsrequest_optionsconversation_configr   r9   2typing.Optional[AgentPlatformSettingsRequestModel]r:   *typing.Optional[AgentWorkflowRequestModel]r;   typing.Optional[str]r<   %typing.Optional[typing.Sequence[str]]r=   typing.Optional[RequestOptions]r   c                C  s   | j j||||||d}|jS )a  
        Create an agent from a config object

        Parameters
        ----------
        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[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

        tags : typing.Optional[typing.Sequence[str]]
            Tags to help classify and filter the agent

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CreateAgentResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ConversationalConfig, ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.create(
            conversation_config=ConversationalConfig(),
        )
        r>   r9   r:   r;   r<   r=   r&   createdatar-   r>   r9   r:   r;   r<   r=   	_responser.   r.   r/   rF   6   s   1zAgentsClient.creater=   agent_idstrr   c                C     | j j||d}|jS )a  
        Retrieve config for an agent

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        GetAgentResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.get(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
        )
        rJ   r&   getrG   r-   rK   r=   rI   r.   r.   r/   rO   q   s   zAgentsClient.getNonec                C  rM   )aF  
        Delete an agent

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.delete(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
        )
        rJ   r&   deleterG   rP   r.   r.   r/   rS      s   zAgentsClient.deleterD   %typing.Optional[ConversationalConfig]c          	   	   C      | j j|||||||d}|jS )aO  
        Patches an Agent settings

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        conversation_config : typing.Optional[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[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

        tags : typing.Optional[typing.Sequence[str]]
            Tags to help classify and filter the agent

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        GetAgentResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.update(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
        )
        rD   r&   updaterG   	r-   rK   r>   r9   r:   r;   r<   r=   rI   r.   r.   r/   rW      s   5	zAgentsClient.update	page_sizesearcharchivedsort_directionsort_bycursorr=   rZ   typing.Optional[int]r[   r\   typing.Optional[bool]r]   typing.Optional[SortDirection]r^   typing.Optional[AgentSortBy]r_   r   c          	   	   C  rU   )a
  
        Returns a list of your agents and their metadata.

        Parameters
        ----------
        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.

        archived : typing.Optional[bool]
            Filter agents by archived status

        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.

        Returns
        -------
        GetAgentsPageResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.list(
            page_size=1,
            search="search",
            archived=True,
            sort_direction="asc",
            sort_by="name",
            cursor="cursor",
        )
        rY   r&   listrG   	r-   rZ   r[   r\   r]   r^   r_   r=   rI   r.   r.   r/   re      s   :	zAgentsClient.listr;   r=   c                C  s   | j j|||d}|jS )a  
        Create a new agent by duplicating an existing one

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CreateAgentResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.duplicate(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
        )
        rg   r&   	duplicaterG   r-   rK   r;   r=   rI   r.   r.   r/   ri   3  s   %zAgentsClient.duplicateextra_evaluation_criterianew_turns_limitr=   simulation_specificationr   rl   :typing.Optional[typing.Sequence[PromptEvaluationCriteria]]rm   r	   c                C     | j j|||||d}|jS )a  
        Run a conversation between the agent and a simulated user.

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AgentSimulatedChatTestResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import (
            AgentConfig,
            ConversationSimulationSpecification,
            ElevenLabs,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.simulate_conversation(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            simulation_specification=ConversationSimulationSpecification(
                simulated_user_config=AgentConfig(
                    first_message="Hello, how can I help you today?",
                    language="en",
                    disable_first_message_interruptions=False,
                ),
            ),
        )
        rn   rl   rm   r=   r&   simulate_conversationrG   r-   rK   rn   rl   rm   r=   rI   r.   r.   r/   rs   [  s   8z"AgentsClient.simulate_conversationc                C  rp   )a  
        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.

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from elevenlabs import (
            AgentConfig,
            ConversationSimulationSpecification,
            ElevenLabs,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.simulate_conversation_stream(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            simulation_specification=ConversationSimulationSpecification(
                simulated_user_config=AgentConfig(
                    first_message="Hello, how can I help you today?",
                    language="en",
                    disable_first_message_interruptions=False,
                ),
            ),
        )
        rq   r&   simulate_conversation_streamrG   rt   r.   r.   r/   rv     s   7z)AgentsClient.simulate_conversation_streamagent_config_override	branch_idr=   tests*typing.Sequence[SingleTestRunRequestModel]rx   <typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]ry   r   c                C  rp   )a  
        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.

        branch_id : typing.Optional[str]
            ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration.

        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="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            tests=[
                SingleTestRunRequestModel(
                    test_id="test_id",
                )
            ],
        )
        rz   rx   ry   r=   r&   	run_testsrG   r-   rK   rz   rx   ry   r=   rI   r.   r.   r/   r     s   2zAgentsClient.run_testsc                 C  *   | j d u rddlm} || jd| _ | j S )Nr   )r   r%   )r(   widget.clientr   r'   )r-   r   r.   r.   r/   widget     
zAgentsClient.widgetc                 C  r   )Nr   )r   r%   )r)   link.clientr   r'   )r-   r   r.   r.   r/   link  r   zAgentsClient.linkc                 C  r   )Nr   )r   r%   )r*   knowledge_base.clientr   r'   )r-   r   r.   r.   r/   knowledge_base'  r   zAgentsClient.knowledge_basec                 C  r   )Nr   )r   r%   )r+   llm_usage.clientr   r'   )r-   r   r.   r.   r/   	llm_usage/  r   zAgentsClient.llm_usage)r"   r   )r2   r   r>   r   r9   r?   r:   r@   r;   rA   r<   rB   r=   rC   r2   r   rK   rL   r=   rC   r2   r   rK   rL   r=   rC   r2   rQ   rK   rL   r>   rT   r9   r?   r:   r@   r;   rA   r<   rB   r=   rC   r2   r   rZ   r`   r[   rA   r\   ra   r]   rb   r^   rc   r_   rA   r=   rC   r2   r   rK   rL   r;   rA   r=   rC   r2   r   rK   rL   rn   r   rl   ro   rm   r`   r=   rC   r2   r	   rK   rL   rn   r   rl   ro   rm   r`   r=   rC   r2   rQ   rK   rL   rz   r{   rx   r|   ry   rA   r=   rC   r2   r   __name__
__module____qualname__r0   propertyr6   OMITrF   rO   rS   rW   re   ri   rs   rv   r   r   r   r   r   r.   r.   r.   r/   r!   "   sd    
;"CI-FE;


r!   c                   @  r    )_AsyncAgentsClientr"   r   c                C  r#   r$   )r   r&   r'   r(   r)   r*   r+   r,   r.   r.   r/   r0   9  r1   zAsyncAgentsClient.__init__r2   r   c                 C  r3   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAgentsClient
        r4   r5   r.   r.   r/   r6   A  r7   z#AsyncAgentsClient.with_raw_responseNr8   r>   r   r9   r?   r:   r@   r;   rA   r<   rB   r=   rC   r   c                  s&   | j j||||||dI dH }|jS )ay  
        Create an agent from a config object

        Parameters
        ----------
        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[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

        tags : typing.Optional[typing.Sequence[str]]
            Tags to help classify and filter the agent

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CreateAgentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs, ConversationalConfig

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.create(
                conversation_config=ConversationalConfig(),
            )


        asyncio.run(main())
        rD   NrE   rH   r.   r.   r/   rF   L  s   9zAsyncAgentsClient.createrJ   rK   rL   r   c                     | j j||dI dH }|jS )a  
        Retrieve config for an agent

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        GetAgentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.get(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            )


        asyncio.run(main())
        rJ   NrN   rP   r.   r.   r/   rO     s   &zAsyncAgentsClient.getrQ   c                  r   )a  
        Delete an agent

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        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.conversational_ai.agents.delete(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            )


        asyncio.run(main())
        rJ   NrR   rP   r.   r.   r/   rS     s   #zAsyncAgentsClient.deleterD   rT   c          	   	     (   | j j|||||||dI dH }|jS )a  
        Patches an Agent settings

        Parameters
        ----------
        agent_id : str
            The id of an agent. This is returned on agent creation.

        conversation_config : typing.Optional[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[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

        tags : typing.Optional[typing.Sequence[str]]
            Tags to help classify and filter the agent

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        GetAgentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.update(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            )


        asyncio.run(main())
        rD   NrV   rX   r.   r.   r/   rW     s   =	zAsyncAgentsClient.updaterY   rZ   r`   r[   r\   ra   r]   rb   r^   rc   r_   r   c          	   	     r   )a  
        Returns a list of your agents and their metadata.

        Parameters
        ----------
        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.

        archived : typing.Optional[bool]
            Filter agents by archived status

        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.

        Returns
        -------
        GetAgentsPageResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        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",
            )


        asyncio.run(main())
        rY   Nrd   rf   r.   r.   r/   re   &  s   B	zAsyncAgentsClient.listrg   c                  s    | j j|||dI dH }|jS )an  
        Create a new agent by duplicating an existing one

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CreateAgentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.duplicate(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            )


        asyncio.run(main())
        rg   Nrh   rj   r.   r.   r/   ri   s  s   -zAsyncAgentsClient.duplicaterk   rn   r   rl   ro   rm   r	   c                  $   | j j|||||dI dH }|jS )a  
        Run a conversation between the agent and a simulated user.

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AgentSimulatedChatTestResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AgentConfig,
            AsyncElevenLabs,
            ConversationSimulationSpecification,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.simulate_conversation(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
                simulation_specification=ConversationSimulationSpecification(
                    simulated_user_config=AgentConfig(
                        first_message="Hello, how can I help you today?",
                        language="en",
                        disable_first_message_interruptions=False,
                    ),
                ),
            )


        asyncio.run(main())
        rq   Nrr   rt   r.   r.   r/   rs     s   @z'AsyncAgentsClient.simulate_conversationc                  r   )aJ  
        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.

        Parameters
        ----------
        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

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AgentConfig,
            AsyncElevenLabs,
            ConversationSimulationSpecification,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.simulate_conversation_stream(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
                simulation_specification=ConversationSimulationSpecification(
                    simulated_user_config=AgentConfig(
                        first_message="Hello, how can I help you today?",
                        language="en",
                        disable_first_message_interruptions=False,
                    ),
                ),
            )


        asyncio.run(main())
        rq   Nru   rt   r.   r.   r/   rv     s   ?z.AsyncAgentsClient.simulate_conversation_streamrw   rz   r{   rx   r|   ry   r   c                  r   )a*  
        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.

        branch_id : typing.Optional[str]
            ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration.

        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="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
                tests=[
                    SingleTestRunRequestModel(
                        test_id="test_id",
                    )
                ],
            )


        asyncio.run(main())
        r}   Nr~   r   r.   r.   r/   r   4  s   :zAsyncAgentsClient.run_testsc                 C  r   )Nr   )r   r%   )r(   r   r   r'   )r-   r   r.   r.   r/   r   w  r   zAsyncAgentsClient.widgetc                 C  r   )Nr   )r   r%   )r)   r   r   r'   )r-   r   r.   r.   r/   r     r   zAsyncAgentsClient.linkc                 C  r   )Nr   )r   r%   )r*   r   r   r'   )r-   r   r.   r.   r/   r     r   z AsyncAgentsClient.knowledge_basec                 C  r   )Nr   )r   r%   )r+   r   r   r'   )r-   r   r.   r.   r/   r     r   zAsyncAgentsClient.llm_usage)r"   r   )r2   r   r   r   r   r   r   r   r   r   r   r   r.   r.   r.   r/   r   8  sf    
D)*KQ5NMC


r   )9
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   8types.adhoc_agent_config_override_for_test_request_modelr   +types.agent_platform_settings_request_modelr   .types.agent_simulated_chat_test_response_modelr	   types.agent_sort_byr
   "types.agent_workflow_request_modelr   +types.conversation_simulation_specificationr   types.conversational_configr   !types.create_agent_response_modelr   types.get_agent_response_modelr   $types.get_agents_page_response_modelr   .types.get_test_suite_invocation_response_modelr    types.prompt_evaluation_criteriar   #types.single_test_run_request_modelr   types.sort_directionr   
raw_clientr   r   TYPE_CHECKINGr   r   r   r   r   r   r   r   r   r   r   r   castAnyr   r!   r   r.   r.   r.   r/   <module>   s>       