
    &`i                         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	  e j
        d            G d d                      ZdS )	    N)SERVE_CONTROLLER_NAMESERVE_NAMESPACE)get_controller_impl)HTTPOptions)LoggingConfig)num_cpusc                   *    e Zd ZdZ	 ddefdZd	dZdS )
ServeControllerAvatara  A hack that proxy the creation of async actors from Java.

    To be removed after https://github.com/ray-project/ray/pull/26037

    Java api can not support python async actor. If we use java api create
    python async actor. The async init method won't be executed. The async
    method will fail with pickle error. And the run_control_loop of controller
    actor can't be executed too. We use this proxy actor create python async
    actor to avoid the above problem.
    @  http_proxy_portc                    	 t          j        t          t                    | _        n# t
          $ r
 d | _        Y nw xY w| j        Ft                      }|                    t          |          t                                | _        d S d S )N)	namespace)port)http_optionsglobal_logging_config)
ray	get_actorr   r   _controller
ValueErrorr   remoter   r   )selfr   controller_impls      x/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/serve/_private/controller_avatar.py__init__zServeControllerAvatar.__init__   s    	$"}%     D  	$ 	$ 	$#D	$#133O.55(o>>>&3oo  6    D $#s   %( <<returnNc                     dS )z&No-op to check if this actor is alive.N )r   s    r   check_alivez!ServeControllerAvatar.check_alive&   s        )r   )r   N)__name__
__module____qualname____doc__intr   r   r   r   r   r
   r
      sX        	 	  $    "     r   r
   )r   ray.serve._private.constantsr   r   ray.serve._private.default_implr   ray.serve.configr   ray.serve.schemar   r   r
   r   r   r   <module>r)      s    



 O O O O O O O O ? ? ? ? ? ? ( ( ( ( ( ( * * * * * * Q         r   