https://github.com/zjrwtx/zjrwtx-testbot
https://github.com/zjrwtx/zjrwtx-testbot
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zjrwtx/zjrwtx-testbot
- Owner: zjrwtx
- Created: 2022-12-10T01:08:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-10T01:08:21.000Z (over 2 years ago)
- Last Synced: 2025-01-14T02:36:28.755Z (5 months ago)
- Language: TypeScript
- Size: 404 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to wechat-chatgpt 👋
> Use ChatGPT On Wechat via wechaty
English | [中文文档](README_ZH.md)[](https://railway.app/new/template/BHJD6L?referralCode=FaJtD_)
## 🌟 Feature- [x] Use ChatGPT On Wechat via wechaty
- [x] Support OpenAI Accounts Pool
- [x] Support use proxy to login
- [x] Add conversation Support (Everyone will have their own session)
- [x] Add Dockerfile
- [x] Publish to Docker.hub
- [x] Add Railway deploy
- [x] Auto Reload OpenAI Accounts Pool
- [ ] Add sendmessage retry for 429/503## Use with docker in Linux(recommended)
```sh
cp config.yaml.example config.yaml
# Change Config.yaml
# run docker command in Linux or WindowsPowerShell
docker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest
# login with qrcode
docker logs -f wechat-chatgpt
```
## Use with docker in Windows
```sh
# Create and modify config.yaml in the current directory
# run docker command in WindowsPowerShell
docker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest
# In the Windows command line (cmd) environment, you may mount the current directory like this:
docker run -d --name wechat-chatgpt -v %cd%/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest
# login with qrcode
docker logs -f wechat-chatgpt
```
## Upgrade Docker Image Version
```sh
docker pull holegots/wechat-chatgpt:latest
docker stop wechat-chatgpt
docker rm wechat-chatgpt
docker run -d --name wechat-chatgpt -v $(pwd)/config.yaml:/app/config.yaml holegots/wechat-chatgpt:latest
```
## Install```sh
npm install && poetry install
```## Usage with manual
### Copy config
You need copy config file for setting up your project.
```sh
cp config.yaml.example config.yaml
```### Get and config Openai account
> If you don't have this OpenAI account and you live in China, you can get it [here](https://mirror.xyz/boxchen.eth/9O9CSqyKDj4BKUIil7NC1Sa1LJM-3hsPqaeW_QjfFBc).
#### **A:Use account and password**
You need get OpenAI account and password.
Your config.yaml should be like this:```yaml
chatGPTAccountPool:
- email:
password:
# if you hope only some keywords can trigger chatgpt on private chat, you can set it like this:
chatPrivateTiggerKeyword: ""
```⚠️ Trigger keywords must appear in the first position of the received message.
⚠️ Pls make sure your network can log in to OpenAI, and if you fail to login in try setting up a proxy or using SessionToken.
**Setup proxy:**```sh
export http_proxy=
```#### **B: Use Session Token**
If you cant use email and password to login your openai account or your network can't login, you can use session token. You need to follow these steps:
1. Go to https://chat.openai.com/chat and log in or sign up.
2. Open dev tools.
3. Open Application > Cookies.

4. Copy the value for \_\_Secure-next-auth.session-token and save it to your config
Your config.yaml should be like this:```yaml
chatGPTAccountPool:
- session_token:
```### Start Project
```sh
npm run dev
```If you are logging in for the first time, then you need to scan the qrcode.
## Author
👤 **holegots**
- Twitter: [@fuergaosi](https://twitter.com/fuergaosi)
- GitHub: [@fuergaosi233](https://github.com/fuergaosi233)## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/fuergaosi233/wechat-chatgpt/issues).## Show your support
Give a ⭐️ if this project helped you!