o
    i
                     @   s&   d Z ddlmZ dZG dd dZdS )z-
This module contains the EventEncoder class
    )	BaseEventz!application/vnd.ag-ui.event+protoc                   @   sR   e Zd ZdZddefddZdefddZd	edefd
dZd	edefddZ	dS )EventEncoderz0
    Encodes Agent User Interaction events.
    Nacceptc                 C   s   d S N )selfr   r   r   [/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/ag_ui/encoder/encoder.py__init__   s   zEventEncoder.__init__returnc                 C   s   dS )z:
        Returns the content type of the encoder.
        ztext/event-streamr   )r   r   r   r   get_content_type   s   zEventEncoder.get_content_typeeventc                 C   s
   |  |S )z#
        Encodes an event.
        )_encode_sser   r   r   r   r   encode   s   
zEventEncoder.encodec                 C   s   d|j ddd dS )z6
        Encodes an event into an SSE string.
        zdata: T)by_aliasexclude_nonez

)model_dump_jsonr   r   r   r   r      s   zEventEncoder._encode_sser   )
__name__
__module____qualname____doc__strr	   r   r   r   r   r   r   r   r   r   	   s    r   N)r   ag_ui.core.eventsr   AGUI_MEDIA_TYPEr   r   r   r   r   <module>   s    