mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-01 16:29:26 +08:00
174 lines
4.7 KiB
Plaintext
174 lines
4.7 KiB
Plaintext
---
|
||
title: 模型
|
||
description: CowAgent 支持的模型及配置方式
|
||
---
|
||
|
||
# 模型
|
||
|
||
CowAgent 支持国内外主流厂商的大语言模型,模型接口实现在项目的 `models/` 目录下。
|
||
|
||
<Note>
|
||
Agent 模式下推荐使用以下模型:MiniMax-M2.5、glm-5、kimi-k2.5、qwen3.5-plus、claude-sonnet-4-6、gemini-3.1-pro-preview,可根据效果及成本综合选择。
|
||
</Note>
|
||
|
||
## 模型配置
|
||
|
||
根据所选模型,在 `config.json` 中填写对应的模型名称和 API Key。
|
||
|
||
### MiniMax
|
||
|
||
```json
|
||
{
|
||
"model": "MiniMax-M2.5",
|
||
"minimax_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 可填 `MiniMax-M2.5`、`MiniMax-M2.1`、`MiniMax-M2.1-lightning`、`MiniMax-M2` 等 |
|
||
| `minimax_api_key` | 在 [MiniMax控制台](https://platform.minimaxi.com/user-center/basic-information/interface-key) 创建 |
|
||
|
||
### 智谱AI (GLM)
|
||
|
||
```json
|
||
{
|
||
"model": "glm-5",
|
||
"zhipu_ai_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 可填 `glm-5`、`glm-4.7`、`glm-4-plus`、`glm-4-flash` 等,参考 [模型编码](https://bigmodel.cn/dev/api/normal-model/glm-4) |
|
||
| `zhipu_ai_api_key` | 在 [智谱AI控制台](https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys) 创建 |
|
||
|
||
### 通义千问 (Qwen)
|
||
|
||
```json
|
||
{
|
||
"model": "qwen3.5-plus",
|
||
"dashscope_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 可填 `qwen3.5-plus`、`qwen3-max`、`qwen-max`、`qwen-plus` 等 |
|
||
| `dashscope_api_key` | 在 [百炼控制台](https://bailian.console.aliyun.com/?tab=model#/api-key) 创建 |
|
||
|
||
### Kimi (Moonshot)
|
||
|
||
```json
|
||
{
|
||
"model": "kimi-k2.5",
|
||
"moonshot_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 可填 `kimi-k2.5`、`kimi-k2`、`moonshot-v1-8k`、`moonshot-v1-32k` 等 |
|
||
| `moonshot_api_key` | 在 [Moonshot控制台](https://platform.moonshot.cn/console/api-keys) 创建 |
|
||
|
||
### 豆包 (Doubao)
|
||
|
||
```json
|
||
{
|
||
"model": "doubao-seed-2-0-code-preview-260215",
|
||
"ark_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 可填 `doubao-seed-2-0-code-preview-260215`、`doubao-seed-2-0-pro-260215` 等 |
|
||
| `ark_api_key` | 在 [火山方舟控制台](https://console.volcengine.com/ark/region:ark+cn-beijing/apikey) 创建 |
|
||
|
||
### Claude
|
||
|
||
```json
|
||
{
|
||
"model": "claude-sonnet-4-6",
|
||
"claude_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 支持 `claude-sonnet-4-6`、`claude-opus-4-6`、`claude-sonnet-4-5` 等,参考 [官方模型](https://docs.anthropic.com/en/docs/about-claude/models/overview) |
|
||
| `claude_api_key` | 在 [Claude控制台](https://console.anthropic.com/settings/keys) 创建 |
|
||
| `claude_api_base` | 可选,默认为 `https://api.anthropic.com/v1`,可接入第三方代理 |
|
||
|
||
### Gemini
|
||
|
||
```json
|
||
{
|
||
"model": "gemini-3.1-pro-preview",
|
||
"gemini_api_key": "YOUR_API_KEY"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 支持 `gemini-3.1-pro-preview`、`gemini-3-flash-preview`、`gemini-2.5-pro` 等,参考 [官方文档](https://ai.google.dev/gemini-api/docs/models) |
|
||
| `gemini_api_key` | 在 [Google AI Studio](https://aistudio.google.com/app/apikey) 创建 |
|
||
|
||
### OpenAI
|
||
|
||
```json
|
||
{
|
||
"model": "gpt-4.1-mini",
|
||
"open_ai_api_key": "YOUR_API_KEY",
|
||
"open_ai_api_base": "https://api.openai.com/v1"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | 支持 o 系列、gpt-5.2、gpt-4.1 等,参考 [模型列表](https://platform.openai.com/docs/models) |
|
||
| `open_ai_api_key` | 在 [OpenAI平台](https://platform.openai.com/api-keys) 创建 |
|
||
| `open_ai_api_base` | 可选,修改可接入第三方代理接口 |
|
||
|
||
### DeepSeek
|
||
|
||
```json
|
||
{
|
||
"model": "deepseek-chat",
|
||
"open_ai_api_key": "YOUR_API_KEY",
|
||
"open_ai_api_base": "https://api.deepseek.com/v1",
|
||
"bot_type": "chatGPT"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `model` | `deepseek-chat`(V3)、`deepseek-reasoner`(R1) |
|
||
| `bot_type` | 使用 OpenAI 兼容方式接入,固定为 `chatGPT` |
|
||
|
||
## OpenAI 兼容接入
|
||
|
||
除官方 SDK 接入外,多数模型也支持 OpenAI 兼容方式接入,将 `bot_type` 设为 `chatGPT`,并配置对应的 `open_ai_api_base` 和 `open_ai_api_key` 即可。
|
||
|
||
## LinkAI 平台
|
||
|
||
通过 [LinkAI](https://link-ai.tech) 平台可灵活切换多种模型,并支持知识库、工作流、插件等 Agent 能力。
|
||
|
||
```json
|
||
{
|
||
"use_linkai": true,
|
||
"linkai_api_key": "YOUR_API_KEY",
|
||
"linkai_app_code": "YOUR_APP_CODE"
|
||
}
|
||
```
|
||
|
||
| 参数 | 说明 |
|
||
| --- | --- |
|
||
| `use_linkai` | 设为 `true` 启用 LinkAI 接口 |
|
||
| `linkai_api_key` | 在 [控制台](https://link-ai.tech/console/interface) 创建 |
|
||
| `linkai_app_code` | LinkAI 智能体的 code,选填 |
|
||
|
||
<Tip>
|
||
全部模型名称可参考项目 [`common/const.py`](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/common/const.py) 文件。
|
||
</Tip>
|