mineflayer-chatgpt
v0.10.0
Published
Mineflayer plugin for sending a message to OpenAI's ChatGPT
Downloads
32
Maintainers
Readme
Mineflayer ChatGPT
Mineflayer ChatGPT is a Mineflayer plugin for sending a message to OpenAI's ChatGPT.
Installation
npm install mineflayer-chatgpt
or as a dependency in package.json file:
"dependencies": {
"mineflayer-chatgpt": "x.y.z"
}
Usage
Load the plugin:
import mineflayerChatgpt from 'mineflayer-chatgpt';
...
bot.loadPlugin(mineflayerChatgpt.chatgpt);
Set the configuration:
const chatGptApiKey = 'sk-1234567890abcdef';
bot.chatgpt.setConfig(chatGptApiKey, {
model: 'gpt-3.5-turbo'
});
Send a message to ChatGPT:
bot.chatgpt.sendMessage('player', 'Hello, could you please tell me how to make a diamond sword in Minecraft?');
Colophon
Build reports: