跳转到主要内容

源码部署

1. 克隆项目代码

git clone https://github.com/zhayujie/chatgpt-on-wechat
cd chatgpt-on-wechat/
若遇到网络问题可使用国内仓库地址:https://gitee.com/zhayujie/chatgpt-on-wechat

2. 安装依赖

核心依赖(必选):
pip3 install -r requirements.txt
扩展依赖(可选,建议安装):
pip3 install -r requirements-optional.txt

3. 配置

复制配置文件模板并编辑:
cp config-template.json config.json
config.json 中填写模型 API Key 和通道类型等配置,详细说明参考各 模型文档

4. 运行

本地运行:
python3 app.py
运行后默认启动 Web 控制台,访问 http://localhost:9899 开始对话和管理Agent。 服务器后台运行:
nohup python3 app.py & tail -f nohup.out

Docker 部署

使用 Docker 部署无需下载源码和安装依赖。Agent 模式下更推荐使用源码部署以获得更多系统访问能力。
需要安装 Docker 和 docker-compose。
1. 下载配置文件
wget https://cdn.link-ai.tech/code/cow/docker-compose.yml
打开 docker-compose.yml 填写所需配置。 2. 启动容器
sudo docker compose up -d
3. 查看日志
sudo docker logs -f chatgpt-on-wechat

核心配置项

{
  "channel_type": "web",
  "model": "MiniMax-M2.5",
  "agent": true,
  "agent_workspace": "~/cow",
  "agent_max_context_tokens": 40000,
  "agent_max_context_turns": 30,
  "agent_max_steps": 15
}
参数说明默认值
channel_type接入渠道类型web
model模型名称MiniMax-M2.5
agent是否启用 Agent 模式true
agent_workspaceAgent 工作空间路径~/cow
agent_max_context_tokens最大上下文 tokens40000
agent_max_context_turns最大上下文记忆轮次30
agent_max_steps单次任务最大决策步数15
全部配置项可在项目 config.py 文件中查看。