
    b6i                         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mZ  e j                  e j                  d	      Z G d
 d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AgentDeploymentRequest)AgentDeploymentResponse   )AsyncRawDeploymentsClientRawDeploymentsClient.c            	       f    e Zd ZdefdZedefd       Zdddede	d	e
j                  e   defd
Zy)DeploymentsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     /root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/agents/deployments/client.py__init__zDeploymentsClient.__init__   s    /~N    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawDeploymentsClient
        r   r   s    r   with_raw_responsez#DeploymentsClient.with_raw_response        r   Nrequest_optionsagent_iddeployment_requestr   c                V    | j                   j                  |||      }|j                  S )a4  
        Create a new deployment for an agent

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

        deployment_request : AgentDeploymentRequest
            Request to create a new deployment

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

        Returns
        -------
        AgentDeploymentResponse
            Successful Response

        Examples
        --------
        from elevenlabs import (
            AgentDeploymentPercentageStrategy,
            AgentDeploymentRequest,
            AgentDeploymentRequestItem,
            ElevenLabs,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.agents.deployments.create(
            agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
            deployment_request=AgentDeploymentRequest(
                requests=[
                    AgentDeploymentRequestItem(
                        branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
                        deployment_strategy=AgentDeploymentPercentageStrategy(
                            traffic_percentage=0.5,
                        ),
                    )
                ],
            ),
        )
        r    r   r   createdatar   r   r    r   	_responses        r   r$   zDeploymentsClient.create   s4    h $$++);_ , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   strr   typingOptionalr   r   r$    r   r   r   r      sg    O*; O  #7     <@77 3	7
  87 
!7r   r   c            	       f    e Zd ZdefdZedefd       Zdddede	d	e
j                  e   defd
Zy)AsyncDeploymentsClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   zAsyncDeploymentsClient.__init__Y   s    4NSr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawDeploymentsClient
        r   r   s    r   r   z(AsyncDeploymentsClient.with_raw_response\   r   r   Nr   r   r    r   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Create a new deployment for an agent

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

        deployment_request : AgentDeploymentRequest
            Request to create a new deployment

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

        Returns
        -------
        AgentDeploymentResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AgentDeploymentPercentageStrategy,
            AgentDeploymentRequest,
            AgentDeploymentRequestItem,
            AsyncElevenLabs,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.agents.deployments.create(
                agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz",
                deployment_request=AgentDeploymentRequest(
                    requests=[
                        AgentDeploymentRequestItem(
                            branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
                            deployment_strategy=AgentDeploymentPercentageStrategy(
                                traffic_percentage=0.5,
                            ),
                        )
                    ],
                ),
            )


        asyncio.run(main())
        r"   Nr#   r&   s        r   r$   zAsyncDeploymentsClient.createg   sB     x **11);_ 2 
 
	 ~~
s   "757)r(   r)   r*   r   r   r+   r
   r   r,   r   r-   r.   r   r   r$   r/   r   r   r1   r1   X   sg    T*< T  #<     <@?? 3	?
  8? 
!?r   r1   )r-   core.client_wrapperr   r   core.request_optionsr   types.agent_deployment_requestr   types.agent_deployment_responser   
raw_clientr
   r   castAnyOMITr   r1   r/   r   r   <module>r=      sJ     I 3 E G G v{{6::s#F FRN Nr   