This commit is contained in:
葛胤池 2022-12-10 23:23:38 +08:00
commit 0267213f3d

View file

@ -6,12 +6,12 @@ Node.js >= 16.8
进入yunzai根目录
1. 安装依赖
```
pnpm install -w chatgpt undici
pnpm install -w chatgpt undici showdown mathjax-node
```
> chatgpt从2.0开始支持Conversation因此要求依赖chatgpt版本要大于2.0.0,如果使用了低版本导致报错可使用`pnpm update`更新一下。
2. 克隆项目
```
git clone https://github.com/ikechan8370/yunzai-chatgpt.git ./plugins/chatgpt
git clone https://github.com/ikechan8370/chatgpt-plugin.git ./plugins/chatgpt-plugin
```
3. 修改配置
编辑`plugins/chatgpt/config/index.js`文件主要修改其中的`SESSION_TOKEN`常量修改为你的openai账号的token。token获取参见后文。
@ -42,6 +42,8 @@ git clone https://github.com/ikechan8370/yunzai-chatgpt.git ./plugins/chatgpt
openai目前开放chatgpt模型的免费试用在此期间本项目应该都可用后续如果openai调整其收费策略到时候视情况进行调整。
如果在linux系统上发现emoj无法正常显示可以搜索安装支持emoj的字体如Ubuntu可以使用`sudo apt install fonts-noto-color-emoji`
## 感谢
* https://github.com/transitive-bullshit/chatgpt-api
* https://chat.openai.com/