mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 09:55:21 +03:00
3.1 KiB
3.1 KiB
In [ ]:
pip install pyowmIn [35]:
import os
os.environ["OPENWEATHERMAP_API_KEY"] = ""In [36]:
from langchain.utilities import OpenWeatherMapAPIWrapperIn [37]:
weather = OpenWeatherMapAPIWrapper()In [38]:
weather_data = weather.run("London,GB")In [39]:
print(weather_data)In London,GB, the current weather is as follows:
Detailed status: overcast clouds
Wind speed: 4.63 m/s, direction: 150°
Humidity: 67%
Temperature:
- Current: 5.35°C
- High: 6.26°C
- Low: 3.49°C
- Feels like: 1.95°C
Rain: {}
Heat index: None
Cloud cover: 100%