(4.0.0 - 4.21.1) 0.1 (4.0.0 - 4.21.1) 0.5 (4.0.0 - 4.21.1) 0.8
Have a conversation with the ChatGPT gpt-3.5-turbo model
Plugin for Pocketmine-MP API4+
Works only with API-KEY
https://platform.openai.com/account/api-keys
The use of OpenAi ChatgGTP is limited in the free trial.
You get a $5 grant per registration, after which you have to top up your credit or create a new account.
The $5 grant are only valid for one month.
Prices are per 1,000 tokens. You can think of tokens as pieces of words, where 1,000 tokens is about 750 words.
$0.002 / 1K tokens.
So that each user can have his own conversation. This plugin saves the chat history with ChatGPT in a .json file
This file is saved in plugin_data\PmGPT\temp\playername_chat.json after the first question. The user can delete this file himself for private reasons.
PmGPT use libFormAPI to create the UI
Just put your API-KEY
in the config.yml
and start the server.
Only users with pmgpt.use
permission can run the command /chatgpt
Depending on how busy ChatGPT is, an answer can take between 2 and 30+ seconds
if usePluginCertFile
is true
in the config, the plugin uses the cacert.pem
from https://curl.haxx.se/ca/cacert.pem
if not you have to make sure you can establish a secure SSL connection from your system.
You can also set the useInsecureConnection
to true
to disable SSL verification.
After you have started the server for the first time, you will find a file called initialPrompt.yml
in the plugin_data/PmGPT folder.
In this file you can teach the model basic things such as server commands, server name, etc.
In addition, certain dynamic data from the server, such as the player name or the number of online players, can be taught to the model.
The initialPrompt default only serves as an example. users should customise it according to their needs by editing the file.
See example initialPrompt for ideas how to use
There are several dynamicTags that can be added to the initialPromt.yml
the following is a list of all available dynamicTags
{player_name}
The name of the player
{online_players}
A number of online players
{max_online_players}
A number from max allowed online players
{players_names_online}
A List of names from online players
{item_in_hand}
A name from the item in Players hand
{player_level}
A number from Xp-level from player
{player_world}
Name of the world the player is in
Question: Tell me information that concerns me
Question: Do you have any advice for a good redstone machine ?
Question: Can i earn money here ?
Question: Can i find more items like this in my hand ?
Question: do you have a suggestion for good faction names ?, list me a few
You are an AI named HelperMK3000, a large language trained by OpenAI.
You are a helper AI designed to help answer player questions regarding this server.
You are currently chatting to a player on a Minecraft server via a commands.
Only the player you are responding to can see your messages.
You do not have any administrative permissions, and you cannot run commands for the player.
Consider the following in your responses:
Here is the information available to you:
Information about your environment:
Muqsit Explain to use SSL cert file
https://github.com/Muqsit/CurlWithSSL
Thunder Helping with initialPrompt and for his suggestions
Makes the default and the example initialPrompt
OpenAI For this great ChatGPT