mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 05:27:59 +08:00
docs: make English the default docs language and fix link paths
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
---
|
||||
title: 微信
|
||||
description: 将 CowAgent 接入个人微信(基于官方接口)
|
||||
title: WeChat
|
||||
description: Connect CowAgent to personal WeChat (via the official API)
|
||||
---
|
||||
|
||||
> 接入个人微信,扫码登录即可使用,支持文本、图片、语音、文件、视频等消息的私聊收发。通过微信官方API进行接入,无安全风险,接入后会在会话中新增一个机器人助手,不影响当前账号的使用。
|
||||
> Connect CowAgent to your personal WeChat — scan to log in, no public IP required. Supports text, image, voice, file, and video messages in 1-on-1 chats. Backed by WeChat's official API; safe to use. After connecting, a bot assistant is added to your conversation list without affecting normal account usage.
|
||||
|
||||
## 一、配置和运行
|
||||
## 1. Setup and run
|
||||
|
||||
### 方式一:Web 控制台接入
|
||||
### Option A: Web console
|
||||
|
||||
启动 Cow 项目后打开 Web 控制台 (本地链接为: http://127.0.0.1:9899/ ),选择 **通道** 菜单,点击 **接入通道**,选择 **微信**,点击接入后按照提示扫码登录。
|
||||
Start CowAgent and open the Web console (local URL: http://127.0.0.1:9899/). Go to the **Channels** tab, click **Connect Channel**, select **WeChat**, and follow the prompts to scan in.
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260322195114.png" width="800" />
|
||||
|
||||
### 方式二:配置文件接入
|
||||
### Option B: Config file
|
||||
|
||||
在 `config.json` 中设置 `channel_type` 为 `weixin`:
|
||||
Set `channel_type` to `weixin` in `config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -23,52 +23,49 @@ description: 将 CowAgent 接入个人微信(基于官方接口)
|
||||
}
|
||||
```
|
||||
|
||||
启动程序后,终端会显示二维码,使用微信扫码授权即可完成登录。
|
||||
After starting CowAgent, a QR code is displayed in the terminal. Scan it with WeChat to complete login.
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260322195509.png" width="800" />
|
||||
|
||||
|
||||
<Note>
|
||||
1. 兼容历史配置:`channel_type` 设为 `wx` 同样可以启用微信通道。
|
||||
2. 注意微信客户端需要更新至 8.0.69 版本或以上
|
||||
1. For backward compatibility, setting `channel_type` to `wx` also activates the WeChat channel.
|
||||
2. The WeChat client must be on version **8.0.69** or higher.
|
||||
</Note>
|
||||
|
||||
## 二、使用说明
|
||||
## 2. Usage
|
||||
|
||||
微信扫码并进行授权确认后,即可完成接入并开始对话。接入微信后会在对话中创建出一个机器人助理,不会对已有账号的正常使用有任何影响。
|
||||
Once authorized, the integration completes and you can start chatting. A bot assistant is created in your WeChat conversation list, leaving normal account usage unaffected.
|
||||
|
||||
> 你可以通过搜索"微信ClawBot"随时找到这个机器人,还可以修改这个机器人的头像、备注等信息,将机器人置顶在消息列表等。
|
||||
> You can find the bot at any time by searching for **"微信ClawBot"**. You may also rename it, change its avatar, pin it to the top of your conversation list, and so on.
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/83ae8251d896219fde4803f4205205be.jpg" width="250" />
|
||||
|
||||
## 3. Login
|
||||
|
||||
### QR code login
|
||||
|
||||
## 三、登录说明
|
||||
On first startup, a QR code appears in the terminal (valid for around 2 minutes). Scan it with WeChat and confirm on your phone to log in.
|
||||
|
||||
### 扫码登录
|
||||
- The QR code refreshes automatically when it expires
|
||||
- The `qrcode` dependency is already included in `requirements.txt`, so the QR code renders directly in the terminal after install
|
||||
|
||||
首次启动时,终端会显示一个二维码(有效期约 2 分钟)。使用微信扫描二维码并在手机上确认后即可完成登录。
|
||||
### Credential persistence
|
||||
|
||||
- 二维码过期后会自动刷新并重新显示
|
||||
- `requirements.txt` 中已默认包含 `qrcode` 依赖,安装后可在终端直接渲染二维码图案
|
||||
After a successful login, credentials are saved to `~/.weixin_cow_credentials.json`. Subsequent startups reuse the saved credentials with no need to re-scan.
|
||||
|
||||
### 凭证保存
|
||||
To force a re-login, delete the credentials file and restart.
|
||||
|
||||
登录成功后,凭证会自动保存至 `~/.weixin_cow_credentials.json`,下次启动时无需重新扫码。
|
||||
### Session expiry
|
||||
|
||||
如需重新登录,删除该凭证文件后重启程序即可。
|
||||
When the WeChat session expires (errcode `-14`), CowAgent automatically clears old credentials and initiates a new QR login — no manual intervention required.
|
||||
|
||||
### Session 过期
|
||||
## 4. Supported features
|
||||
|
||||
当微信 session 过期时(errcode -14),程序会自动清除旧凭证并重新发起扫码登录,无需手动干预。
|
||||
|
||||
## 四、功能说明
|
||||
|
||||
| 功能 | 支持情况 |
|
||||
| Feature | Status |
|
||||
| --- | --- |
|
||||
| 单聊 | ✅ |
|
||||
| 文本消息 | ✅ 收发 |
|
||||
| 图片消息 | ✅ 收发 |
|
||||
| 文件消息 | ✅ 收发 |
|
||||
| 视频消息 | ✅ 收发 |
|
||||
| 语音消息 | ✅ 接收 (自带语音识别) |
|
||||
| Direct messages | ✅ |
|
||||
| Text messages | ✅ Send & Receive |
|
||||
| Image messages | ✅ Send & Receive |
|
||||
| File messages | ✅ Send & Receive |
|
||||
| Video messages | ✅ Send & Receive |
|
||||
| Voice messages | ✅ Receive (built-in speech recognition) |
|
||||
|
||||
Reference in New Issue
Block a user