OpenWeather Plugin Configuration
The OpenWeather plugin allows you to get weather data including current conditions, forecasts, historical data, and daily summaries using OpenWeather’s One Call API 3.0.
Prerequisites
- An OpenWeather account
- An OpenWeather API key (specifically for the One Call API 3.0)
Getting an API Key
- Sign up for an OpenWeather account at OpenWeather
- After signing in, go to your API keys page
- Generate a new API key if you don’t have one
- Subscribe to the One Call API 3.0 plan
- Wait for your API key to be activated (can take up to 2 hours)
Configuration
Environment Variables
Add the following to your .env
file:
OPENWEATHER_API_KEY=your_api_key_here
Plugin Configuration
Add the plugin to any agent
Usage
The OpenWeather plugin supports the following actions:
current_forecast
: Get current weather and forecast datatimestamp
: Get historical weather data for a specific datedaily_aggregation
: Get aggregated weather data for a specific dateoverview
: Get a human-readable weather summary
Example Prompts
What's the current weather in London?
What was the weather like in Paris on 2023-01-01?
Give me a weather summary for Tokyo.
What's the temperature in New York in Fahrenheit?
Parameters
city
: Name of the city (if lat/lon not provided)lat
: Latitude coordinate (optional if city provided)lon
: Longitude coordinate (optional if city provided)units
: Temperature units (“Celsius”, “Kelvin”, or “Fahrenheit”)lang
: Language code for weather descriptions (e.g., “en”, “fr”, “es”)date
: Date in YYYY-MM-DD format (required for timestamp and daily_aggregation actions)tz
: Timezone (optional, for daily_aggregation action)
Troubleshooting
Common issues and solutions:
-
403 Unauthorized Error
- Verify your API key is correct
- Check if your API key has been activated (wait 2 hours after creation)
- Ensure you have subscribed to the One Call API 3.0
-
City Not Found
- Check the spelling of the city name
- Try adding the country code (e.g., “London,UK”)
- Use latitude and longitude coordinates instead
-
Invalid Date Format
- Ensure dates are in YYYY-MM-DD format
- Historical data is only available from 1979-01-01
- Future data is limited to 1.5 years ahead
API Limits
- Check your OpenWeather subscription for your specific limits
- Consider implementing rate limiting in high-traffic environments
Support
For issues with the plugin:
- You may open an issue at https://github.com/jmaddington/LibreChat/issues or
- Check the LibreChat Issues
- Review OpenWeather’s API documentation
- Contact OpenWeather support for API-specific issues
Notes
- Temperature values are automatically rounded to the nearest degree
- Default temperature unit is Celsius if not specified