
    qi                     \    d Z ddlmZmZ ddlmZ ddlmZ  G d de      Z G d de      Z	y	)
zoBase API for HeyGen avatar services.

Base class defining the common interface for HeyGen avatar service APIs.
    )ABCabstractmethod)Any)	BaseModelc                   V    e Zd ZU dZeed<   eed<   eed<   dZeed<   dZeed<   eed<   y)	StandardSessionResponseuB  Standardized session response that all HeyGen avatar services will provide.

    This contains the common fields that the client needs to operate,
    while also storing the raw response for service-specific data access.

    Parameters:
        session_id (str): Unique identifier for the streaming session.
        access_token (str): Token for accessing the session securely.
        livekit_agent_token (str): Token for HeyGen’s audio agents(Pipecat).
        ws_url (str): WebSocket URL for the session.
        livekit_url (str): LiveKit server URL for the session.
    
session_idaccess_tokenlivekit_agent_tokenNlivekit_urlws_urlraw_response)	__name__
__module____qualname____doc__str__annotations__r   r   r        R/opt/pipecat/venv/lib/python3.12/site-packages/pipecat/services/heygen/base_api.pyr   r      s4     OKFCr   r   c                   D    e Zd ZdZededefd       Zededefd       Z	y)BaseAvatarApiz#Base class for avatar service APIs.request_datareturnc                    K   yw)zCreate a new avatar session.

        Args:
            request_data: Service-specific session request data

        Returns:
            StandardSessionResponse: Standardized session information
        Nr   )selfr   s     r   new_sessionzBaseAvatarApi.new_session-         	   r	   c                    K   yw)zClose an avatar session.

        Args:
            session_id: ID of the session to close

        Returns:
            Response data from the close session API call
        Nr   )r   r	   s     r   close_sessionzBaseAvatarApi.close_session9   r   r    N)
r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   *   sH    -	c 	6M 	 	 	c 	c 	 	r   r   N)
r   abcr   r   typingr   pydanticr   r   r   r   r   r   <module>r&      s-   
 $  i 0C r   