U
    hg                     @   sh   d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ G dd deZG d	d
 d
e	ZdS )zTool for the SceneXplain API.    )Optional)CallbackManagerForToolRun)	BaseModelField)BaseTool)SceneXplainAPIWrapperc                   @   s&   e Zd ZU dZedddZeed< dS )SceneXplainInputzInput for SceneXplain..z The link to the image to explain)descriptionqueryN)__name__
__module____qualname____doc__r   r
   str__annotations__ r   r   N/tmp/pip-unpacked-wheel-9gdii04g/langchain_community/tools/scenexplain/tool.pyr      s   
r   c                   @   sT   e Zd ZU dZdZeed< dZeed< ee	dZ
e	ed< deee ed	d
dZdS )SceneXplainToolzTool that explains images.Zimage_explainernamezAn Image Captioning Tool: Use this tool to generate a detailed caption for an image. The input can be an image file of any format, and the output will be a text description that covers every detail of the image.r	   )default_factoryapi_wrapperN)r
   run_managerreturnc                 C   s   | j |S )zUse the tool.)r   run)selfr
   r   r   r   r   _run   s    zSceneXplainTool._run)N)r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r      s   

  r   N)r   typingr   Zlangchain_core.callbacksr   Zlangchain_core.pydantic_v1r   r   Zlangchain_core.toolsr   Z)langchain_community.utilities.scenexplainr   r   r   r   r   r   r   <module>   s   