-
openai账号:可以正常登录即可
-
node
-
npm工具:node自带
-
pnpm工具:使用npm安装
-
cnpm工具:使用npm安装
-
redis
-
git
-
QQ机器人框架:Yunzai-Bot
QQ机器人框架作者建议node需要16版本以上
相关工具下载
-
node:
-
git:
-
Yunzai-Bot机器人框架:
-
Chatgpt插件:
-
redis下载:
注册ChatGPT
参考:
NodeJS安装
Windows下安装:
CentOS下安装:
sudo yum update
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum -y install nodejs
Ubuntu/Debian下安装
sudo apt update
sudo apt install nodejs build-essential -y
pnpm安装
装完node.js之后,可以直接运行下面的命令安装pnpm
npm install -g pnpm
redis安装
针对Windows用户,我们选择去github下载文件
如果你是mac的用户,可以直接用brew安装
brew install redis
Mac快速安装brew工具
方式一:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
方式二:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speed
CentOS用户
sudo yum update
sudo yum -y install redis
Ubuntu/Debian
sudo apt update
sudo apt install redis-server
Git安装
参考:
centos或者其他系统安装git就自己百度咯
Yunzai-Bot安装
参考作者的官方文档:https://github.com/Le-niao/Yunzai-Bot
1.克隆项目
git clone --depth=1 -b main https://github.com/Le-niao/Yunzai-Bot.git
git clone --depth=1 -b main https://hub.yzuu.cf/Le-niao/Yunzai-Bot.git
2.安装,已安装的可以跳过
npm install pnpm -g
3.安装依赖
pnpm install -P
chatgpt-plugin的安装
1.进入到机器人目录
cd Yunzai-Bot
2.安装依赖
pnpm install -w chatgpt undici showdown mathjax-node
3.使用git下载项目,将项目下载到plugins/chatgpt文件夹中
git clone https://github.com/ikechan8370/chatgpt-plugin.git ./plugins/chatgpt-plugin
第三方快速代理下载(建议):
git clone https://hub.yzuu.cf/ikechan8370/chatgpt-plugin.git ./plugins/chatgpt-plugin
4.修改配置
编辑plugins/chatgpt/config/index.js
文件主要修改其中的SESSION_TOKEN
常量,修改为你的openai账号的token。token获取参见后文。
启动机器人
在运行(首次运行按提示输入登录)
node app
出现问题
可以参考:
THE END
暂无评论内容