Weather Process Flow
Identify the City Name
"Aryan, Can you tell me Weather of New York?" Once the weather flow is triggered raw speech is passed to geography package geoPlace Function to identify the place from the raw speech.
Once the location is identified, GetCityName flow is used to get the name of the city from places list. First occurrence of the city is selected.
In case of no city identified, an exception is raised and is handled by defaulting the city to home city.
Get the Weather Details for the City
Once you get the city name, next step is to use the city to have a API call to openweathermap using the pre-defined API key to get the current weather information.
Response of API is captured in JSON dump for further parsing.
Get the Weather Description and Temperature
Once the JSON Dump is received, Aryan parses the JSON file which is enriched with weather information to get the temperature and weather description. This real time information is then provided to Human
Last updated
Was this helpful?