
    &`i2              
           d Z ddlmZ ddlmZmZ ddlmZ  e            Z	ede
defd            Zedde
d	ed
edefd            ZdS )z.Registry of connector names for global access.    )Any)	ConnectorConnectorContext)OldAPIStacknameclsc                 z    | t           v rdS t          |t                    st          d|          |t           | <   dS )zRegister a connector for use with RLlib.

    Args:
        name: Name to register.
        cls: Callable that creates an env.
    Nz!Can only register Connector type.)ALL_CONNECTORS
issubclassr   	TypeError)r   r   s     q/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/rllib/connectors/registry.pyregister_connectorr   
   sJ     ~c9%% B;SAAA
 N4    Nctxparamsreturnc                 v    | t           vrt          d|           t           |                              ||          S )zGet a connector by its name and serialized config.

    Args:
        name: name of the connector.
        ctx: Connector context.
        params: serialized parameters of the connector.

    Returns:
        Constructed connector.
    zconnector not found.)r
   	NameError
from_state)r   r   r   s      r   get_connectorr      s;     >!!.555$**3777r   )N)__doc__typingr   ray.rllib.connectors.connectorr   r   ray.rllib.utils.annotationsr   dictr
   strr   r    r   r   <module>r      s    4 4       F F F F F F F F 3 3 3 3 3 3 S y    & 8 8 8"2 8C 89 8 8 8 8 8 8r   