o
    lWiM                     @  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mZ ejr1dd	lmZmZ G d
d dZG dd dZdS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)GetAgentEmbedResponseModel   )AsyncRawWidgetClientRawWidgetClient)AsyncAvatarClientAvatarClientc                   @  B   e Zd ZdddZedddZd	d	d
dddZedd Zd	S )WidgetClientclient_wrapperr   c                C     t |d| _|| _d | _d S Nr   )r
   _raw_client_client_wrapper_avatarselfr    r   u/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/conversational_ai/agents/widget/client.py__init__      
zWidgetClient.__init__returnr
   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawWidgetClient
        r   r   r   r   r   with_raw_response      	zWidgetClient.with_raw_responseNconversation_signaturerequest_optionsagent_idstrr#   typing.Optional[str]r$   typing.Optional[RequestOptions]r   c                C  s   | j j|||d}|jS )a  
        Retrieve the widget configuration for an agent

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

        conversation_signature : typing.Optional[str]
            An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get-signed-url endpoint

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

        Returns
        -------
        GetAgentEmbedResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.widget.get(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            conversation_signature="conversation_signature",
        )
        r"   r   getdatar   r%   r#   r$   	_responser   r   r   r*   !   s   &zWidgetClient.getc                 C  *   | j d u rddlm} || jd| _ | j S )Nr   )r   r   )r   avatar.clientr   r   )r   r   r   r   r   avatarL      
zWidgetClient.avatar)r   r   )r   r
   r%   r&   r#   r'   r$   r(   r   r   __name__
__module____qualname__r   propertyr    r*   r0   r   r   r   r   r      s    
+r   c                   @  r   )AsyncWidgetClientr   r   c                C  r   r   )r	   r   r   r   r   r   r   r   r   V   r   zAsyncWidgetClient.__init__r   r	   c                 C  r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawWidgetClient
        r   r   r   r   r   r    [   r!   z#AsyncWidgetClient.with_raw_responseNr"   r%   r&   r#   r'   r$   r(   r   c                  s    | j j|||dI dH }|jS )a9  
        Retrieve the widget configuration for an agent

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

        conversation_signature : typing.Optional[str]
            An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get-signed-url endpoint

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

        Returns
        -------
        GetAgentEmbedResponseModel
            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.widget.get(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
                conversation_signature="conversation_signature",
            )


        asyncio.run(main())
        r"   Nr)   r,   r   r   r   r*   f   s
   .zAsyncWidgetClient.getc                 C  r.   )Nr   )r   r   )r   r/   r   r   )r   r   r   r   r   r0      r1   zAsyncWidgetClient.avatar)r   r   )r   r	   r2   r3   r   r   r   r   r8   U   s    
3r8   )
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   $types.get_agent_embed_response_modelr   
raw_clientr	   r
   TYPE_CHECKINGr/   r   r   r   r8   r   r   r   r   <module>   s   E