o
    ۷id                     @  s<   d Z ddlmZ ddlmZ ddlmZ G dd deZdS )zgr.Api() component.    )annotations)Any)	Componentc                      s\   e Zd ZdZg Z	dd fd	d
ZdddZdddZdddZdddZ	dddZ
  ZS )Apizo
    A generic component that holds any value. Used for generating APIs with no actual frontend component.
    APIvaluer   	_api_infodict[str, str]labelstrc                   s   || _ t j||d dS )z?
        Parameters:
            value: default value.
        )r   r
   N)r   super__init__)selfr   r   r
   	__class__ U/home/ubuntu/vllm_env/lib/python3.10/site-packages/gradio/components/api_component.pyr      s   
zApi.__init__payloadreturnc                 C     |S Nr   )r   r   r   r   r   
preprocess      zApi.preprocessc                 C  r   r   r   )r   r   r   r   r   postprocess!   r   zApi.postprocessc                 C  s   | j S r   )r   r   r   r   r   api_info$   s   zApi.api_infoc                 C     | j d ur| j S dS Nz...r   r   r   r   r   example_payload'      zApi.example_payloadc                 C  r   r   r   r   r   r   r   example_value*   r    zApi.example_value)r   )r   r   r   r	   r
   r   )r   r   r   r   )r   r   r   r   )r   r	   )r   r   )__name__
__module____qualname____doc__EVENTSr   r   r   r   r   r!   __classcell__r   r   r   r   r   
   s    



r   N)r%   
__future__r   typingr   gradio.components.baser   r   r   r   r   r   <module>   s
    