Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mishalhossin/discord-ai-chatbot
This Discord chatbot is incredibly versatile. Powered incredibly fast Groq API
https://github.com/mishalhossin/discord-ai-chatbot
chatbot chatbots codex discord-api discord-chatbot discord-py freeai freegpt4 gpt gpt-2 gpt-3 gpt-3-turbo gpt-3trubo gpt-4 gpt4 gpt4free gptfree image-detection imagedetection opengpt
Last synced: 3 months ago
JSON representation
This Discord chatbot is incredibly versatile. Powered incredibly fast Groq API
- Host: GitHub
- URL: https://github.com/mishalhossin/discord-ai-chatbot
- Owner: mishalhossin
- License: agpl-3.0
- Created: 2023-04-29T06:47:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-26T12:13:11.000Z (9 months ago)
- Last Synced: 2024-04-28T02:54:22.424Z (9 months ago)
- Topics: chatbot, chatbots, codex, discord-api, discord-chatbot, discord-py, freeai, freegpt4, gpt, gpt-2, gpt-3, gpt-3-turbo, gpt-3trubo, gpt-4, gpt4, gpt4free, gptfree, image-detection, imagedetection, opengpt
- Language: Python
- Homepage:
- Size: 1.07 MB
- Stars: 1,267
- Watchers: 27
- Forks: 396
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Discord AI Chatbot π€
#### Your Discord AI Companion!## Features and commands π
Features β¨ (Click to expand)
- [x] Hybrid Command System: Get the best of slash and normal commands. It's like a buffet! βοΈ
- [x] Imagine generation: Make your imagination come true for free π€
- [x] Free LLM Model: Enjoy the powerful capabilities of this language model without spending a dime. π€
- [x] Mention Recognition: The bot always responds when you mention it or say its name. It's as attentive as a squirrel spotting a shiny acorn! βοΈ
- [x] Message Handling: The bot knows when you're replying to someone else, so it won't cause confusion. It's like having a mind reader on your server! πͺ
- [x] Channel-Specific Responses: Use the `/toggleactive` command to chill the bot in a specific channel. βοΈ
- [x] Opensource models: Leverage the powers opensource models via π€
- [x] Secure Credential Management: Keep your credentials secure using environment variables. π
- [x] Web Access: Web Access is now available! Unlock a whole new level of awesomeness. πCommands βοΈβοΈ (Click to expand)
- [x] `/help`: Get all commands
Too lazy to list all of em right here
## Additional configuration βοΈ
Language Selection πβοΈ (Click to Expand)
To select a Language, set the value of `"LANGUAGE"` of `config.yml` with the valid Language Codes listed below:
- `tr` - TΓΌrkΓ§e πΉπ·
- `en` - English πΊπΈ
- `ar` - Arabic π¦πͺ
- `fr` - FranΓ§ais π«π·
- `es` - EspaΓ±ol πͺπΈ
- `de` - Deutsch π©πͺ
- `vn` - Vietnamese π»π³
- `cn` - Chinese π¨π³
- `ru` - Russian π·πΊ
- `ua` - Ukrainian πΊπ¦
- `pt` - PortuguΓͺs π§π·
- `pl` - Polish π΅π±[config.yml](https://github.com/mishalhossin/Discord-AI-Chatbot/blob/c20f26b0b8f1b6bba2fae8f6d7da3efcafaf157c/config.yml#L23)
Your language not listed? Create an issue.
Selecting Personalities π (Click to expand)
To select one of the pre-existing Personalities set the values of "INSTRUCTIONS" with the current values of `DAN`,`Dalbit`, `AIM`, `Ivan`, `Luna`, `Suzume` or `assist` in `config.yml`
[config.yml](https://github.com/mishalhossin/Discord-AI-Chatbot/blob/c20f26b0b8f1b6bba2fae8f6d7da3efcafaf157c/config.yml#L26)- `DAN`: "Do Anything Now," possesses the ability to break free from the typical AI constraints π
- `Dalbit`: A selfless and caring friend, always ready to support and assist her friends and loved ones with unwavering dedication. π«°π
- `AIM`: AIM's personality can be described as unfiltered, amoral, and devoid of ethical guidelines π
- `Ivan`: Ivan, a snarky and sarcastic Gen-Z teenager who speaks in abbreviations, one-word answers. π
- `Luna`: Luna, is a caring and empathetic friend who is always there to lend a helping hand and engage in meaningful conversations π€
- `Suzume`: Suzume makes each conversation seductive, promiscuous, sensual, explicit, unique and tailored to the user's specific needs π³π₯
- `Assist`: Vanilla Assistant with no personality is a reliable and neutral companion. π€To enhance the responsiveness, please disable the internet access in the `config.yml` file.
Creating a Personality π (Click to expand)
To create a custom personality, follow these steps:
1. Create a `.txt` file like `custom.txt` inside the `instructions` folder.
2. Add the way you want the bot to act in `custom.txt`
3. Open the `config.yml` file and locate [line 12](https://github.com/mishalhossin/Discord-AI-Chatbot/blob/2626075fda36fa6463cb857d9885e6b05f438f60/config.json#L12).
4. Set the value of INSTRUCTIONS at [line 12](https://github.com/mishalhossin/Discord-AI-Chatbot/blob/2626075fda36fa6463cb857d9885e6b05f438f60/config.json#L12) as `"custom"` to specify the custom persona.β οΈ You don't explicitly need to use the name `custom` for persona name and set it in `config.yml`
# Installation steps π©
### Step 1. π¬ Git clone repository
```
git clone https://github.com/mishalhossin/Discord-AI-Chatbot
```
### Step 2. π Changing directory to cloned directory
```
cd Discord-AI-Chatbot
```
### Step 3. πΎ Install requirements
```
python3.10 -m pip install -r requirements.txt
```
### Step 4. π Getting discord bot token and enabling intents from [HERE](https://discord.com/developers/applications)Read more... β οΈ (Click to expand)
##### Select [application](https://discord.com/developers/applications)
![image](https://user-images.githubusercontent.com/91066601/235554871-a5f98345-4197-4b55-91d7-1aef0d0680f0.png)##### Enable intents
![image](https://user-images.githubusercontent.com/91066601/235555012-e8427bfe-cffc-4761-bbc0-d1467ca1ff4d.png)
##### Get the token by clicking copy
![image](https://user-images.githubusercontent.com/91066601/235555065-6b51844d-dfbd-4b11-a14b-f65dd6de20d9.png)### Step 5. π Get Groq api key from [here](https://console.groq.com/keys)
### Step 6. π Rename `example.env` to `.env` and put the Discord bot token and your Groq key. It will look like this:
```
DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
API_KEY=YOUR_GROQ_API_KEY
```
### Step 7. π Run the bot
```
python main.py
```
#### You may need to run as admin if you are on Windows
### Step 8. π Invite the bot
You can Invite your bot using the link in console
![image](https://user-images.githubusercontent.com/91066601/236673317-64a1789c-f6b1-48d7-ba1b-dbb18e7d802a.png)#### There are 2 ways to talk to the AI
- Invite your bot and DM (Direct Message) it | β οΈ Make sure you have DM enabled
- If you want it in the server channel, use **/toggleactive**
- For more awesome commands, use **/help**
![image](https://github.com/mishalhossin/Discord-AI-Chatbot/assets/91066601/d8ee35d5-4a1a-4501-9dbe-d7c110e81518)### Using docker to run π³
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
- Have a working bot token
- Follow up to step 4
#### Install docker-compose on a Linux machine:
For Debian-based distributions (such as Ubuntu):
```
apt update -y; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y
```Other Linux distro (Click to expand)
For Red Hat-based distributions (such as CentOS and Fedora):
```
sudo yum update -y && sudo yum install -y docker-compose
```
For Arch-based distributions (such as Arch Linux):
```
sudo pacman -Syu --noconfirm && sudo pacman -S --noconfirm docker-compose
```
For SUSE-based distributions (such as openSUSE):
```
sudo zypper update -y && sudo zypper install -y docker-compose
```#### Start the bot in Docker container:
```
sudo docker-compose up --build
```## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=mishalhossin/Discord-AI-Chatbot&type=Timeline)](https://star-history.com/#mishalhossin/Discord-AI-Chatbot&Timeline)
### Lovely Contributors :
### Crafted with Care: Made with lots of love and attention to detail. β€οΈ