o
    lWiE*                     @   s   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mZ e e jd
ZG dd dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)+AdhocAgentConfigOverrideForTestRequestModel)#GetTestInvocationsPageResponseModel)#GetTestSuiteInvocationResponseModel   )AsyncRawInvocationsClientRawInvocationsClient.c                   @      e Zd ZdefddZedefddZddddd	ed
e	j
e de	j
e de	j
e def
ddZdddede	j
e defddZeedddede	je d	ede	j
e de	j
e de	j
e de	jfddZdS )InvocationsClientclient_wrapperc                C      t |d| _d S N)r   )r   _raw_clientselfr    r   y/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/conversational_ai/tests/invocations/client.py__init__      zInvocationsClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawInvocationsClient
        r   r   r   r   r   with_raw_response      	z#InvocationsClient.with_raw_responseN	page_sizecursorrequest_optionsagent_idr   r    r!   c                C   s   | j j||||d}|jS )a  
        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",
        )
        r"   r   r    r!   r   listdatar   r"   r   r    r!   	_responser   r   r   r%      s   +zInvocationsClient.listr!   test_invocation_idc                C   s   | j j||d}|jS )a  
        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",
        )
        r)   r   getr&   r   r*   r!   r(   r   r   r   r,   O   s   zInvocationsClient.getagent_config_override	branch_idr!   test_run_idsr/   r0   c                C   s   | j j||||||d}|jS )a  
        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.

        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
        -------
        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",
        )
        r1   r"   r/   r0   r!   r   resubmitr&   r   r*   r1   r"   r/   r0   r!   r(   r   r   r   r4   p   s   3zInvocationsClient.resubmit)__name__
__module____qualname__r   r   propertyr   r   strtypingOptionalintr   r   r%   r   r,   OMITSequencer   Anyr4   r   r   r   r   r      sX    
1
'	r   c                   @   r   )AsyncInvocationsClientr   c                C   r   r   )r
   r   r   r   r   r   r      r   zAsyncInvocationsClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawInvocationsClient
        r   r   r   r   r   r      r   z(AsyncInvocationsClient.with_raw_responseNr   r"   r   r    r!   c                   s"   | j j||||dI dH }|jS )a8  
        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())
        r#   Nr$   r'   r   r   r   r%      s
   3zAsyncInvocationsClient.listr)   r*   c                   s   | j j||dI dH }|jS )a  
        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())
        r)   Nr+   r-   r   r   r   r,      s   &zAsyncInvocationsClient.getr.   r1   r/   r0   c                   s&   | j j||||||dI dH }|jS )a  
        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.

        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
        -------
        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())
        r2   Nr3   r5   r   r   r   r4     s   ;zAsyncInvocationsClient.resubmit)r6   r7   r8   r   r   r9   r
   r   r:   r;   r<   r=   r   r   r%   r   r,   r>   r?   r   r@   r4   r   r   r   r   rA      sX    
9
/	rA   )r;   core.client_wrapperr   r   core.request_optionsr   8types.adhoc_agent_config_override_for_test_request_modelr   .types.get_test_invocations_page_response_modelr   .types.get_test_suite_invocation_response_modelr   
raw_clientr
   r   castr@   r>   r   rA   r   r   r   r   <module>   s    