# ChatGPT-on-WeChat Integration Guide

ChatGPT-on-WeChat (abbreviated as cow) is an open-source chatbot framework that connects AI to channels such as WeChat, WeCom, Feishu, and DingTalk. This guide explains how to use it to call models through the UModelverse platform.

## **System Requirements**

| Platform | Requirements |
| --- | --- |
| Windows | Windows 10 or Windows 11 |
| macOS | macOS 10.15 (Catalina) or later |
| Linux | Major distributions (Ubuntu, Debian, etc.) |

All platforms require: Python 3.8+ and a network connection (Docker deployment is also supported).

## **1. Installation**

Follow the [ChatGPT-on-WeChat official documentation](https://github.com/zhayujie/chatgpt-on-wechat) to clone the project and install dependencies:

```
git clone https://github.com/zhayujie/chatgpt-on-wechat
cd chatgpt-on-wechat
pip install -r requirements.txt
```

## **2. Obtain an API Key**

Visit the [UModelverse Console](https://console.ucloud.cn/modelverse/api) to obtain your API key. For available models, see the [supported models](https://api-us-ca.umodelverse.ai/v1/models) on the UModelverse platform.

## **3. Configure the UModelverse Model**

UModelverse uses an OpenAI-compatible protocol. Fill in the following fields in `config.json` at the project root (replace `YOUR_API_KEY` with your actual key):

```
{
  "model": "qwen3.7-max",
  "open_ai_api_key": "",
  "open_ai_api_base": "",
  "channel_type": "wx",
  "single_chat_prefix": ["bot", "@bot"],
  "group_chat_prefix": ["@bot"],
  "group_name_white_list": ["ALL_GROUP"],
  "custom_api_key": "YOUR_API_KEY",
  "custom_api_base": "https://api-us-ca.umodelverse.ai/v1",
  "bot_type": "custom",
  "use_linkai": false
}
```

> Notes:
>
> - Set `bot_type` to `custom` and use `custom_api_key` / `custom_api_base` to specify the UModelverse API details; leave `open_ai_api_key` and `open_ai_api_base` empty.
> - Set `model` to one of the [supported models](https://api-us-ca.umodelverse.ai/v1/models) on the UModelverse platform, for example `qwen3.7-max`.
> - `custom_api_base` must include the `/v1` suffix.
> - Set `channel_type` according to your integration channel (e.g., WeChat `wx`, WeCom, Feishu, DingTalk, etc.). For credential parameters of other channels, refer to the official documentation.

## **4. Start**

```
python app.py
```

After starting, follow the terminal prompt to scan the QR code and log in. You can then chat with the bot in the corresponding channel.

## **Frequently Asked Questions**

### Getting an authentication failure or connection error in responses?

Please verify each of the following:

1.  `custom_api_key` comes from the UModelverse platform — make sure it is copied in full with no extra spaces.
    
2.  `custom_api_base` is `https://api-us-ca.umodelverse.ai/v1` (with `/v1`), and `bot_type` is `custom`.
    
3.  `model` is one of the [supported models](https://api-us-ca.umodelverse.ai/v1/models) on the UModelverse platform and has been entered correctly.
