Files
LangBot/src/posts/deploy/manual.md
T
2024-01-29 23:14:07 +08:00

2.4 KiB

head, title, icon, order, author, date, category
head title icon order author date category
meta
name content
keywords ChatGPT QQ机器人教程,QChatGPT项目部署教程
手动部署(推荐,可以在所有平台上使用) support 3 Lazy.ikun.RockChinQ 2023-10-29
部署教程

:::warning 请使用Python 3.9.x以上版本,注意不要使用3.12.x版本,没有Python的需自行安装,参考此教程 :::

:::info 目录 toc :::

配置QQ登录框架

目前支持mirai和go-cqhttp和OpenShamrock(未来的可能方案),配置任意一个即可

mirai
  1. 按照此教程配置Mirai及mirai-api-http
  2. 启动mirai-console后,保持mirai-console运行状态
  3. 在下一步配置主程序时请在config.py中将msg_source_adapter设为yirimirai
go-cqhttp
  1. 按照此文档配置go-cqhttp
  2. 启动go-cqhttp,确保登录成功,保持运行
  3. 在下一步配置主程序时请在config.py中将msg_source_adapter设为nakuru
OpenShamrock(未来的可能方案)

详细见此文档

配置主程序

  1. 克隆此项目(按照下方命令,需要安装 Git) 或 前往Release页面下载最新版本的压缩包(推荐)并解压
git clone https://github.com/RockChinQ/QChatGPT
cd QChatGPT
  1. 安装依赖
pip3 install -r requirements.txt

或者使用清华源

pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
  1. 运行一次主程序,生成配置文件
python3 main.py
  1. 编辑配置文件config.py

按照文件内注释填写配置信息,或者阅读此页面来学习如何配置信息

Tips: 大多数情况下,你只需关注qq小号,OpenAI Key的配置和管理员QQ号的配置

  1. 运行主程序
python3 main.py

如果输入上面的指令无反应,并且你确认你已经装了python,则输入python main.py

无报错信息即为运行成功

当你成功运行后,你需要开始阅读此页面