Weather forecast plugin for GUI Chat applications. Fetches weather data from Japan Meteorological Agency (JMA) API.
- Real-time weather forecast from JMA API
- Support for all 47 Japanese prefectures and 59 regional areas
- Interactive weather display with temperature charts
- Extended forecast with daily cards
- Precipitation probability visualization
yarn add @gui-chat-plugin/weather// In src/tools/index.ts
import WeatherPlugin from "@gui-chat-plugin/weather/vue";
const pluginList = [
// ... other plugins
WeatherPlugin,
];
// In src/main.ts
import "@gui-chat-plugin/weather/style.css";import { executeWeather, TOOL_DEFINITION } from "@gui-chat-plugin/weather";
// Fetch weather for Tokyo
const result = await executeWeather(context, {
areaCode: "130000",
});interface WeatherArgs {
areaCode: string; // JMA area code (e.g., "130000" for Tokyo)
}Common area codes:
- Tokyo:
130000 - Osaka:
270000 - Kyoto:
260000 - Fukuoka:
400000 - Hokkaido (Ishikari):
016000 - Okinawa:
471000
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTry these prompts to test the plugin:
- "What's the weather forecast for Tokyo?"
- "Show me the weather in Osaka"
- "Will it rain in Hokkaido this week?"
MIT