- JavaScript 100%
| src | ||
| index.js | ||
| LICENSE | ||
| manifest.json | ||
| README.md | ||
Weather
Adds a slash command that returns the current weather for a given location.
Supports multiple weather API providers:
- AccuWeather (default) — Requires a free API key.
- MET Norway — No API key required.
- Open-Meteo — No API key required.
- OpenWeatherMap — Requires a free API key.
- wttr.in — No API key required.
Getting API Keys
AccuWeather
- Register on the AccuWeather developer portal.
- Then create an app and get the API key.
It's free for 50 calls per day.
MET Norway
No API key required. Uses the MET Norway Locationforecast 2.0 API which is free for all use.
Note: MET Norway does not provide a "feels like" temperature. When
feelslikeis requested, dew point is shown instead as the closest available proxy.
Open-Meteo
No API key required. Uses the Open-Meteo API which is free for non-commercial use.
OpenWeatherMap
- Register on the OpenWeatherMap website.
- Get the API key from your account page.
The free tier includes 1,000 calls per day.
Note: The API key may take up to ~2 hours to become active after registration and email confirmation.
wttr.in
No API key required.
Installation
Install using SillyTavern's extension installer from the URL:
https://github.com/SillyTavern/Extension-Weather
Usage
Via the function tool
The function tool needs to be enabled in the extension settings first and used with a compatible backend.
If all requirements are met, just ask the model about the current weather or a forecast for your location.
Docs: Function Calling
Get current weather
/weather <location>
Available arguments:
units-metricorimperialcondition- the result should include the weather condition, e.g. "Clear". The default istrue.temperature- the result should include the temperature. The default istrue.feelslike- the result should include the "feels like" temperature. The default isfalse. Only works iftemperatureistrue.humidity- the result should include the humidity. The default isfalse.wind- the result should include the wind speed and direction. The default isfalse.pressure- the result should include the pressure. The default isfalse.visibility- the result should include the visibility. The default isfalse.uvindex- the result should include the UV index. The default isfalse.precipitation- the result should include the precipitation. The default isfalse.
Get weather forecast
/forecast <location>
Available arguments:
units-metricorimperial
Get or set weather provider
/weather-provider [provider]
If no argument is provided, returns the current provider name. If a provider name is given, switches to that provider and returns its name.
Valid providers: accuweather, met-norway, open-meteo, openweathermap, wttr.in
Available arguments:
quiet- suppress the success toast notification on provider update. The default isfalse.
Get or set preferred location
/weather-location [location]
If no argument is provided, returns the current preferred location. If a location is given, sets the preferred location and returns it.
Available arguments:
quiet- suppress the success toast notification on location update. The default isfalse.
Get or set preferred units
/weather-units [units]
If no argument is provided, returns the current preferred units. If units are given, sets the preferred units and returns them.
Valid units: metric, imperial
Available arguments:
quiet- suppress the success toast notification on units update. The default isfalse.
Examples
/weather units=metric condition=true temperature=true feelslike=true humidity=true wind=true pressure=true visibility=true uvindex=true precipitation=true London, UK
/forecast units=imperial Tampa, FL
/weather-provider wttr.in
/weather-provider quiet=true openweathermap
/weather-location London, UK
/weather-units imperial
License
AGPL-3.0