Coder Social home page Coder Social logo

ai_twitter_bot's Introduction

AI Twitter bot

AI-reply-tweets bot in any language.

I wrote this bot to make artificial intelligence more accessible to all people. Using a language model, I built a bot that responds to random tweets. Every 20 minutes, the bot responds to a trending tweet. Simply reply to the tweet with the word interesting, tag the bot, and the bot will respond on its own within a few minutes. You can use it in any language, so why not? :)

Follow me on Twitter :)

Twitter Twitter

Tool Setup

Install Python dependencies

Run the following line in the terminal: pip install -r requirements.txt.

Create user configuration

Insert your tokens in the config.py file or edit the usr.cfg file. Create a .cfg file named user.cfg based off .user.cfg.example.

The configuration file consists of the following fields:

  • api_key - Twitter API key generated in the Binance account setup stage.
  • api_secret_key - Binance secret key generated in the Binance account setup stage.
  • t_api_key - Twitter API key generated in the twitter developer portal.
  • t_api_key_secret - Twitter API secret-key generated in the twitter developer portal.
  • t_access_token - Twitter API access token generated in the twitter developer portal.
  • t_access_token_secret - Twitter API secret-access token generated in the twitter developer portal.
  • t_user_name - Twitter username of the authenticator user.
  • openai_api_key - OPENAI API key generated in the openai website.
  • telegram_api_key - Telegram API key generated in the telegram website. (for notification only)

Notifications with Apprise

Apprise allows the bot to send notifications to all of the most popular notification services available such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.

To set this up you need to create a apprise.yml file in the config directory.

There is an example version of this file to get you started.

If you are interested in running a Telegram bot, more information can be found at Telegram's official documentation.

Run

python -m twitter_bot

Acknolegment

The bot structure is heavily aided by binance-trade-bot which you may find in here: watch this repo

Support the Project

Buy Me A Coffee

ai_twitter_bot's People

Watchers

 avatar

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.