Views
No views yet
Use ChatGPT On Wechat via wechaty
English | 中文文档
Railway offers $5 or 500 hours of runtime per month
Deploy Now button to enter the Railway deployment pageOPENAI_API_KEY (need to link GitHub account)Deploy buttonView Logs button and wait for the deployment to completePlease allocate 512MB memory for the application to meet the application requirements
fly.io offers free bills up to $5(Free Allowances 3 256MB are not included in the bill)
1 # macOS
2 brew install flyctl
3 # Windows
4 scoop install flyctl
5 # Linux
6 curl https://fly.io/install.sh | shgit clone https://github.com/fuergaosi233/wechat-chatgpt.git && cd wechat-chatgpt1➜ flyctl launch
2 ? Would you like to copy its configuration to the new app? No
3 ? App Name (leave blank to use an auto-generated name): <YOUR APP NAME>
4 ? Select region: <YOUR CHOOSE REGION>
5 ? Would you like to setup a Postgresql database now? No
6 ? Would you like to deploy now? Noflyctl secrets set OPENAI_API_KEY="<YOUR OPENAI API KEY>" MODEL="<CHATGPT-MODEL>"flyctl deploy1# pull image
2docker pull holegots/wechat-chatgpt
3# run container
4docker run -d --name wechat-chatgpt \
5 -e OPENAI_API_KEY=<YOUR OPENAI API KEY> \
6 -e MODEL="gpt-3.5-turbo" \
7 -e CHAT_PRIVATE_TRIGGER_KEYWORD="" \
8 -v $(pwd)/data:/app/data/wechat-assistant.memory-card.json \
9 holegots/wechat-chatgpt:latest
10# View the QR code to log in to wechat
11docker logs -f wechat-chatgptHow to get OPENAI API KEY? Click here
1# Copy the configuration file according to the template
2cp .env.example .env
3# Edit the configuration file
4vim .env
5# Start the container
6docker-compose up -d
7# View the QR code to log in to wechat
8docker logs -f wechat-chatgptYou need NodeJS 18.0.0 version and above
1# Clone the project
2git clone https://github.com/fuergaosi233/wechat-chatgpt.git && cd wechat-chatgpt
3# Install dependencies
4npm install
5# Copy the configuration file according to the template
6cp .env.example .env
7# Edit the configuration file
8vim .env
9# Start project
10npm run devPlease make sure your WeChat account can log in WeChat on web
| name | default | example | description |
|---|---|---|---|
| https://api.openai.com | |||
| OPENAI_API_KEY | 123456789 | sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | create new secret key |
| MODEL | gpt-3.5-turbo | ID of the model to use. Currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported. | |
| TEMPERATURE | 0.6 | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. | |
| CHAT_TRIGGER_RULE | Private chat triggering rules. | ||
| DISABLE_GROUP_MESSAGE | true | Prohibited to use ChatGPT in group chat. | |
| CHAT_PRIVATE_TRIGGER_KEYWORD | Keyword to trigger ChatGPT reply in WeChat private chat | ||
| BLOCK_WORDS | "VPN" | "WORD1,WORD2,WORD3" | Chat blocker words, (works for both private and group chats, Use, Split) |
| CHATGPT_BLOCK_WORDS | "VPN" | "WORD1,WORD2,WORD3" | The blocked words returned by ChatGPT(works for both private and group chats, Use, Split) |
1# Clone the project
2git clone https://github.com/fuergaosi233/openai-proxy
3# Install dependencies
4npm install && npm install -g wrangler && npm run build
5# Deploy to CloudFlare Workers
6npm run deploy
7# Custom domain (optional)
8Add `Route` to `wrangler.toml`
9routes = [
10 { pattern = "Your Custom Domain", custom_domain = true },
11]Enter in the WeChat chat box
1/cmd help # Show help
2/cmd prompt <PROMPT> # Set prompt
3/cmd clear # Clear all sessions since last boot