Skip to content

jeffreyc2017/tweet-gen-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TweetGenAI

TweetGenAI is a Python-based bot designed to generate and post content automatically to X (formerly Twitter) using OpenAI's GPT models. It leverages the Twitter API for posting and is configurable to post at predefined intervals.

Features

  • Automated tweet generation using AI.
  • Customizable posting intervals.
  • Easy configuration through environment variables.
  • Supports both text-based content generation and potential integration with other APIs for enriched content.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.6+
  • Tweepy
  • python-dotenv

Installation

  1. Clone the repository:
git clone https://github.com/jeffreyc2017/tweet-gen-ai.git
  1. Navigate to the project directory:
cd tweet-gen-ai
  1. Install the required packages:
pip install tweepy python-dotenv openai
  1. Create a .env file in the root directory with your Twitter API credentials and other configuration settings:
API_KEY=your_api_key_here
API_SECRET_KEY=your_api_secret_key_here
ACCESS_TOKEN=your_access_token_here
ACCESS_TOKEN_SECRET=your_access_token_secret_here
BEARER_TOKEN=your_bearer_token

OPENAI_API_KEY=your_openai_api_key

Usage

  1. Modify main.py as needed to customize the tweet generation logic.

  2. Run the bot:

python main.py

Running the tests

To run the tests, execute the following command in the project directory:

python test.py

Deployment

Deployment

Built With

  • Python - The programming language used.
  • Tweepy - An easy-to-use Python library for accessing the Twitter API.
  • python-dotenv - A Python library for managing environment variables.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages