Minerva is a GPT-powered Discord bot built to help students learn software development.
By default, the bot uses the gpt-3.5-turbo-1106
model from OpenAI, which costs
$0.002 per 1K tokens (or roughly 750 common English words).
You can use this online tokenizer from OpenAI to
estimate how many tokens it will take to encode your text.
You can switch to a different OpenAI model by defining the OPENAI_MODEL
environment variable.
For example, OPENAI_MODEL=gpt-4-1106-preview
will make Minerva use the latest GPT-4 model.
To run Minerva, you'll need to:
- install poetry
- create a Discord bot account and obtain the Discord bot token
- create an OpenAI account and get the OpenAI token
- obtain the id of the Discord guild (server) that you want to add the bot to
After you have done this:
- Copy
.env.example
to.env
. - Enter your Discord bot token, OpenAI API key, and Discord guild (server) id into
.env
. The bot will only function within this server. - In the terminal, navigate to the project dir and run:
poetry install
poetry run minerva
You can also run Minerva using docker. To run Minerva in docker, follow the instructions above, but skip poetry
installation and, instead of the commands suggested in step 3, run:
docker compose up
This repository follows the Conventional Commits standard.
MIT