Giter Site home page Giter Site logo

twittertron's Introduction

TwitterTron

A automated twitter persona agent powered by GenAI who tweets twice a day.

Requirements to run the project

Running up the project

  • Fork the repository
  • Setup the environment secrets for github action.

Adding environment secrets for github action

  1. Go to the settings section of you forked repository.

  2. Navigate to Secrets and variable on the left bar and click Actions.

  3. Add the following environment with exact name.

    • For accessing twitter account to tweets

      • ACCESS_TOKEN
      • ACCESS_TOKEN_SECRET
      • AUTHENTICATION_BEARER_TOKEN
      • CONSUMER_KEY
      • CONSUMER_SECRET
    • For LLM agent to decide what to tweet (you can configure it in prompt.py file)

      • GOOGLE_API_KEY

    Secret Variables

    For more info on how to access secret panel, read the docs

Local Setup

  1. Clone the repository git clone https://github.com/Mohwit/TwitterTron.git

  2. After cloning the repository, install the required packages using the following command:

pip install -r requirements.txt

  1. Create a .env file and add you secret varibles there with following name:

    • ACCESS_TOKEN = XXX
    • ACCESS_TOKEN_SECRET = XXX
    • AUTHENTICATION_BEARER_TOKEN = XXX
    • CONSUMER_KEY = XXX
    • CONSUMER_SECRET = XXX
    • GOOGLE_API_KEY = XXX
  2. Run the main.py file with the command python main.py

Note: It will tweet each time you will run the main.py file.

twittertron's People

Contributors

mohwit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

twittertron's Issues

Alternative to store history of tweets instead of pickle file which is currently used!

Need a better way to store history of conversation with the LLM which is used to maintain context of what tweets has been already done and also helps in deciding the next tweet.

  • Currently a pickle file is used, but if anything goes wrong while writing the new current response in file, all the history will be lost.
  • Need a better approach, so that we host this data online.

Ability to post a thread

Currently, the bot can post only one tweet at a time as we have a limit of 280 character for tweets, we want to provide bot the ability to post threads so that it can post more detailed and useful content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.