Mirai OpenAI GPT-3 ChatBot Plugin
This is a Mirai ChatBot plugin based on OpenAI GPT-3 API.
Download the JAR file from https://github.com/RIvance/mirai-openai-gpt-chatbot/releases
Copy the JAR file to
$MCL_ROOT/config/org.ivance.chatbot/ChatBotPluginConfig.ymlconfig file with your OpenAI API key, like:
# Your OpenAI API key, starts with `sk-`. # See https://beta.openai.com/account/api-keys token: sk-kA6y0qWzk6lFEq7SVTr7bpHoduNI9bheqUNkbQm7ZJjG39BA
Add the trigger prefixes / trigger keywords to the
triggerWordslist, for example:
# Prefixes used to trigger the response. # e.g. "/chat How are you today?" triggerPrefixes: - '/chat' - '/聊天' # Keywords used to trigger the response. # e.g. "What is GPT3?" triggerWords: - 'what is' - 'how to' - '为什么' - '怎样'
Q & A
How to register an OpenAI account in China?
How to get an OpenAI API Key?
Why is the reply incomplete?
Please change the
maxToken attribute in the config file:
# The maximum number of tokens to generate. # Requests can use up to 2048 tokens shared between prompt and completion. # (One token is roughly 4 characters for normal English text) # Notice that a large `maxToken` value may cause request timeout. maxTokens: 500