A proof of concept for controlling a Minecraft Non-Player Characters using OpenAI and GPT-3.
.env
file and copy your OpenAI API key and save itCODEX_API_KEY=<your_api_key>
https://slides.com/wassimchegham/playing-minecraft-artificial-intelligence-open-ai-gpt-3-javascript
Here is how to start the Minecraft server:
From your terminal, run the following commands:
npm install
npm start -- --port [PORT]
In a few seconds, you should see a message that the bot is running, and you should see the NPC pop up in Minecraft.
Inside the Minecraft client, press the T
key to open the chat box.
There are mulptiple supported contexts:
empty
: An empty context (default).simple
: A basic context.advanced
: A more complex context.To load a context, type load context [context_name]
.
You can also reset the current context by typing reset context
.
This is a proof of concept. It is not intended to be used in production.
If you are using WSL, you may need to provide the host computer's IP address to the bot.
npm start -- --port [PORT] --host [HOST]
To get the IP address of your host computer, run the following command:
wsl.exe hostname -I