!CRMxI:start, crmxi-1.1.0
"Weather dependent greeting"
learn:start
"Raining", https://www.pexels.com/search/raining/
"Sunny", https://www.pexels.com/search/sunny%20day/
"Severe weather", https://concepts.acme.e.g/weather/severe
learn:end
if:start, "weather", https://api.acme.e.g/weather/today/picture
matches, "Sunny", "Hello, what a beautiful day"
matches, "Raining", "Weather joke of the day", https://api.acme.e.g/jokes/weather
matches, "Snow", "Hello, It's snow joke today"
matches, "Severe weather", "Weather warning!", https://concepts.acme.e.g/weather/warnings
else, "Hello"
if:end
!CRMxI:end
If it is sunny say "Hello, what a beautiful day", if raining tell a joke to uplift people's spirits, if snowing greet with snow joke, if severe weather then deliver an appropriate warning, else just say "Hello".
Compiled by Innovation Future Specialist