Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Railway deployment tutorial. #272

Merged
merged 2 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
> Use ChatGPT On Wechat via wechaty
English | [中文文档](README_ZH.md)

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)

If you don't have a server or want to experience rapid deployment, you can use Railway to do so, see [Usage with Railway](#usage-with-railway).

## 🌟 Feature

Expand Down Expand Up @@ -148,7 +150,7 @@ Some environment variables need to be configured:

- **CHAT_GPT_PASSWORD** : Your OpenAI Account password, *if you have session_token, It's optional*.

- **CHAT_GPT_SESSION_TOKEN** : Your OpenAI Account session_token, *if you have email and password, It's optional*.See above for how to get it.
- **CHAT_GPT_SESSION_TOKEN** : Your OpenAI Account session_token, *if you have email and password, It's optional*.See how to get a token [here](#b-use-session-token).

- **CHAT_GPT_RETRY_TIMES** : The number of times to retry when the OpenAI API returns 429 or 503.

Expand All @@ -168,6 +170,13 @@ Log in successfully and start sending and receiving messages(This process can ta

![railway-success](docs/images/railway-succeed.png)

Besides, in deployment, you may encounter the following issues:

- **Error: ⚠️ No chatgpt item in pool** : This error means that you have not configured the OpenAI account information correctly. You can solve this problem from the following aspects:1. Check whether the token or openAI account and password are filled in correctly. 2. The token may have expired (experience shows that the expiration time of the token is **24** hours), you can go to the chatGPT official website to re-obtain the token. 3. Redeploy Current Services.Note that the above should be modified on the Variables page in Railway Dashboard.
- **After the deployment is complete, the QR code is not generated**.Try **refreshing** the page to see again if the Deploy Logs panel generated a link and QR code.
- **The generated QR code cannot be scanned**.On the generated QR code, there is a link that can be clicked to scan the QR code.
- **Message feedback is very slow**.Because Railway's servers are deployed overseas, there is an increase in message feedback latency, but it is still within the acceptance range. If you are time sensitive, you can use your own server deployment.

## Author

👤 **holegots**
Expand Down
14 changes: 11 additions & 3 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
</a>
</p>


> 在微信上迅速接入 ChatGPT,让它成为你最好的助手!
> [English](README.md) | 中文文档

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)

如果你没有自己的服务器或者想体验快速部署,可使用 Railway 进行部署,参见 [Railway 部署](#railway-部署)。

## 🌟 功能点

Expand Down Expand Up @@ -149,7 +150,7 @@ npm run dev

- **CHAT_GPT_PASSWORD** :您的 OpenAI 帐户密码,如果您有 session_token,则可不填。

- **CHAT_GPT_SESSION_TOKEN** :您的 OpenAI 帐户 session_token,如果您有电子邮件和密码,则可选。请参见上面获取它的方法
- **CHAT_GPT_SESSION_TOKEN** :您的 OpenAI 帐户 session_token,如果您有电子邮件和密码,则可选。请参见 [这里](#b-使用-session-token) 获取 token

- **CHAT_GPT_RETRY_TIMES** :当 OpenAI API 返回 429 或 503 时重试的次数。

Expand All @@ -169,6 +170,13 @@ npm run dev

![railway-success](docs/images/railway-succeed.png)

此外,在部署中,您可能会遇到以下问题:

- **Error: ⚠️ No chatgpt item in pool**:此错误表示验证信息有问题。您可以从以下几个方面解决此问题:1.检查 token 或 openAI 账号和密码是否正确填写。2. token 可能已经过期(经验表明 token 的过期时间为**24**小时),您可以到 chatGPT 官网重新获取 token。3. 重新部署当前服务。请注意,应在铁路仪表板的 **Variables** 页面上修改上述内容。
- **部署完成后,不会生成二维码**。尝试**刷新**页面,再次查看 Deploy Logs 面板是否生成了链接和二维码。
- **生成的二维码无法扫描**。在生成的二维码上,有一个链接可以点击扫描二维码。
- **消息反馈缓慢**。由于 Railway 的服务器部署在海外,消息反馈延迟会有所增加,但仍在可接受范围内。如果您对时间敏感,则可以使用自己的服务器部署。

## 作者

👤 **holegots**
Expand Down