langchain-weather-integration
v0.1.0
Published
LangChain Weather Integration is a **LangChain Tool** that fetches **real-time weather** for any city using the **Open-Meteo API** (free, no API key needed).
Downloads
164
Readme
LangChain Weather Integration
LangChain Weather Integration is a LangChain Tool that fetches real-time weather for any city using the Open-Meteo API (free, no API key needed).
Features
- Real-time weather
- Temperature in Celsius (°C)
- Humidity
- Wind speed
- UV index
- Human-readable weather descriptions
- Works as a LangChain Tool (
WeatherTool)
Installation
npm install langchain-weather-integrationQuick Start
import { WeatherTool } from 'langchain-weather-integration';
async function main() {
const tool = new WeatherTool();
const report = await tool.call('London');
console.log(report);
}
main();Available Data
The tool returns a formatted multi-line weather report. Under the hood, the following fields are produced:
city: stringcountry: stringtemperature: number(°C)feelsLike: number(°C)humidity: number(%)windSpeed: number(m/s)description: string(human-readable)icon: stringuvIndex: numberairQuality: number | null(currentlynull)timestamp: Date
Built With
- TypeScript
- Open-Meteo API
- LangChain
License
MIT
