adammoro / tweet-gpt

Use GPT-4 to generate tweets and post them to a Twitter account.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TweetGPT

This is a simple Python script that uses OpenAI's Chat API to generate tweets and post them to a Twitter account. Before you run this script, make sure to follow these steps:

  1. Set up a Twitter Developer account and create a new app: https://developer.twitter.com/en/apps
  2. Get the API keys and access tokens for your Twitter app
  3. Install the necessary libraries (tweepy and openai) using pip: pip install tweepy pip install openai
  4. Set it and forget it with a cron job

See it in action!

I use this script for a Twitter account called Reel Riddles that posts riddles about scenes from popular movies. The script itself works great but the prompt could use some engineering. Have fun!

About

Use GPT-4 to generate tweets and post them to a Twitter account.

License:MIT License


Languages

Language:Python 100.0%