o
    Jjg                     @   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                   @   sZ   e Zd ZdZedefddZdeee	e
f  de
fddZdedee
ef fd	d
ZdS )!AgentScratchPadChatPromptTemplatez.Chat prompt template for the agent scratchpad.returnc                 C   s   dS )NF )clsr
   r
   O/var/www/html/zoom/venv/lib/python3.10/site-packages/langchain/agents/schema.pyis_lc_serializable
   s   z4AgentScratchPadChatPromptTemplate.is_lc_serializableintermediate_stepsc                 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   thoughtsactionobservationr
   r
   r   _construct_agent_scratchpad   s   
z=AgentScratchPadChatPromptTemplate._construct_agent_scratchpadkwargsc                 K   s   | d}| ||d< |S )Nr   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   langchain_core.agentsr   langchain_core.prompts.chatr   r   r
   r
   r
   r   <module>   s    