-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add function calling (tool use) to the Weather Assistant so the AI can actively fetch weather data during conversation instead of relying only on pre-loaded context.
Tools to Implement
get_current_weather(location: str)
- Look up current conditions for a given location
- Return temperature, conditions, humidity, wind, etc.
- Use the app's existing weather API client
get_forecast(location: str)
- Get multi-day forecast for a location
- Return period names, temperatures, conditions
get_alerts(location: str)
- Check active weather alerts for a location
- Return alert titles, severity, description
Implementation Notes
- Use OpenAI's function calling / tool use format via OpenRouter
- Functions should use the app's existing
WeatherServiceand API clients - Handle tool calls in the response loop: call function → send result back → get final response
- Announce final response via Prism (already integrated)
- Graceful error handling if location not found or API fails
- Keep the existing pre-loaded weather context as baseline; tools supplement it
Branch
Work on feature/weather-chat branch.
Key Files
src/accessiweather/ui/dialogs/weather_assistant_dialog.py— add tool definitions and handlingsrc/accessiweather/weather_service.py— existing service to leveragesrc/accessiweather/weather_gov_api_client/— existing API client
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request