QQ机器人框架作者建议node需要16版本以上
参考:手把手教你注册ChatGPT-小余塘 (yxqz.top)
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
装完node.js之后,可以直接运行下面的命令安装pnpm
npm install -g pnpm
针对Windows用户,我们选择去github下载Releases · tporadowski/redis (github.com)文件
如果你是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
参考:windos系统安装Git-小余塘 (yxqz.top)
centos或者其他系统安装git就自己百度咯
参考作者的官方文档: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.安装pnpm,已安装的可以跳过
npm install pnpm -g
3.安装依赖
pnpm install -P
1.进入到机器人目录
cd Yunzai-Bot
2.安装依赖
pnpm install -w chatgpt undici
3.使用git下载项目,将项目下载到plugins/chatgpt文件夹中
git clone https://github.com/ikechan8370/yunzai-chatgpt.git ./plugins/chatgpt
第三方快速代理下载(建议):
git clone https://hub.yzuu.cf/ikechan8370/yunzai-chatgpt.git ./plugins/chatgpt
4.修改配置
编辑plugins/chatgpt/index.js
文件主要修改其中的SESSION_TOKEN
常量,修改为你的openai账号的token。
在运行(首次运行按提示输入登录)
node app
可以参考:记录首次安装node的一些小细节 - 鱼香茄子 (yxqz.top)