
    qi                         d Z ddlmZ ddlmZmZ ddlmZmZ e G d de             Z	e G d de             Z
e G d	 d
e             Ze G d de             Zy)z RTVI pipeline frame definitions.    )	dataclass)AnyOptional)	DataFrameSystemFramec                   0    e Zd ZU dZeed<   dZee   ed<   y)RTVIActionFrameaL  Frame containing an RTVI action to execute.

    Parameters:
        rtvi_action_run: The action to execute.
        message_id: Optional message ID for response correlation.

    .. deprecated:: 0.0.75
        Actions have been removed as part of the RTVI protocol 1.0.0.
        Use custom client and server messages instead.
    rtvi_action_runN
message_id)	__name__
__module____qualname____doc__r   __annotations__r   r   str     [/opt/pipecat/venv/lib/python3.12/site-packages/pipecat/processors/frameworks/rtvi/frames.pyr	   r	      s    	  $J$r   r	   c                   "    e Zd ZU dZeed<   d Zy)RTVIServerMessageFramez~A frame for sending server messages to the client.

    Parameters:
        data: The message data to send to the client.
    datac                 :    | j                    d| j                   dS )z7String representation of the RTVI server message frame.z(data: ))namer   )selfs    r   __str__zRTVIServerMessageFrame.__str__*   s    ))GDII;a00r   N)r   r   r   r   r   r   r   r   r   r   r   r       s     I1r   r   c                   :    e Zd ZU dZeed<   eed<   dZee   ed<   y)RTVIClientMessageFramezA frame for sending messages from the client to the RTVI server.

    This frame is meant for custom messaging from the client to the server
    and expects a server-response message.
    msg_idtypeNr   )	r   r   r   r   r   r   r   r   r   r   r   r   r   r   /   s!     K
ID(3-r   r   c                   D    e Zd ZU dZeed<   dZee   ed<   dZ	ee
   ed<   y)RTVIServerResponseFramea  A frame for responding to a client RTVI message.

    This frame should be sent in response to an RTVIClientMessageFrame
    and include the original RTVIClientMessageFrame to ensure the response
    is properly attributed to the original request. To respond with an error,
    set the `error` field to a string describing the error. This will result
    in the client receiving an `error-response` message instead of a
    `server-response` message.
    
client_msgNr   error)r   r   r   r   r   r   r   r   r   r$   r   r   r   r   r"   r"   <   s+     '&D(3-E8C=r   r"   N)r   dataclassesr   typingr   r   pipecat.frames.framesr   r   r	   r   r   r"   r   r   r   <module>r(      s    ' !   8 %i % %  1[ 1 1 	[ 	 	  k    r   