aiChan Discord Bot
Project Duration: Dec 2022 - Apr 2023 Bot is still maintained, just not under active development.
When I saw the new ChatGPT thing, I thought it might be a good idea to allow my friends on discord to interact with it. So I wrote the original aiChan with OpenAI’s text completion API. With the release of the Chat API, I used discord threads for each conversation, and used Redis to store the conversation for 48 hours. On subsequent requests on the same thread, aiChan will send the past conversation to openAI for context.
I was able to get the whole project working very fast using the power of golang.
I added the bot to my university class server, which it got very popular. Thankfully OpenAI’s moderation endpoint is free and I was able to stop some abusive prompts.