0.10.0 • Published 24 days ago

mineflayer-chatgpt v0.10.0

Weekly downloads
-
License
-
Repository
github
Last release
24 days ago

Build Status Security Status Dependencies Status Coverage Status Published Version

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

Developer's Guide

Build reports: