@gui-chat-plugin/weather
v0.0.2
Published
Weather forecast plugin for GUI Chat - Japan Meteorological Agency
Readme
@gui-chat-plugin/weather
Weather forecast plugin for GUI Chat applications. Fetches weather data from Japan Meteorological Agency (JMA) API.
Features
- 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
Installation
yarn add @gui-chat-plugin/weatherUsage
Vue Integration
// 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";Core-only Usage
import { executeWeather, TOOL_DEFINITION } from "@gui-chat-plugin/weather";
// Fetch weather for Tokyo
const result = await executeWeather(context, {
areaCode: "130000",
});API
WeatherArgs
interface WeatherArgs {
areaCode: string; // JMA area code (e.g., "130000" for Tokyo)
}Area Codes
Common area codes:
- Tokyo:
130000 - Osaka:
270000 - Kyoto:
260000 - Fukuoka:
400000 - Hokkaido (Ishikari):
016000 - Okinawa:
471000
Development
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTest Prompts
Try 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?"
License
MIT
