# telegpt **Repository Path**: kworwang_admin/telegpt4 ## Basic Information - **Project Name**: telegpt - **Description**: chatgpt+telegrame聊天机器人接口,支持gpt4.0. - **Primary Language**: NodeJS - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-21 - **Last Updated**: 2023-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # # Telegpt4 ### 该项目在https://github.com/hobk/chatgpt-telebot.git,这个项目的基础上更改了chatgpt的接口为openai。代码发生变化,可以直接支持gpt4,可以指定各种配置参数。在.env.example修改 ### 可在https://www.kwor.cn/index.php/archives/41/ 查看debian linux部署流程 ## 事前准备🛡️ - 申请Telegram bot api token : https://t.me/BotFather - 获取[OpenAi apiKey](https://platform.openai.com/account/api-keys) - Node.js版本 18+ ## 部署⚔️ 1. 克隆项目,安装依赖 ```bash git clone https://gitee.com/kworwang_admin/telegpt4.git cd telegpt4 npm install ``` 2. 把之前准备的 Telegram bot token 和 openAi apiKey 对应写入 .env 文件 ```bash # 1.env.example 文件内容 token='Telegram bot token' apiKey='openAi apiKey' orgID='openAi orgID' model='模型版本如:gpt-3.5-turbo' group_name = 'messages in groups starting with /group_name will be replied' # 2.复制文件 cp .env.example .env # 3.编辑 .env #token='Telegram bot token' #apiKey='openAi apiKey' #orgID='openAi orgID' #model='模型版本如:gpt-3.5-turbo' #group_name = '群消息中需要回复的消息必须以该名称开头,如设置为'gpt',那么群消息中必须以/gpt开头才会触发回复' ``` 3. 启动 ```bash node index.js # 或者使用 pm2 (安装:npm i pm2 -g) pm2 start index.js ```