- Communication and Q&A group: 204785790
- Provide test robot QQ: 2196084348
Realize a more intelligent QQ robot by calling the Completion API provided by the OpenAI GPT-3 model
technology stack
Mirai high-efficiency QQ robot support library
YiriMirai is a lightweight, low-coupling Python SDK based on mirai-api-http.
OpenAI API OpenAI API
project structure
-
pkg.databaseDatabase operation related- The database is used to store the history of the session to ensure that the content of the conversation can be remembered after the program is restarted
-
pkg.openaiOpenAI API related- Used to call OpenAI’s API to generate reply content
-
pkg.qqbotQQ robot related- Process the message received by QQ, call the API and reply
deploy
Sign up for an OpenAI account
Refer to the following article
Just 1 yuan to get ChatGPT registration
Teach you how to register ChatGPT step by step, super detailed
After successful registration, please go to the personal center to check the api_key
After completing the registration, use the following automated or manual deployment steps
Automated Deployment
Deploy using this installer
- This installer currently only supports Windows x64 platform, other platforms please deploy manually
manual deployment Configure Mirai Follow this tutorial to configure Mirai and YiriMirai Configure the main program Fill in the configuration information according to the comments in the file If there is no error message, the operation is successfulManual deployment works on all platforms
text-davinci-003Model $0.02/thousand words
After starting mirai-console, useloginCommand to log in to the QQ account and keep the mirai-console runninggit clone https://github.com/RockChinQ/QChatGPT
cd QChatGPT
pip3 install -r requirements.txtconfig.pyuvicornorhypercornPleasedon’t wantInstallation, these two are not required, there is currently an unknown bugTypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessaryplease refer to here
use
use private chat
- Add robot QQ as a friend
- Send a message to the robot and the robot will reply automatically
- able to pass
!helpView help information

group chat use
- Pull the robot into the group
- at the robot and send a message, the robot will reply automatically
- at robot and send
!helpView help information

#dialogue #robot #bot #developed #based #OpenAI #ChatGPT #implemented #miraiChatGPT #supports #oneclick #deployment