Skip to content

Geography Quiz Chatbot enables you to play "Guess the capital" & "Guess the country" via SMS or WhatsApp

Notifications You must be signed in to change notification settings

yvesonline/geography-quiz-chatbot

Repository files navigation

🌐 Geography Quiz Chatbot

Synopsis

Geography Quiz Chatbot is a chatbot where users can play 🏙️ Guess the capital (given a country the user must select the correct capital from a range of choices) or 🗺️ Guess the country (given the outlines of a country the user must select the correct country from a range of choices). The questions will be delivered and checked by Python Lambdas. The following short screen recording shows an interaction with the chatbot via WhatsApp.

Link to YouTube

Tech Stack

The chatbot is built on a variety of serverless cloud technologies, namely:

Structure

The project is laid out like this:

├── autopilot
├── data
├── README.md
├── screenshot.png
└── serverless

autopilot contains the Twilio Autopilot definitions. The main file is schema.json located under autopilot/geography-quiz-chatbot/model.

data holds the source files and images (the outlines of the countries) which are used in the geography questions. It also contains a Python script (build-and-upload-images-v2.py) to build the images.

serverless contains the Python Lambdas which ask and evaluate the questions.

Usage & Development

Twilio Autopilot

You can use the Twilio CLI to invoke and test the Twilio Autopilot locally, e.g.:

$ cd autopilot/geography-quiz-bot
$ twilio autopilot:deploy -l debug --target model
$ twilio autopilot:simulate --assistant-sid ASSISTANT-SID

To get help type twilio autopilot --help.

Serverless

Similarily you can use the Serverless CLI to invoke and test the Python Lambdas locally, e.g.:

$ cd serverless/geography-quiz-bot
$ sls invoke local --function capital
$ sls invoke local --function country

To get help type sls --help.

Blog

You can find much more information about the chatbot in my blog post Building a Simple Quiz Chatbot With Twilio Autopilot and Serverless.

About

Geography Quiz Chatbot enables you to play "Guess the capital" & "Guess the country" via SMS or WhatsApp

Topics

Resources

Stars

Watchers

Forks