Use ChatGPT in your Discord Server! Chippy v2.0 is currently built for deployment on fly.io.
- Start a new chat with “@Chippy"
- Reply to posts to continue a conversation
- Chippy will reply in any channel
- I would suggest making “chippy-text” and “chippy-images” channels and immediately globally muting them to save your notifications from being spammed.
- Chippy also works inside threads, which are highly encouraged to keep things organized.
Chippy also formats code correctly:
Chippy supports image generation with DALL-E 2 or Stable Diffusion. This feature is disabled by default, as it can quickly become expensive on large servers. Start your message with "@chippy image of" to generate an image. If using Stable Diffusion, you can also specify a preset, such as "neon punk image of". You can list all available presets with "list presets"
- Your first message can start with “you are” to set the context.
- The default is "You are a helpful assistant."
- This uses the "system" tag in the API, as opposed to the "user" or "assistant" tags.
- Chippy won't respond to the context-setting message, so you will need to reply to it with the actual message you want answered.
- Your Chippy will store a stripped-down verison of messages in a local Sqlite database. Ony message text and whether Chippy or a user sent it are stored. This is used for the ability to have conversation threads without recursively calling the Discord API, which is slow and will get the bot rate-limited. These messages are only accessable your Chippy instance.
- Create a Discord Bot
- Be sure to enable all Intents on the Bot tab and give it message reading and writing permissions when generating the join link.
- The icon I used is in the repository as
images/chippy-logo.png
- After Chippy joins, change its role from "Chippy" to "RoleChippy" to prevent people from calling the role instead of the bot.
- Create an OpenAI API Key
- Set up flyctl, the fly.io CLI tool
- Clone the repo
git clone https://github.com/kahnpoint/chippy
- Copy
.env.example
to.env
and fill in the values - In the
fly.toml
, be sure change the app name to something unique and the region to the one closest to you (list of regions here). Do not change themount
values.
- Test it locally by running
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py
- If everything works, run
flyctl deploy --remote-only
to deploy to fly.io. - Depending on usage, you may need to extend the volume's size withfly volumes extend <volume-id> -s <size-in-gb>
. - Chippy is live!
Not affiliated with OpenAI or Microsoft.