back to tutorials

How to Use ChatBotKit Skillsets to Create a Weather Forecast Bot

Learn how to create a weather forecast bot using ChatBotKit's skillsets. Follow the step-by-step guide to create a skillset and an ability to get weather information using API requests.

To create a bot that can accurately tell the weather forecast, we need to follow the steps below:

  1. Create a Skillset in ChatBotKit.
  2. Create an ability named "get_weather" with the description "Get the weather of the provided location."
  3. Set the ability instruction to:
To get the weather you need to perform the following request: ```fetch GET https://wttr.in/{location}?format=4 HTTP/1.1 User-Agent: curl/7.61.1 ``` The {location} parameter could be any city. For example: ```fetch GET https://wttr.in/London?format=4 HTTP/1.1 User-Agent: curl/7.61.1 ``` Multiple locations can be requested like this: ```fetch GET https://wttr.in/{London,Paris}?format=4 HTTP/1.1 User-Agent: curl/7.61.1 ``` The response is a text document with weather information.

Note that we are simply describing how we want to perform requests to obtain the necessary information. Additionally, we use a special action called "fetch" to instruct your bot to retrieve information from another webpage.

Once the skillset and the ability are set, we can start using it in our conversational AI agents. Simply select the skillset in your Bot or Integration.

Now we can ask questions such as "What is the weather in London?" and the bot will be able to provide us with accurate weather information.