-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
329 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,57 @@ | ||
# ChatGPT-Telegram-Workers | ||
|
||
[English Version](./doc/en/README.md) | ||
<h1 align="center"> | ||
ChatGPT-Telegram-Workers | ||
</h1> | ||
|
||
最简单快捷部署属于自己的ChatGPT Telegram机器人的方法。使用Cloudflare Workers,单文件,直接复制粘贴一把梭,无需任何依赖,无需配置本地开发环境,不用域名,免服务器。 | ||
可以自定义系统初始化信息,让你调试好的性格永远不消失。 | ||
<p align="center"> | ||
<br> English | <a href="./doc/cn/README.md">中文</a> | ||
</p> | ||
<p align="center"> | ||
<em>Deploy your own Telegram ChatGPT bot on Cloudflare Workers with ease.</em> | ||
</p> | ||
|
||
<details> | ||
<summary>查看Demo</summary> | ||
<img style="max-width: 600px;" alt="image" src="./doc/demo.jpg"> | ||
</details> | ||
|
||
## 使用说明 | ||
|
||
### 分支 | ||
|
||
- [`master`](https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/master) 稳定版 | ||
- [`dev`](https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/dev) 开发版,可能会有一些新功能,但是不稳定。会快速修复一些bug。 | ||
|
||
### 配置 | ||
|
||
> 推荐在Workers配置界面填写环境变量, 而不是直接修改js代码中的变量 | ||
配置信息和命令使用说明,见 [配置文档](./doc/CONFIG.md) | ||
## About | ||
|
||
### 部署流程 | ||
The simplest and fastest way to deploy your own ChatGPT Telegram bot. Use Cloudflare Workers, single file, copy and paste directly, no dependencies required, no need to configure local development environment, no domain name required, serverless. | ||
|
||
详情见 [部署流程](./doc/DEPLOY.md) | ||
You can customize the system initialization information so that your debugged personality never disappears. | ||
|
||
如果需要部署在其他平台可以查看 [多平台部署](./doc/PLATFORM.md) | ||
|
||
### 自动更新 | ||
|
||
> 使用`Github Action`自动更新 `Cloudflare Workers` | ||
详情见 [自动更新](./doc/ACTION.md) | ||
|
||
|
||
## 更新日志 | ||
<details> | ||
<summary>example</summary> | ||
<img style="max-width: 600px;" alt="image" src="./doc/demo.jpg"> | ||
</details> | ||
|
||
- v1.6.0 | ||
- 添加[`workers ai`](https://developers.cloudflare.com/workers-ai/)支持,具体配置查看[配置文档](./doc/CONFIG.md) | ||
- 优化openai流模式解析器 | ||
## Features | ||
|
||
其他更新日志见[CHANGELOG.md](./doc/CHANGELOG.md) | ||
- Serverless deployment | ||
- Support for multiple OpenAI keys | ||
- Support for multiple Telegram bots | ||
- Support for Azure OpenAI Service | ||
- Support for Cloudflare AI (free) | ||
- Support for streaming output | ||
- Support for custom roles | ||
- Support for multiple platforms deployment | ||
|
||
## 最佳实践 | ||
## Documentation | ||
|
||
~~新建多个机器人绑定到同一个workers,设置`TELEGRAM_AVAILABLE_TOKENS`,每个机器人赋予不同的`SYSTEM_INIT_MESSAGE`~~。开启群聊模式,新建多个群聊,每个群内只有自己个机器人,每个群的机器人由不同的`SYSTEM_INIT_MESSAGE`,比如翻译专家,文案专家,代码专家。然后每次根据自己的需求和不同的群里的机器人聊天,这样就不用经常切换配置属性。 | ||
- [Documentation](./doc/en/README.md) | ||
- [How to deploy](./doc/en/DEPLOY.md) | ||
- [How to set up configuration](./doc/en/CONFIG.md) | ||
- [Automatic update](./doc/en/ACTION.md) | ||
- [Support Platform](./doc/en/PLATFORM.md) | ||
- [Change Log](./doc/en/CHANGELOG.md) | ||
|
||
|
||
## 特别鸣谢 | ||
## Special thanks | ||
|
||
![https://www.jetbrains.com/?from=tbxark](https://user-images.githubusercontent.com/9513891/236592683-1ea579cf-08ff-4703-b313-db038f62bab0.svg) | ||
|
||
感谢 [JetBrains](https://www.jetbrains.com/?from=tbxark) 提供的开源开发许可证。 | ||
Thanks for the open-source development license provided by [JetBrains](https://www.jetbrains.com/?from=tbxark). | ||
|
||
## 贡献者 | ||
## Contributors | ||
|
||
这个项目存在是因为所有贡献者的帮助。[贡献](https://github.com/tbxark/ChatGPT-Telegram-Workers/graphs/contributors). | ||
This project exists thanks to all the people who contribute. [Contribute](https://github.com/tbxark/ChatGPT-Telegram-Workers/graphs/contributors). | ||
|
||
## 许可证 | ||
## License | ||
|
||
**ChatGPT-Telegram-Workers** 以 MIT 许可证的形式发布。[查看许可证](./LICENSE) 获取更多细节。 | ||
**ChatGPT-Telegram-Workers** is released under the MIT license. [See LICENSE](LICENSE) for details. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 支持平台 | ||
|
||
### 1. [Cloudflare Workers](https://workers.cloudflare.com/) | ||
|
||
最简单的方法,本项目默认支持的部署方式,详情看[部署流程](DEPLOY.md)。免费,无需域名,无需服务器,无需配置本地开发环境。KV存储,无需数据库,但是有一定的存储限制, | ||
> KV每天写入限制为1000次,不过对于聊天机器人来说,应该够用了。(调试模式`DEBUG_MODE`会保存最新一条消息到KV,token统计每次对话成功都会更新统计数据,所以会有一定的写入次数。如果你经常使用次数超过1000次,可以考虑关闭调试模式和者使用统计) | ||
### 2. [Vercel](https://vercel.com/) | ||
|
||
详情看[Vercel](../../adapter/vercel/README.md)。免费,无需域名,无需服务器。需要配置本地开发环境部署,不能通过复制粘贴部署。无存储服务,需要自己配置数据库。可以使用[Redis Cloud](https://redis.com)的免费redis。可以连接github自动部署,但是需要了解vercel的配置。 | ||
|
||
### 3. [Render](https://render.com/) | ||
|
||
详情看[Render](../../adapter/render)。免费,无需域名,无需服务器。需要有一定的开发能力。 | ||
|
||
### 4. Local | ||
|
||
详情看[Local](../../adapter/local/README.md)。本地的部署方式,需要配置本地开发环境,需要有一定的开发能力。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<h1 align="center"> | ||
ChatGPT-Telegram-Workers | ||
</h1> | ||
|
||
<p align="center"> | ||
<br> <a href="../../README.md">English</a> | 中文 | ||
</p> | ||
<p align="center"> | ||
<em>轻松在Cloudflare Workers上部署您自己的Telegram ChatGPT机器人。</em> | ||
</p> | ||
|
||
## 关于 | ||
最简单快捷部署属于自己的ChatGPT Telegram机器人的方法。使用Cloudflare Workers,单文件,直接复制粘贴一把梭,无需任何依赖,无需配置本地开发环境,不用域名,免服务器。 可以自定义系统初始化信息,让你调试好的性格永远不消失。 | ||
|
||
<details> | ||
<summary>查看Demo</summary> | ||
<img style="max-width: 600px;" alt="image" src="../demo.jpg"> | ||
</details> | ||
|
||
## 特性 | ||
|
||
- 无服务器部署 | ||
- 支持多个OpenAI密钥 | ||
- 支持多个Telegram机器人 | ||
- 支持Azure OpenAI服务 | ||
- 支持Cloudflare AI(免费) | ||
- 支持流式输出 | ||
- 支持自定义角色 | ||
- 支持多平台部署 | ||
|
||
## 文档 | ||
|
||
- [如何部署](./DEPLOY.md) | ||
- [如何设置配置](./CONFIG.md) | ||
- [自动更新](./ACTION.md) | ||
- [支持平台](./PLATFORM.md) | ||
- [变更日志](./CHANGELOG.md) | ||
|
||
|
||
## 特别感谢 | ||
|
||
![https://www.jetbrains.com/?from=tbxark](https://user-images.githubusercontent.com/9513891/236592683-1ea579cf-08ff-4703-b313-db038f62bab0.svg) | ||
|
||
感谢[JetBrains](https://www.jetbrains.com/?from=tbxark)提供的开源开发许可证。 | ||
|
||
|
||
## 贡献者 | ||
|
||
这个项目存在是因为所有贡献的人。[贡献](https://github.com/tbxark/ChatGPT-Telegram-Workers/graphs/contributors)。 | ||
|
||
## 许可证 | ||
|
||
**ChatGPT-Telegram-Workers** 以 MIT 许可证发布。[详见 LICENSE](../../LICENSE) 获取详情。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.