Creating an AI Twitterbot

With AIs taking over the web, I wanted to try my hand at creating a Twitterbot. This process involves creating a Python development environment, creating a learning model, training the bot, and then using Tweepy to connect it to an account so it can generate tweets.

I had originally planned on training the model on my old Facebook posts, but I felt a little lazy and didn’t want to worry about .json parsing to get the necessary data. I ended up using a text file of “Time of the Twins” from the Dragonlance fantasy series to train the bot, @elizardbot. My husband is a big fan of these books, so I figured this approach would help him forgive me for locking myself in the office to work on this.

Here’s an example of some AI generated content based off of that learning model:

I used the following two tutorials to configure this environment:

This is an informal step-by-step guide on how to set this up. If you’re new to machine learning or Python, this should be a helpful start.

To get started, you’ll need the following things:

  • A Twitter development account with read/write tokens.
  • A server with dedicated CPUs will greatly shorten the learning time.


code test /sdk/asdasdkjasd/

Leave a Reply

Your email address will not be published. Required fields are marked *