mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-05 09:25:14 +03:00
2.2 KiB
2.2 KiB
In [ ]:
from langchain.document_loaders import WeatherDataLoaderIn [ ]:
#!pip install pyowmIn [ ]:
# Set API key either by passing it in to constructor directly
# or by setting the environment variable "OPENWEATHERMAP_API_KEY".
from getpass import getpass
OPENWEATHERMAP_API_KEY = getpass()In [ ]:
loader = WeatherDataLoader.from_params(
["chennai", "vellore"], openweathermap_api_key=OPENWEATHERMAP_API_KEY
)In [ ]:
documents = loader.load()
documents