/elon-bot

Discord AI bot capable of chatting and moderating, trained on conversation transcripts of Elon Musk

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

GitHub Issues Forks GitHub Stars Contributors

ElonBot: The Discord AI Bot for Chatting and Moderation


This repo contains code to create an AI replica of Elon Musk that can chat and moderate user interactions on Discord. Its conversation abilities come from Microsoft's DialoGPT conversational model that I fine-tuned on conversation transcripts of Elon Musk's appearance on the Joe Rogan Experience, the Lex Fridman Podcast and a Clubhouse interview. Its moderation abilities come from Unitary's Multilingual Toxic Comment Classifier allowing it to assess the toxicity of a message, warn users when they're using foul language and kick them out of the server after 3 strikes.

Try It Out!

Wanna try it out? Here's an invite link to the Discord server (read message history is disabled).

⚠️ Warning: give Elon around 2 minutes to get connected to his brain over at Hugging Face. Until then, he'll spew some nonsense about how his brain has overheated.

Invite link: https://discord.gg/kTgvqAWWx8

Demo

Here is a demo of a conversation about Tesla:


Here is a demo of a conversation about colonizing Mars:


Here is a demo of a conversation about bitcoin and dogecoin, along with an example of an abusive user getting kicked out:


You can also directly chat with the model hosted on Hugging Face's Model Hub:


Abilities in Detail

  • Intelligent(ish) chatting
  • Automated responses to messages about bitcoin and dogecoin
  • Detecting toxic messages in multiple languages and reacting to them
  • Kicking users out of server after 3 instances of toxic messages
  • Tells users how many strikes they have (message !kick to use this functionality)

Repository Structure

  • data: Folder containing webscraped transcripts from Elon's interviews on Clubhouse and the Lex Fridman podcast, as well as a ready-to-use dataset retrieved from Kaggle of Elon's interview on the Joe Rogan Experience
  • elon_bot.ipynb: Notebook for processing transcripts, fine tuning the DialoGPT model on the Elon's interview transcripts and pushing the fine-tuned model to Hugging Face
  • main.py: Python script for all Discord bot functionalities
  • keep_alive.py: Python script allowing bot to stay up

Credit

None of this work would have been possible without the following immensly valuable public contributions:

Contributing

Any contributions you make are really helpful!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingContribution)
  3. Commit your Changes (git commit -m 'Add some AmazingContribution')
  4. Push to the Branch (git push origin feature/AmazingContribution)
  5. Open a Pull Request

Reporting Issues

Does something seem off? Make sure to report it.