Teneo Developers

Share to

Weather

The Weather solution contains a weather flow that gets the current weather for a city using the free tier Weather API from Openweather.

weather

Core concepts

  • Integration
  • External weather service
  • Extended Teneo Web Chat functionality
  • Slot filling
  • Data actions
  • Match requirements
  • Topic handling
  • Follow ups

Example conversation

User: What is the weather like?
Bot: For which city?
User: Amsterdam
Bot: The weather in Amsterdam is 15.40 °C degrees with light cloud.

User: What is the weather like in Stockholm?
Bot: The weather in Stockholm is 10.00 °C degrees with clear sky.

User: What is the forecast?
Bot: For which city?
User: Barcelona
Bot: The weather in Barcelona is 19.95°C degrees with few clouds.

User: What about London?
Bot: The weather in London is 14.6°C degrees with broken clouds.

User: Do I need my umbrella with me?
Bot: For which city?
User: Barcelona
Bot: You will not need your umbrella. The weather in Barcelona is 19.95°C degrees with few clouds.

User: Do I need my umbrella with me to Istanbul?
Bot: You will need your umbrella. The weather in Istanbul is 25.5°C degrees with rain.

Solution components

NameTypeDescription
WeatherFolderThe solution folder that holds a flow and other folders.
Weather flowFlowA slot filling flow in which allows the user to get the weather by city. The user can also decide to ask for accesories nessecary such as umbrella and sunglasses.
Weather integrationIntegrationAn integration that contains the method to retrieve the weather information from the service. The weather service Openweather is used to get the weather.
weatherAPIGlobal variableThe API key used to communicate with the service.
weatherTemperatureScaleGlobal variableUsed for controlling which temperature scale to use. Contains one letter ‘C’ for Celsius. Change the "C" to an "F" to get Fahrenheit. If left empty it will return the temperature scale in Kelvin.
WeatherOrder GroupThis is an order group for triggers used by the solution.

Make sure you check for possible conflicts before you import this solution into an existing solution (merge solutions).

Download

  1. Download the solution Weather bot.
  2. Import the solution into Teneo studio. We recommend you to import it into a solution that is based on the Teneo Dialogue Resources English.
  3. If you are using the solution together with Teneo Dialog Resources, disable the flow 'The user comments on the weather' in the folder 'Dialogue' -> 'Conversational' -> 'Conversation'. Otherwise, this flow will steal inputs from the solution you are about to import.

Note that this solution Openweather is using the free API which has limited numbers of API requests. If you are planning to use a weather API in a production environment, we advise you to purschase a license.