a
    bŠÝgû  ã                   @   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)ÚBaseTool)ÚFieldN)ÚtextÚreturnc                 C   s   t dƒ t | ƒ d S )NÚ
)Úprint)r   © r   úr/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/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.toolsr   Zpydanticr   r    r   r   r   r   r   r   Ú<module>   s   