在微信上使用 ChatGPT 通过微信
英语|中文文档
如果你没有服务器或想要体验快速部署,可以使用 Railway 执行此操作,请参阅铁路用法。
使用铁路和 docker 部署,可能存在无法解决的问题,我们正在研究它。
感谢@transitive废话,ChatGPT API使工作自动化。
你应该使用密码和用户名登录,并配置验证码。
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
# 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
docker pull holegots/wechat-chatgpt:latest
docker stop wechat-chatgpt
docker rm wechat-chatgpt
# run docker command in Linux or 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
npm install
NodeJS 版本 >= 18.0.0
你需要复制配置文件来设置项目。
cp config.yaml.example config.yaml
如果你没有此OpenAI帐户并且居住在中国,则可以在此处获取。
你需要获取OpenAI帐户和密码。你的config.yaml应该是这样的:
chatGPTAccountPool:
- email: <your email>
password: <your password>
# if you hope only some keywords can trigger chatgpt on private chat, you can set it like this:
chatPrivateTiggerKeyword: ""
设置代理:
你可以在 中配置 :
config.yaml
openAIProxy: <Your Proxy>
该软件包的浏览器部分使用Puppeteer来尽可能自动化,包括解决所有CAPTCHA。
🔥
默认情况下会处理基本的 Cloudflare 验证码,但如果你想自动化电子邮件 + 密码 Recaptchas,则需要注册以下付费提供商之一:
因此,你应该在环境变量中进行配置或。
NOPECHA_KEY
CAPTCHA_TOKEN
npm run dev
Rail 是一个部署平台,你可以在其中配置基础架构,在本地使用该基础架构进行开发,然后部署到云中。本节介绍如何使用铁路快速部署微信-chatgpt项目。
首先,你需要注册一个铁路帐户并使用 GitHub 验证登录。
然后单击下面的一键部署按钮进行部署。
完成一些验证后,可以开始部署。你将看到以下界面:
需要配置一些环境变量:
CHAT_GPT_EMAIL:你的OpenAI帐户电子邮件。
CHAT_GPT_PASSWORD:你的 OpenAI 帐户密码。
CHAT_GPT_RETRY_TIMES:OpenAI API 返回 429 或 503 时重试的次数。
CHAT_PRIVATE_TRIGGER_KEYWORD :如果你希望只有一些关键词可以在私有聊天中触发chatgpt,你可以设置它。
单击“部署”按钮,你的服务将很快开始部署。以下界面似乎指示部署已开始:
部署展示成功后,单击查看日志,在部署日志中找到微信登录链接。
点击进入,使用准备好的微信扫码登录。
成功登录并开始发送和接收消息(此过程可能需要几分钟):
此外,在部署中,你可能会遇到以下问题:
如果你是第一次登录,则需要扫描二维码。
欢迎贡献、问题和功能请求!
请随时查看问题页面。
如果这个项目对你有帮助,请给出一个