
    j	                     R    d Z ddlmZmZ ddlmZmZmZmZ ddl	m
Z  G d de      Zy)	zo
Base class for prompts.

Defines abstract interface that both string and chat prompt variants must implement.
    )ABCabstractmethod)AnyDictListOptional   )typesc                      e Zd ZU dZeedefd              Zeedee   fd              Z	eedefd              Z
eedeeeef      fd              Zeedej                  fd              Zeedee   fd              Zeedee   fd	              Zeedee   fd
              Zeedeee      fd              Zeed<   eed<   edededefd       Zedeeef   fd       Zy)
BasePromptz
    Abstract base class for prompts (string and chat).

    All prompt implementations must provide common properties and methods
    for interacting with the backend API.
    returnc                      y)zThe name of the prompt.N selfs    |/Users/manta/Documents/Projects/TheRoad-I1/backend/.venv/lib/python3.12/site-packages/opik/api_objects/prompt/base_prompt.pynamezBasePrompt.name        	    c                      y)z&The commit hash of the prompt version.Nr   r   s    r   commitzBasePrompt.commit   r   r   c                      y)z,The unique identifier of the prompt version.Nr   r   s    r   
version_idzBasePrompt.version_id!   r   r   c                      y)z3The metadata dictionary associated with the prompt.Nr   r   s    r   metadatazBasePrompt.metadata'   r   r   c                      y)z%The prompt type (MUSTACHE or JINJA2).Nr   r   s    r   typezBasePrompt.type-   r   r   c                      y)z+The unique identifier (UUID) of the prompt.Nr   r   s    r   idzBasePrompt.id3   r   r   c                      y)zThe description of the prompt.Nr   r   s    r   descriptionzBasePrompt.description9   r   r   c                      y)z+The description of changes in this version.Nr   r   s    r   change_descriptionzBasePrompt.change_description?   r   r   c                      y)z,The list of tags associated with the prompt.Nr   r   s    r   tagszBasePrompt.tagsE   r   r   __internal_api__prompt_id____internal_api__version_id__argskwargsc                      y)z
        Format the prompt with the provided variables.

        Returns:
            Formatted output. Type depends on the implementation:
            - Prompt returns str
            - ChatPrompt returns List[Dict[str, MessageContent]]
        Nr   )r   r(   r)   s      r   formatzBasePrompt.formatO   s     	r   c                      y)z
        Convert the prompt to an info dictionary for serialization.

        Returns:
            Dictionary containing prompt metadata and version information.
        Nr   r   s    r   __internal_api__to_info_dict__z)BasePrompt.__internal_api__to_info_dict__[   s     	r   N)__name__
__module____qualname____doc__propertyr   strr   r   r   r   r   r   r   prompt_types
PromptTyper   r   r!   r#   r   r%   __annotations__r+   r-   r   r   r   r   r      s    c        C    (4S>2    l--    HSM    Xc]    HSM    htCy)   
 "%$"%%	C 	3 	3 	 	 S#X  r   r   N)r1   abcr   r   typingr   r   r   r    r
   r4   r   r   r   r   <module>r:      s&    $ , , #V Vr   