
    b6iM                        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                  rdd	lmZmZ  G d
 d      Z G d d      Zy)    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)GetAgentEmbedResponseModel   )AsyncRawWidgetClientRawWidgetClient)AsyncAvatarClientAvatarClientc                  T    e Zd ZddZedd       Zddd	 	 	 	 	 	 	 d	dZed        Zy)
WidgetClientc               B    t        |      | _        || _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper_avatarselfr   s     |/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/agents/widget/client.py__init__zWidgetClient.__init__   s    *.I-6:    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawWidgetClient
        r   r   s    r   with_raw_responsezWidgetClient.with_raw_response        r   Nconversation_signaturerequest_optionsc               V    | j                   j                  |||      }|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   agent_idr"   r#   	_responses        r   r&   zWidgetClient.get!   s5    L $$((-CUd ) 
	 ~~r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr	   )r   r   )r   avatar.clientr   r   )r   r   s     r   avatarzWidgetClient.avatarL   s+    <<3't7K7KLDL||r   )r   r   )returnr   r)   strr"   ztyping.Optional[str]r#   ztyping.Optional[RequestOptions]r.   r   __name__
__module____qualname__r   propertyr   r&   r-    r   r   r   r      sc    ;
     8<;?)) !5	)
 9) 
$)V  r   r   c                  T    e Zd ZddZedd       Zddd	 	 	 	 	 	 	 d	dZed        Zy)
AsyncWidgetClientc               B    t        |      | _        || _        d | _        y r   )r
   r   r   r   r   s     r   r   zAsyncWidgetClient.__init__V   s    /~N-;?r   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawWidgetClient
        r   r   s    r   r   z#AsyncWidgetClient.with_raw_response[   r    r   Nr!   c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)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(   s        r   r&   zAsyncWidgetClient.getf   sC     \ **..-CUd / 
 
	 ~~
s   "757c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr	   )r   r   )r   r,   r   r   )r   r   s     r   r-   zAsyncWidgetClient.avatar   s+    <<8,D<P<PQDL||r   )r   r   )r.   r
   r/   r1   r6   r   r   r8   r8   U   sd    @
     8<;?11 !5	1
 91 
$1f  r   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   r6   r   r   <module>rD      s>    #  I 3 O =	>B BJJ Jr   