DEV Community

Tomás Arias
Tomás Arias

Posted on • Updated on

🧙🏼‍♂️ Embark on an adventure, just a call away!

About

Socializing during quarantine is hard, and trapped at home there is only so much that we can do by ourselves, after reading every book in my library and binged every show on Netflix I was out of stories, so what do I do now?

So I built a AI-powered conversational bot to fulfill my lack of stories, not only that but take part on them too. Hey, we all enjoy a good story (or a good laugh)

The Project

GitHub logo KNawm / aidungeon-twilio

🧙🏼‍♂️ Infinite adventures just a call away!

Twilio

aidungeon-twilio

About

This project shows how to integrate a custom machine learning model with an API to build an AI-powered conversational bot that builds a story based on your input.

Set up

Requirements

  • Python 3.4 or newer
  • A Twilio account — sign up
  • A Twilio phone number with Voice capabilities
  • A AIDungeon account — sign up

Local development

After the above requirements have been met:

  1. Clone this repository and cd into it
git clone git@github.com:KNawm/aidungeon-twilio.git
cd aidungeon-twilio
  1. Create a new virtual environment
python3 -m venv venv
venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set your environment variables
cp .env.example .env

Open .env in your favorite text editor and configure the following values.

Config Value Description
TWILIO_ACCOUNT_SID Your primary Twilio account identifier - find this in the console here.
TWILIO_AUTH_TOKEN Used to authenticate - you can get it at twilio.com/console.
AIDUNGEON_EMAIL Your AIDungeon account email

How it works

I used Python with Flask for the backend. It's built on top of the AIDungeon API, you just call and the bot will put together a story protagonized by you, fantasy, zombies, apocalypse, you name it, possibilities are endless.

Challenges

I wanted to work with the model directly but for a lack of time I couldn't (maybe next time?). I enjoyed doing it, and I'll definitely continue working on it improving it and adding features!

Top comments (0)