o
    lWi!:                     @   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 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)#GetToolDependentAgentsResponseModel)ToolRequestModel)ToolResponseModel)ToolsResponseModel   )AsyncRawToolsClientRawToolsClient.c                   @     e Zd ZdefddZedefddZddd	ej	e
 defd
dZddd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ddded	ej	e
 dejfddZdddeded	ej	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S )ToolsClientclient_wrapperc                C      t |d| _d S N)r   )r   _raw_clientselfr    r   m/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/conversational_ai/tools/client.py__init__      zToolsClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawToolsClient
        r   r   r   r   r   with_raw_response      	zToolsClient.with_raw_responseNrequest_optionsr    c                C   s   | j j|d}|jS )a  
        Get all available tools in the workspace.

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

        Returns
        -------
        ToolsResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.list()
        r   r   listdatar   r    	_responser   r   r   r"       s   zToolsClient.listrequestc                C      | j j||d}|jS )a  
        Add a new tool to the available tools in the workspace.

        Parameters
        ----------
        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import (
            ElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.create(
            request=ToolRequestModel(
                tool_config=ToolRequestModelToolConfig_Client(
                    name="name",
                    description="description",
                    expects_response=False,
                ),
            ),
        )
        r&   r    r   creater#   r   r&   r    r%   r   r   r   r*   :   s   'zToolsClient.createtool_idc                C   r'   )aQ  
        Get tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

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

        Returns
        -------
        ToolResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.get(
            tool_id="tool_id",
        )
        r   r   getr#   r   r,   r    r%   r   r   r   r.   d      zToolsClient.getc                C   r'   )a@  
        Delete tool from the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.tools.delete(
            tool_id="tool_id",
        )
        r   r   deleter#   r/   r   r   r   r2      r0   zToolsClient.deletec                C   s   | j j|||d}|jS )a  
        Update tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import (
            ElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.update(
            tool_id="tool_id",
            request=ToolRequestModel(
                tool_config=ToolRequestModelToolConfig_Client(
                    name="name",
                    description="description",
                    expects_response=False,
                ),
            ),
        )
        r(   r   updater#   r   r,   r&   r    r%   r   r   r   r4      s   +zToolsClient.updatecursor	page_sizer    r7   r8   c                C   s   | j j||||d}|jS )a  
        Get a list of agents depending on this tool

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.

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

        Returns
        -------
        GetToolDependentAgentsResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.get_dependent_agents(
            tool_id="tool_id",
            cursor="cursor",
            page_size=1,
        )
        r6   r   get_dependent_agentsr#   r   r,   r7   r8   r    r%   r   r   r   r:      s   +z ToolsClient.get_dependent_agents)__name__
__module____qualname__r   r   propertyr   r   typingOptionalr   r	   r"   r   r   r*   strr.   Anyr2   r4   intr   r:   r   r   r   r   r      sN    

"*$ 
2r   c                   @   r   )AsyncToolsClientr   c                C   r   r   )r   r   r   r   r   r   r     r   zAsyncToolsClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawToolsClient
        r   r   r   r   r   r     r   z"AsyncToolsClient.with_raw_responseNr   r    c                   s   | j j|dI dH }|jS )aY  
        Get all available tools in the workspace.

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

        Returns
        -------
        ToolsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.list()


        asyncio.run(main())
        r   Nr!   r$   r   r   r   r"     s   zAsyncToolsClient.listr&   c                      | j j||dI dH }|jS )a  
        Add a new tool to the available tools in the workspace.

        Parameters
        ----------
        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AsyncElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.create(
                request=ToolRequestModel(
                    tool_config=ToolRequestModelToolConfig_Client(
                        name="name",
                        description="description",
                        expects_response=False,
                    ),
                ),
            )


        asyncio.run(main())
        r(   Nr)   r+   r   r   r   r*   2  s   /zAsyncToolsClient.creater,   c                   rF   )a  
        Get tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.get(
                tool_id="tool_id",
            )


        asyncio.run(main())
        r   Nr-   r/   r   r   r   r.   d     $zAsyncToolsClient.getc                   rF   )a  
        Delete tool from the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.tools.delete(
                tool_id="tool_id",
            )


        asyncio.run(main())
        r   Nr1   r/   r   r   r   r2     rG   zAsyncToolsClient.deletec                   s    | j j|||dI dH }|jS )av  
        Update tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AsyncElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.update(
                tool_id="tool_id",
                request=ToolRequestModel(
                    tool_config=ToolRequestModelToolConfig_Client(
                        name="name",
                        description="description",
                        expects_response=False,
                    ),
                ),
            )


        asyncio.run(main())
        r(   Nr3   r5   r   r   r   r4     s   3zAsyncToolsClient.updater6   r7   r8   c                   s"   | j j||||dI dH }|jS )a  
        Get a list of agents depending on this tool

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.

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

        Returns
        -------
        GetToolDependentAgentsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.get_dependent_agents(
                tool_id="tool_id",
                cursor="cursor",
                page_size=1,
            )


        asyncio.run(main())
        r6   Nr9   r;   r   r   r   r:     s
   3z%AsyncToolsClient.get_dependent_agents)r<   r=   r>   r   r   r?   r   r   r@   rA   r   r	   r"   r   r   r*   rB   r.   rC   r2   r4   rD   r   r:   r   r   r   r   rE     sN    
#
"2$'(
:rE   )r@   core.client_wrapperr   r   core.request_optionsr   .types.get_tool_dependent_agents_response_modelr   types.tool_request_modelr   types.tool_response_modelr   types.tools_response_modelr	   
raw_clientr   r   castrC   OMITr   rE   r   r   r   r   <module>   s    q