a
    ag                     @   sD   d dl mZmZmZmZ d dlmZ d dlmZ G dd deZ	dS )    )AnyDictListTuple)AgentAction)ChatPromptTemplatec                   @   sV   e Zd ZdZeedddZeee	e
f  e
dddZeee
ef dd	d
ZdS )!AgentScratchPadChatPromptTemplatez.Chat prompt template for the agent scratchpad.)returnc                 C   s   dS )NF )clsr
   r
   e/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain/agents/schema.pyis_lc_serializable
   s    z4AgentScratchPadChatPromptTemplate.is_lc_serializable)intermediate_stepsr	   c                 C   sF   t |dkrdS d}|D ]"\}}||j7 }|d| d7 }qd| S )Nr    z
Observation: z

Thought: zhThis was your previous work (but I haven't seen any of it! I only see what you return as final answer):
)lenlog)selfr   ZthoughtsactionZobservationr
   r
   r   _construct_agent_scratchpad   s    
z=AgentScratchPadChatPromptTemplate._construct_agent_scratchpad)kwargsr	   c                 K   s   | d}| ||d< |S )Nr   Zagent_scratchpad)popr   )r   r   r   r
   r
   r   !_merge_partial_and_user_variables   s
    
zCAgentScratchPadChatPromptTemplate._merge_partial_and_user_variablesN)__name__
__module____qualname____doc__classmethodboolr   r   r   r   strr   r   r   r   r
   r
   r
   r   r      s   r   N)
typingr   r   r   r   Zlangchain_core.agentsr   Zlangchain_core.prompts.chatr   r   r
   r
   r
   r   <module>   s   