Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuergaosi233/wechat-chatgpt
Use ChatGPT On Wechat via wechaty
https://github.com/fuergaosi233/wechat-chatgpt
Last synced: 3 days ago
JSON representation
Use ChatGPT On Wechat via wechaty
- Host: GitHub
- URL: https://github.com/fuergaosi233/wechat-chatgpt
- Owner: fuergaosi233
- Created: 2022-12-06T13:15:21.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T09:44:41.000Z (7 months ago)
- Last Synced: 2024-12-02T22:09:45.014Z (10 days ago)
- Language: TypeScript
- Size: 1.24 MB
- Stars: 13,287
- Watchers: 95
- Forks: 3,923
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-chatgpt - 在微信上迅速接入 ChatGPT,让它成为你最好的助手!
- awesome - fuergaosi233/wechat-chatgpt - Use ChatGPT On Wechat via wechaty (TypeScript)
- Awesome-ChatGPT - 在微信上迅速接入 ChatGPT,让它成为你最好的助手!
- awesome-ChatGPT-resource-zh - 【微信】 迅速接入 ChatGPT,让它成为你最好的助手!
- awesome-open-gpt - wechat-chatgpt
- Awesome_Multimodel_LLM - wechat-chatgpt - Use ChatGPT On Wechat via wechaty (Tools for deploying LLM)
- awesome-chatgpt - wechat-chatgpt - Wechat bot. (Bots / Examples)
- awesome-chatgpt - wechat-chatgpt
- allinchatgpt - wechat-chatgpt - 与微信和聊天GPT互动:在微信上使用微信和官方 API 上的 ChatGPT (Uncategorized / Uncategorized)
- awesome-ChatGPT-repositories - wechat-chatgpt - Use ChatGPT On Wechat via wechaty (Others)
- chatgpt-awesome - fuergaosi233/wechat-chatgpt
- awesome-chatgpt - WeChat bot
- StarryDivineSky - fuergaosi233/wechat-chatgpt
- awesome-ai-client - wechat-chatgpt - Use ChatGPT On Wechat via wechaty (🔧 Others)
- Awesome-LLM - wechat-chatgpt - Use ChatGPT On Wechat via wechaty (LLM Deployment)
- awesome-chatgpt - wechat-chatgpt - Wechat bot. (Bots / Examples)
- awesome-gpt - wechat-chatgpt
- AiTreasureBox - fuergaosi233/wechat-chatgpt - 12-07_13291_0](https://img.shields.io/github/stars/fuergaosi233/wechat-chatgpt.svg) | Use ChatGPT On Wechat via wechaty | (Repos)
- awesome-llm-and-aigc - fuergaosi233/wechat-chatgpt - chatgpt?style=social"/> : Use ChatGPT On Wechat via wechaty. (Applications / 提示语(魔法))
- awesome-llm-and-aigc - fuergaosi233/wechat-chatgpt - chatgpt?style=social"/> : Use ChatGPT On Wechat via wechaty. (Applications / 提示语(魔法))
- awesome-llm-zh - 微信接入 ChatGPT
- awesome-chatgpt - wechat-chatgpt
- Awesome-ChatGPT - wechat-chatgpt
README
!!!! Project Archived 📦 !!!!
> This project has been archived. Thank you to everyone who contributed! 🙌😔
Welcome to wechat-chatgpt 👋
> Use ChatGPT On Wechat via wechaty
> English | [中文文档](README_ZH.md)[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/dMLG70?referralCode=bIYugQ)
## 🌟 Features
- Interact with WeChat and ChatGPT:
- Use ChatGPT on WeChat with [wechaty](https://github.com/wechaty/wechaty) and [Official API](https://openai.com/blog/introducing-chatgpt-and-whisper-apis)
- Add conversation support
- Support command setting- Deployment and configuration options:
- Add Dockerfile, deployable with [docker](#use-with-docker)
- Support deployment using [docker compose](#use-with-docker-compose)
- Support [Railway](#use-with-railway) and [Fly.io](#use-with-flyio) deployment- Other features:
- Support [Dall·E](https://labs.openai.com/)
- Support [whisper](https://openai.com/blog/introducing-chatgpt-and-whisper-apis)
- Support setting prompt
- Support proxy (in development)## 🚀 Usage
- [Use with Railway](#use-with-railway)(PaaS, Free, Stable, ✅Recommended)
- [Use with Fly.io](#use-with-flyio)(Paas, Free, ✅Recommended)
- [Use with docker](#use-with-docker)(Self-hosted, Stable, ✅Recommended)
- [Use with docker compose](#use-with-docker-compose)(Self-hosted, Stable, ✅Recommended)
- [Use with nodejs](#use-with-nodejs)(Self-hosted)## Use with Railway
> Railway offers $5 or 500 hours of runtime per month
1. Click the [Railway](https://railway.app/template/dMLG70?referralCode=bIYugQ) button to go to the Railway deployment page
2. Click the `Deploy Now` button to enter the Railway deployment page
3. Fill in the repository name and `OPENAI_API_KEY` (need to link GitHub account)
4. Click the `Deploy` button
5. Click the `View Logs` button and wait for the deployment to complete## Use with Fly.io
> Please 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. Install [flyctl](https://fly.io/docs/getting-started/installing-flyctl/)
```shell
# macOS
brew install flyctl
# Windows
scoop install flyctl
# Linux
curl https://fly.io/install.sh | sh
```
2. Clone the project and enter the project directory
```shell
git clone https://github.com/fuergaosi233/wechat-chatgpt.git && cd wechat-chatgpt
```
3. Create a new app
```shell
➜ flyctl launch
? Would you like to copy its configuration to the new app? No
? App Name (leave blank to use an auto-generated name):
? Select region:
? Would you like to setup a Postgresql database now? No
? Would you like to deploy now? No
```
4. Configure the environment variables
```shell
flyctl secrets set OPENAI_API_KEY="" MODEL=""
```
5. Deploy the app
```shell
flyctl deploy
```## Use with docker
```sh
# pull image
docker pull holegots/wechat-chatgpt
# run container
docker run -d --name wechat-chatgpt \
-e OPENAI_API_KEY= \
-e MODEL="gpt-3.5-turbo" \
-e CHAT_PRIVATE_TRIGGER_KEYWORD="" \
-v $(pwd)/data:/app/data/wechat-assistant.memory-card.json \
holegots/wechat-chatgpt:latest
# View the QR code to log in to wechat
docker logs -f wechat-chatgpt
```
> How to get OPENAI API KEY? [Click here](https://platform.openai.com/account/api-keys)## Use with docker compose
```sh
# Copy the configuration file according to the template
cp .env.example .env
# Edit the configuration file
vim .env
# Start the container
docker-compose up -d
# View the QR code to log in to wechat
docker logs -f wechat-chatgpt
```## Use with nodejs
> You need NodeJS 18.0.0 version and above
```sh
# Clone the project
git clone https://github.com/fuergaosi233/wechat-chatgpt.git && cd wechat-chatgpt
# Install dependencies
npm install
# Copy the configuration file according to the template
cp .env.example .env
# Edit the configuration file
vim .env
# Start project
npm run dev
```> Please make sure your WeChat account can log in [WeChat on web](https://wx.qq.com/)
## 📝 Environment Variables
| name | description |
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| API | API endpoint of ChatGPT |
| OPENAI_API_KEY | [create new secret key](https://platform.openai.com/account/api-keys) |
| MODEL | ID of the model to use. Currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported. |
| TEMPERATURE | 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 | Prohibited to use ChatGPT in group chat. |
| CHAT_PRIVATE_TRIGGER_KEYWORD | Keyword to trigger ChatGPT reply in WeChat private chat |
| BLOCK_WORDS | Chat blocker words, (works for both private and group chats, Use, Split) |
| CHATGPT_BLOCK_WORDS | The blocked words returned by ChatGPT(works for both private and group chats, Use, Split) |## 📝 Using Custom ChatGPT API
> https://github.com/fuergaosi233/openai-proxy
```shell
# Clone the project
git clone https://github.com/fuergaosi233/openai-proxy
# Install dependencies
npm install && npm install -g wrangler && npm run build
# Deploy to CloudFlare Workers
npm run deploy
# Custom domain (optional)
Add `Route` to `wrangler.toml`
routes = [
{ pattern = "Your Custom Domain", custom_domain = true },
]
```## ⌨️ Commands
> Enter in the WeChat chat box
```shell
/cmd help # Show help
/cmd prompt # Set prompt
/cmd clear # Clear all sessions since last boot
```## ✨ Contributor
## 🤝 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!