Hey all,
I'm sharing the code for a simple, rudimentary Discord bot that you can ask questions to and get answers from for the GPT-3.5 and GPT-4 models.
I've been using my own Discord bot for months now, but I never put it out in public, mainly because it's rudimentary and bad. I decided to change that at 2am in the morning.
I cleaned up my code slightly, added comments to all of my code (with the help of a certain something), and turned it more or less into a nice learning resource for how to create a Discord bot, and how to utilize an API. It serves as a nice starting point for you, or other people, to turn this bot into something greater.
I personally use it to get away with asking GPT-4 things while in lectures, so it doesn't look like I'm blatantly using ChatGPT to the kid sitting right next to me.
It doesn't support back-and-forth chatting right now, simply because I never found the need for that- I'll implement it later, it's a quick and easy fix. I'll also implement other features as necessary, if anyone actually ends up using this repo.
You will need your own Discord bot token and OpenAI API key. If you don't have access to GPT-4, attempting to ask it a question will throw an error.