手把手教你搭建ChatGPT Telegram 机器人
手把手教你搭建ChatGPT Telegram 机器人

手把手教你搭建ChatGPT Telegram 机器人

首先打开GitHub项目,https://github.com/RainEggplant/chatgpt-telegram-bot

git clone https://github.com/RainEggplant/chatgpt-telegram-bot.git

下载源代码chatgpt-telegram-bot-2.1.1.zip

解压缩

apt install unzip

unzip chatgpt-telegram-bot-2.1.1.zip

切换到当前目录

cd chatgpt-telegram-bot-2.1.1

cd config

编辑default.json文件

填写Telegram token值、type改为unofficial、填写accessToken值

如何获取accessToken值

https://chat.openai.com/api/auth/session

创建local.json文件

cp default.json local.json

执行下面命令

pnpm install
pnpm build && pnpm start

安装screen
apt-get install screen

后台运行
screen -S chatgpt
pnpm build && pnpm start

还可以使用Docker命令以启动机器人
docker run -d -v ./config:/app/config raineggplant/chatgpt-telegram-bot:latest

2个反向代理URL:

https://ai.fakeopen.com/api/conversation

https://api.pawan.krd/backend-api/conversation

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Title - Artist
0:00