🌀️

WEATHER

Open-Meteo first β€” no LLM, no hallucinated numbers

When Neo asks for weather, Zion detects the keyword, bypasses the LLM, geocodes the city with Open-Meteo, pulls the forecast JSON, formats temp/humidity/wind/conditions, and replies. If Open-Meteo fails, wttr.in provides a plaintext fallback. Short TTL cache avoids hammering APIs.

A Real Conversation

Structured API path β€” every number is from a real endpoint

@zion weather in Pune 2:14 PM βœ“βœ“ [Zion] 🌀️ Weather β€” Pune, India ━━━━━━━━━━━━━━━━ Clear sky 🌑️ 32Β°C (feels like 34Β°C) πŸ’§ Humidity: 45% πŸ’¨ Wind: 12 km/h NW β˜€οΈ UV Index: 7 (High) Forecast: Tomorrow: Partly cloudy 30Β°C Friday: Thunderstorms 28Β°C 2:15 PM βœ“βœ“ πŸ” click to read full brief NEO πŸ“± instant reply β€” no LLM ZION keyword: β€œweather” skip LLM branch OPEN-METEO geocode β€œPune” β†’ lat/lon forecast JSON (current) no API key required PARSE + FORMAT temp Β· humidity Β· wind WMO weather code β†’ text optional UV index field WhatsApp reply [Zion] 🌀️ factual string Bridge /api/send FALLBACK + CACHE wttr.in if Open-Meteo fails search_cache.db Β· 15 min TTL dedupe identical lookups Weather handler in zion.py β€” deterministic branch

Capability Map

Weather construct β€” fast APIs, smart routing, cache ring

🌀️ WEATHER APIs Open-Meteo geocode + forecast wttr.in plaintext fallback no API key needed HTTPS only, rate-friendly SMART ROUTING keyword detect β†’ skip LLM direct API = fast + accurate no creative temperature branch inside zion.py CACHE search_cache.db (SQLite) 15 minute TTL same city spam guard reduces upstream calls DATA temp Β· humidity Β· wind conditions + codes UV index when present localized city label

Tech Stack

RuntimePython 3 β€” dedicated weather branch in zion.py
Primary APIOpen-Meteo geocoding + forecast (keyless)
Fallbackwttr.in β€” curl-friendly weather text
Cachesearch_cache.db β€” 15 min TTL per query key
RoutingKeyword gate bypasses LLM entirely
DeliveryWhatsApp Bridge /api/send
βœ•
🌀️ WEATHER
@zion weather in Pune
2:14 PM βœ“βœ“
[Zion] 🌀️ Weather β€” Pune, India
━━━━━━━━━━━━━━━━
Clear sky
🌑️ 32°C (feels like 34°C)
πŸ’§ Humidity: 45%
πŸ’¨ Wind: 12 km/h NW
β˜€οΈ UV Index: 7 (High)
Forecast
Tomorrow: Partly cloudy 30Β°C
Friday: Thunderstorms 28Β°C
2:15 PM βœ“βœ“