SoilAPT is a Discord bot made for friends and intended to be used on our Discord server. But if you're interested, you can reuse it and self host it (pretty easy using Docker, too). It uses ChatGPT and has basically 2 functions:
- Start a message with
@SoilAPT
to prompt something to ChatGPT as you normally would. - Create a response message starting with
@SoilAPT
from another message and prompt something about it as context. The bot will get all the responses of responses too, so you can have a conversation as in the web UI. - SoilAPT comes with a variety of personalities you can switch to using Discord slash commands (all for french language for now), and you can add more yourself by editing the persona file
ℹ️ The first persona of that list will be considered the default personality. When changing SoilAPT's personality, it will keep it until nobody prompted it for one hour. After that, it will go back to its default personnality.
- Create a Discord App in the developer portal
- Create a link to invite your bot in your server
- Create an account and get an API key from OpenAi
- get the following files from this repository:
.env.dist
docker-compose.yaml
- copy and rename the environment file
cp .env.dist .env
- edit it with your own keys and values
- run with docker compose
docker compose up
Edit the environment file as above with values from your development Discord server
To start the API, use the following command
cd api && bun api:dev
This will start the server on localhost:API_PORT
(by default, port 3001)
Deploy the commands on you dev server (only the first time and each time you create a new command):
- Get your dev server ID
- Add it as
DISCORD_GUILD_ID
in your environment or.env
file - run the command deployment script.
⚠️ The API should be online as the bot needs the list of personas available.
cd bot && bun bot:deploy
Start the bot in watch mode
cd bot && bun bot:dev
/TBD