
    b6iE*                         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 j                  e j                   d
      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)+AdhocAgentConfigOverrideForTestRequestModel)#GetTestInvocationsPageResponseModel)#GetTestSuiteInvocationResponseModel   )AsyncRawInvocationsClientRawInvocationsClient.c                      e Zd ZdefdZedefd       Zdddddede	j                  e   d	e	j                  e   d
e	j                  e   def
dZddded
e	j                  e   def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Zy)InvocationsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     /root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/tests/invocations/client.py__init__zInvocationsClient.__init__   s    /~N    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawInvocationsClient
        r   r   s    r   with_raw_responsez#InvocationsClient.with_raw_response        r   N	page_sizecursorrequest_optionsagent_idr   r    r!   c                X    | j                   j                  ||||      }|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!   	_responses         r   r&   zInvocationsClient.list   s6    V $$))6Sb * 
	 ~~r   r!   test_invocation_idc                T    | j                   j                  ||      }|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)   s       r   r.   zInvocationsClient.getO   s*    < $$(();_(]	~~r   agent_config_override	branch_idr!   test_run_idsr1   r2   c                \    | j                   j                  ||||||      }|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",
        )
        r3   r"   r1   r2   r!   r   resubmitr'   r   r+   r3   r"   r1   r2   r!   r)   s           r   r7   zInvocationsClient.resubmitp   s>    f $$--%"7+ . 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   strtypingOptionalintr   r   r&   r	   r.   OMITSequencer   Anyr7    r   r   r   r      s8   O*; O  #7     +/'+;?. . ??3'	.
 $.  8. 
-.b ^b"%;A??>;Z	,N _c*.;?;; ooc*	;
 ;  &/Z[; ??3';  8; 
;r   r   c                      e Zd ZdefdZedefd       Zdddddede	j                  e   d	e	j                  e   d
e	j                  e   def
dZddded
e	j                  e   def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Zy)AsyncInvocationsClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncInvocationsClient.__init__   s    4NSr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawInvocationsClient
        r   r   s    r   r   z(AsyncInvocationsClient.with_raw_response   r   r   Nr   r"   r   r    r!   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)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(   s         r   r&   zAsyncInvocationsClient.list   sD     f **//6Sb 0 
 
	 ~~
s   #868r*   r+   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)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/   s       r   r.   zAsyncInvocationsClient.get   s9     L **../ASb.cc	~~ ds   !646r0   r3   r1   r2   c                x   K   | j                   j                  ||||||       d{   }|j                  S 7 w)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())
        r5   Nr6   r8   s           r   r7   zAsyncInvocationsClient.resubmit  sL     v **33%"7+ 4 
 
	 ~~
s   %:8:)r9   r:   r;   r   r   r<   r   r   r=   r>   r?   r@   r   r   r&   r	   r.   rA   rB   r   rC   r7   rD   r   r   rF   rF      s@   T*< T  #<     +/'+;?6 6 ??3'	6
 $6  86 
-6r ^b'"%';A??>;Z'	,'^ _c*.;?CC ooc*	C
 C  &/Z[C ??3'C  8C 
Cr   rF   )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   castrC   rA   r   rF   rD   r   r   <module>rS      sM     I 3 t b b G v{{6::s#[ [|s sr   