Skip to content

๐Ÿง™๐Ÿผโ€โ™‚๏ธ Infinite adventures just a call away!

License

Notifications You must be signed in to change notification settings

KNawm/aidungeon-twilio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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 [email protected]: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 - get a free account at play.aidungeon.io.
AIDUNGEON_PASS Your AIDungeon account password - just like the above, you'll get one here.
  1. Run the application
flask run

Alternatively, you can use this command to start the server in development mode. It will reload whenever you change any files.

export FLASK_ENV=development
flask run
  1. (optional) Run ngrok

If you are going to develop or test locally, Twilio won't be able to access localhost directly. You'll need to create a publicly accessible URL using a tool like ngrok to send HTTP/HTTPS traffic to a server running on your localhost.

./ngrok http 5000
  1. Configure Twilio

Enter here and configure your webhook.

That's it!

Contributing

This project is open source and welcomes contributions.

About

๐Ÿง™๐Ÿผโ€โ™‚๏ธ Infinite adventures just a call away!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published