U
    h                     @   s\   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 e
dddd	ZG d
d de	ZdS )zTool for asking human input.    )CallableOptional)CallbackManagerForToolRun)Field)BaseToolN)textreturnc                 C   s   t d t |  d S )N
)print)r    r   H/tmp/pip-unpacked-wheel-9gdii04g/langchain_community/tools/human/tool.py_print_func
   s    r   c                   @   sx   e Zd ZU dZdZeed< dZeed< edd dZ	e
egd	f ed
< edd dZe
ed< deee edddZd	S )HumanInputRunzTool that asks user for input.ZhumannamezYou can ask a human for guidance when you think you got stuck or you are not sure what to do next. The input should be a question for the human.descriptionc                   C   s   t S N)r   r   r   r   r   <lambda>       zHumanInputRun.<lambda>)default_factoryNprompt_funcc                   C   s   t S r   )inputr   r   r   r   r      r   
input_func)queryrun_managerr   c                 C   s   |  | |  S )zUse the Human input tool.)r   r   )selfr   r   r   r   r   _run   s    
zHumanInputRun._run)N)__name__
__module____qualname____doc__r   str__annotations__r   r   r   r   r   r   r   r   r   r   r   r   r      s   

  r   )r   typingr   r   Zlangchain_core.callbacksr   Zlangchain_core.pydantic_v1r   Zlangchain_core.toolsr   r    r   r   r   r   r   r   <module>   s   