
    Ngo                         d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
mZ  G d de          Z G d	 d
e          ZdS )zTool for the SceneXplain API.    )Optional)CallbackManagerForToolRun)BaseTool)	BaseModelField)SceneXplainAPIWrapperc                   8    e Zd ZU dZ e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__     f/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/scenexplain/tool.pyr
   r
      s8           s(JKKKE3KKKKKr   r
   c                   v    e Zd ZU dZdZeed<   dZeed<    ee	          Z
e	ed<   	 dd	ed
ee         defdZdS )SceneXplainToolzTool that explains images.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_wrapperNr   run_managerreturnc                 6    | j                             |          S )zUse the tool.)r   run)selfr   r   s      r   _runzSceneXplainTool._run   s     ##E***r   )N)r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r   r   r   r   r      s         $$!D#!!!	W    
 */?T)U)U)UK&UUU NR+ ++'/0I'J+	+ + + + + +r   r   N)r   typingr   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r   )langchain_community.utilities.scenexplainr   r
   r   r   r   r   <module>r'      s    # #       > > > > > > ) ) ) ) ) ) % % % % % % % % K K K K K KL L L L Ly L L L+ + + + +h + + + + +r   