
    7|h                     Z    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e      Zy	)
z Tool for the OpenWeatherMap API.    )Optional)CallbackManagerForToolRun)BaseTool)Field)OpenWeatherMapAPIWrapperc                   h    e Zd ZU dZ ee      Zeed<   dZe	ed<   dZ
e	ed<   	 dd	e	d
ee   de	fdZy)OpenWeatherMapQueryRunz)Tool that queries the OpenWeatherMap API.)default_factoryapi_wrapper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                 8    | j                   j                  |      S )zUse the OpenWeatherMap tool.)r   run)selfr   r   s      l/var/www/html/test/engine/venv/lib/python3.12/site-packages/langchain_community/tools/openweathermap/tool.py_runzOpenWeatherMapQueryRun._run   s     ##H--    )N)__name__
__module____qualname____doc__r   r   r   __annotations__r   strr   r   r   r    r   r   r	   r	      sa    3,10-K)  #D#"	>   QU..*23L*M.	.r   r	   N)r   typingr   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   ,langchain_community.utilities.openweathermapr   r	   r   r   r   <module>r$      s#    &  > )  Q.X .r   