o
    wi                     @   sd   d dl mZmZ d dlmZ d dlmZmZ dZdZ	G dd deZ
eee
ded	e
fd
dZdS )    )CutMixedCut)registered_prompt_format_fn)ModalityPromptFormatterz<SPECIAL_10>z<SPECIAL_11>c                   @   sh   e Zd ZdZdZde dZde ddej	idd	de d
dej	idee ddej	idiZ
dS )NemotronHPromptFormatterz
nemotron-h	assistant
z
Assistant
systemzSystem
|message|message)templateslotsuserzUser
|message|z	|message|N)__name__
__module____qualname__NAMEOUTPUT_ROLETURN_BOSINFERENCE_PREFIX
SYSTEM_BOSr   TextTEMPLATE r   r   g/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/nemo/collections/common/prompts/nemotron_h.pyr      s(    
r   cutpromptc                 C   s   t | tr| j} g }d}| dr| j}|d|d | dr%| j}nd}|d|d | jd j }d urA|d|d |	|S )	N system_promptr
   )rolecontentcontextr   r   r   )

isinstancer   first_non_padding_cut
has_customr   appendr!   supervisionstextencode_dialog)r   r   turnsr
   ctxanswerr   r   r   
nemotron_h2   s   



r,   N)
lhotse.cutr   r   &nemo.collections.common.data.prompt_fnr   )nemo.collections.common.prompts.formatterr   r   r   r   r   r,   r   r   r   r   <module>   s   