Your communities personal assistant.
Check out GPT-Engineer! »
Discord-AI is a super smart and versatile AI assistant for Discord communities!
Its primary objective is to serve the specific needs of the GPT Engineer Discord community. This version you see here is the open-source adaptation, allowing anyone to benefit from its awesome features!
Whether you need information, want to chat, interact with documents, code, explore websites, or enjoy some cool Discord-only features, Discord-AI has got your back. It's designed to be user-friendly, customizable, and open source – just the way you like it!
We're all about community here! Join us in making our idea even better. Your thoughts and contributions are always welcome.
Let's level up your Discord experience with Discord-AI, the friendly AI chatbot for everyone! 🤖💬
Before you begin, ensure you have met the following requirements:
- Python 3.10+
- Windows/Linux/MacOS
- Discord App
- Sign up at OpenAI: Visit the OpenAI website and sign up for an account.
- Obtain your API key: Click your profile icon and select "View API keys" from the dropdown menu. Then, click the "Create new secret key" button to generate a new API key.
- Sign up for Pinecone: Visit the Pinecone website and sign up for an account.
- Get your Pinecone API key: After signing up, navigate to your dashboard and obtain your Pinecone API key, index, and environment. Watch this Video Tutorial for assistance.
- Sign up for Railway: Visit the Railway.app website and sign up for an account.
- Create a new project: Follow the official Railway documentation to create a new project.
- Add MongoDB plugin: In your Railway project, add the MongoDB plugin by following the official Railway documentation.
- Get your MongoDB URI: After adding the MongoDB plugin, navigate to the plugin settings and obtain your MongoDB URI. Watch this Video Tutorial for assistance.
To install Discord-AI, follow these steps:
-
Clone the repository:
git clone https://github.com/RareMojo/discord-ai.git
-
Navigate to the project directory:
cd discord-ai
-
Run the start script:
-
For Windows:
start.bat
-
For Linux/Mac:
sh start.sh
-
-
example_.env
|.env
:- You will need to provide Discord Token and API keys for the bot to function properly.
- You also need to provide the Discord server ID, category ID, and threads ID.
- The category ID is the ID of the chat category all of your AI chat channels will be in.
- The threads ID is the ID of the threads channel that will be used for generic agent interaction.
Open
example_.env
file in the root directory of the project, and add your keys:OPENAI_API_KEY=your-key-here DISCORD_TOKEN=your-token-here DISCORD_GUILD_ID=your-server-id-here CHATBOT_CATEGORY_ID=your-aichat-category-id-here CHATBOT_THREADS_ID=your-aichat-threads-id-here OPENAI_MODEL=gpt-3.5-turbo-16k MONGO_URI=your-mongo-uri-here PINECONE_API_KEY=your-pinecone-api-key-here PINECONE_INDEX=your-pinecone-index-here PINECONE_ENV=your-pinecone-env-here
Rename the file to
.env
if you haven't already and save it.
-
configs\config.json
:- You will be prompted to fill out the required parts of this during setup automatically.
- You may directly edit this file to change anything as well.
- If you change something that should be updated with the Discord servers, change
update_bot
to true. - You can also edit most of the config values via the bot terminal.
-
configs\preprompts
:- This is a small preprompt that is injected before chat interactions.
- It maintains small details such as the bot's name and personality.
- You may directly edit this to fit your needs.
-
TMUX (Optional)
:- This is used to run the bot like a service in a separate terminal.
- You can install it by running
sudo apt install tmux
on Linux. - Feel free to use other methods of running the bot in the background.
- TMUX Tutorial
After installation and configuration, the bot will run automatically.
It uses the GPT model to interact with users in the specified Discord channel.
Currently, it can ingest ReadTheDocs URLs and provide help using it as context.
Here is a step-by-step guide on how to use the bot:
-
Channel Setup:
-
Thread Listing:
-
Help DB:
-
Ingest DB:
-
The bot can ingest data into the database.
-
Currently, the only supported data type is ReadTheDocs URLs.
-
Use the
/ingestdb
command followed by the data you want to ingest and a name for the data.
-
-
List DB:
-
AI Chat:
-
Ask DB:
To contribute to Discord-AI, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
- Make your changes and commit them:
git commit -m <commit_message>
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively, see the GitHub documentation on creating a pull request.
I'm grateful to the creators of these open source projects:
- Langchain-Chatbot by Haste171
Their contributions have enhanced and reduced workload for our chat bot's functionality and streamlined documentation.
Thank you, Haste171, for inspiring developers and allowing others to incorporate and use your work.
Discord-AI
is completely open source, licensed under the MIT license.
See LICENSE.md for more information.
Logo was made with the amazing and fun to use Stable Diffusion