Meet Minerva, a GPT-powered Discord bot I built to help students in the study group I mentor learn software development and machine learning.
Since 2021, I have been leading a pro-bono study group where I help students from my alma mater develop their skills and learn how to build and ship products. We have a Discord server with channels dedicated to different areas of study and student projects, and we meet face-to-face every week over a video chat. Anything related to any aspect of software development can be discussed there, though we mainly focus on machine learning and web development. In the group, I encourage people to study a lot, make bold mistakes, ask many questions and help each other. But I have noticed that sometimes, our club members hold back from asking "simple" questions, fearing they might needlessly disturb others. Despite understanding this feeling well, I prefer to avoid this frame of mind because even the simplest of questions can provoke an engaging discussion and deepen the knowledge and understanding of everyone involved. I wanted to empower everyone to seek answers without hesitation, so I built Minerva — an AI assistant based on OpenAI's "gpt-3.5-turbo" model (the same one used in ChatGPT) — to allow members to ask any questions without worrying about disturbing anyone! The bot lives in our Discord server now. To chat with the bot, the members can send a message, as usual, and mention "@Minerva." Check out this interaction to get a feeling of how it works:
The bot maintains an independent discussion in each server channel, differentiates between messages sent by different club members, knows how to mention Discord users, and formats the code in the responses using markdown! The perfect mentor, Minerva, prefers to nudge the student in the right direction instead of solving a problem for them.
The other purpose of building the bot was to answer a club member's request to see how the integration with OpenAI's chat completion model work. I have made this bot for the club members with the club members. Most of the development was done live during our weekly face-to-face meetings. The bot's source code is a valuable reference for anyone wanting to build their own Discord AI chatbot and is available on GitHub. If you want to let Minerva into your Discord server, follow the instructions in the repository's README.
I created an avatar for Minerva using OpenAI's DALL·E and Midjourney. DALL·E was used to iterate over ideas. Midjourney was then used with a hybrid (image and text) prompt to perfect the concept. And for the Minerva banner, I used Canva's fantastic Magic Design tool.