o
    Zh                     @   sT   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 G dd deZd	S )
z Tool for the OpenWeatherMap API.    )Optional)CallbackManagerForToolRun)BaseTool)Field)OpenWeatherMapAPIWrapperc                   @   sZ   e Zd ZU dZeedZeed< dZe	ed< dZ
e	ed< 	dd	e	d
ee de	fddZdS )OpenWeatherMapQueryRunz)Tool that queries the OpenWeatherMap API.)default_factoryapi_wrapperZopen_weather_mapnamezA wrapper around OpenWeatherMap API. Useful for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).descriptionNlocationrun_managerreturnc                 C   s   | j |S )zUse the OpenWeatherMap tool.)r	   run)selfr   r    r   d/var/www/html/lang_env/lib/python3.10/site-packages/langchain_community/tools/openweathermap/tool.py_run   s   zOpenWeatherMapQueryRun._run)N)__name__
__module____qualname____doc__r   r   r	   __annotations__r
   strr   r   r   r   r   r   r   r   r      s    
 
r   N)r   typingr   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Zpydanticr   Z,langchain_community.utilities.openweathermapr   r   r   r   r   r   <module>   s    