Ubuntu安装云崽+ChatGPT
本文最后更新于34 天前,其中的信息可能已经过时,如有错误请发送邮件到916949904@qq.com

Ubuntu安装云崽

憨憨博客:https://blog.hanhanz.top

Centos教程:https://blog.hanhanz.top/archives/309.html

视频教程请进群获取:559567232

使用sudo su进到root账户

安装nodejs

#把nvm远程镜像克隆到指定目录
git clone https://gitee.com/mirrors/nvm
#进入nvm目录内执行安装命令
sudo bash install.sh
通过nvm --version可以看到安装成功。
# 如果您在国内!请先为nvm配置国内阿里源,网络通畅可以不用运行此行。
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node

# 安装最新LTS版本的node.js
nvm install --lts
#查看版本
node -v
npm -v

安装redis

sudo apt install redis-server

安装git

sudo apt install curl git -y

安装chromium

apt-get install chromium-browser
或
snap install chromium

安装中文字体

# 安装文泉驿正黑体
sudo apt install ttf-wqy-zenhei
# 重建字体缓存
sudo fc-cache -fv

憨憨博客:https://blog.hanhanz.top

Centos教程:https://blog.hanhanz.top/archives/309.html

安装云崽项目

cd #转到根目录
# 使用Gitee
git clone --depth=1 https://gitee.com/yoimiya-kokomi/Miao-Yunzai.git
cd Miao-Yunzai 
git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/

安装依赖

cd Yunzai-Bot #进到云崽文件夹
npm config set registry https://registry.npmmirror.com
npm install pnpm -g
pnpm -v #查看版本号
pnpm config set registry https://registry.npmjs.org/
pnpm install -P

安装锅巴插件(极力推荐)

克隆插件

git clone --depth=1 https://gitee.com/guoba-yunzai/guoba-plugin.git ./plugins/Guoba-Plugin/

安装依赖

在云崽根目录下执行

方式一:pnpm install --filter=guoba-plugin
方式二:npm install express multer body-parser jsonwebtoken

开放端口

锅巴默认50831端口,可在 config/application.yaml 中修改
在你的服务器控制台找到防火墙(或者叫安全组,找不到的建议百度),接着点击添加规则,填上端口号,点击确定就行了。

有很多人会使用面板进行管理服务器,例如宝塔等,就还需要在面板上再开放一下50831端口,操作和上面差不多
有的人没有使用面板还打不开锅巴,那就需要用命令行在本地开启端口,如下:

打开防火墙:sudo ufw enable
开放端口:sudo ufw allow 50831
重启防火墙:sudo ufw reload

安装chatgpt插件

安装插件的大部分操作都是在云崽根目录(/root/Yunzai-Bot)

插件地址:https://github.com/ikechan8370/chatgpt-plugin

https://gitee.com/ikechan/chatgpt-plugin

有什么问题可以去issue看看有没有解决方法:https://github.com/ikechan8370/chatgpt-plugin/issues

或者看问题合集:https://chatgptplugin.ikechan8370.com/guide/

版本要求

Node.js >= 18 / Node.js >= 14(with node-fetch) 小白尽可能使用18版本以上的nodejs

安装项目

cd Yunzai-Bot/ #进到云崽根目录
git clone --depth=1 https://github.com/ikechan8370/chatgpt-plugin.git ./plugins/chatgpt-plugin/
或:git clone --depth=1 https://gitee.com/ikechan/chatgpt-plugin.git ./plugins/chatgpt-plugin/

安装依赖

cd plugins/chatgpt-plugin
pnpm i

修改配置

修改配置极力推荐使用锅巴配置,自己修改配置容易出错

锅巴配置(极力推荐)

进行到这一步相信你已经安装好插件了,那么请运行它

cd && cd Yunzai-Bot/
node app

运行起来以后,使用主人账号给机器人发送#锅巴登录,机器人会给你发登录网址,复制外网登录网址,用浏览器打开,一打开就能看到ChatGPT-Plugin,点它,然后选择配置,主要修改其中的apiKey

配置好之后就可以对话了。

本文作者:hanhan
本文标题:Ubuntu安装云崽+ChatGPT
本文链接:https://blog.hanhanz.top/archives/553.html
作者 Q Q:916949904
如果觉得本文对您有所帮助,三连支持一下吧。

评论

  1. 岑寂
    Android Chrome 98.0.4758.102
    7月前
    2023-5-23 16:10:12

    大佬,今天(5.23)更新最新版后用Sy
    dney模式显示403怎么办

    • 博主
      岑寂
      Windows Chrome 113.0.0.0
      7月前
      2023-5-23 16:50:54

      去锅巴里面把”对话使用sydney反代”选项打开就好了

  2. 1
    Windows Chrome 113.0.0.0
    6月前
    2023-5-28 2:47:57

    Chromium 这个没有在教程中

  3. 墨西哥鳄梨酱
    Macintosh Chrome 113.0.0.0
    6月前
    2023-5-29 17:41:52

    支持!

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇