mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
Merge pull request #2790 from jimmyzhuu/feat/qianfan-provider
Add first-class Baidu Qianfan / ERNIE provider
This commit is contained in:
@@ -6,7 +6,7 @@ description: Supported models and recommended choices for CowAgent
|
||||
CowAgent supports mainstream LLMs from domestic and international providers. Model interfaces are implemented in the project's `models/` directory.
|
||||
|
||||
<Note>
|
||||
For Agent mode, the following models are recommended based on quality and cost: deepseek-v4-flash, MiniMax-M2.7, claude-sonnet-4-6, gemini-3.1-pro-preview, glm-5.1, qwen3.6-plus, kimi-k2.6
|
||||
For Agent mode, the following models are recommended based on quality and cost: deepseek-v4-flash, MiniMax-M2.7, claude-sonnet-4-6, gemini-3.1-pro-preview, glm-5.1, qwen3.6-plus, kimi-k2.6, ernie-4.5-turbo-128k
|
||||
</Note>
|
||||
|
||||
## Configuration
|
||||
@@ -21,6 +21,9 @@ You can also use the [LinkAI](https://link-ai.tech) platform interface to flexib
|
||||
<Card title="DeepSeek" href="/en/models/deepseek">
|
||||
deepseek-v4-flash, deepseek-v4-pro, and more
|
||||
</Card>
|
||||
<Card title="Baidu Qianfan / ERNIE" href="/en/models/qianfan">
|
||||
ernie-4.5-turbo-128k, ernie-x1-turbo-32k, and more
|
||||
</Card>
|
||||
<Card title="MiniMax" href="/en/models/minimax">
|
||||
MiniMax-M2.7 and other series models
|
||||
</Card>
|
||||
|
||||
43
docs/en/models/qianfan.mdx
Normal file
43
docs/en/models/qianfan.mdx
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Baidu Qianfan / ERNIE
|
||||
description: Baidu Qianfan ERNIE model configuration
|
||||
---
|
||||
|
||||
Option 1: Native integration (recommended):
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"qianfan_api_key": "",
|
||||
"qianfan_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| --- | --- |
|
||||
| `model` | Recommended: `ernie-4.5-turbo-128k`; also supports `ernie-4.5-turbo-32k` and `ernie-x1-turbo-32k` |
|
||||
| `qianfan_api_key` | Qianfan API key, usually starting with `bce-v3/` |
|
||||
| `qianfan_api_base` | Optional, defaults to `https://qianfan.baidubce.com/v2` |
|
||||
|
||||
## Model Selection
|
||||
|
||||
| Model | Use Case |
|
||||
| --- | --- |
|
||||
| `ernie-4.5-turbo-128k` | Default recommendation for long-context and general chat |
|
||||
| `ernie-4.5-turbo-32k` | General chat with a balanced context window and cost |
|
||||
| `ernie-x1-turbo-32k` | Tasks that need stronger reasoning |
|
||||
|
||||
Option 2: OpenAI-compatible configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"bot_type": "openai",
|
||||
"open_ai_api_key": "",
|
||||
"open_ai_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
<Tip>
|
||||
Prefer `qianfan_api_key` for new configurations. Existing `wenxin`, `wenxin-4`, `baidu_wenxin_api_key`, and `baidu_wenxin_secret_key` configurations remain supported.
|
||||
</Tip>
|
||||
@@ -6,7 +6,7 @@ description: CowAgentがサポートするモデルとおすすめの選択肢
|
||||
CowAgentは国内外の主要なLLMをサポートしています。モデルインターフェースはプロジェクトの`models/`ディレクトリに実装されています。
|
||||
|
||||
<Note>
|
||||
Agent モードでは、品質とコストのバランスから以下のモデルをおすすめします: deepseek-v4-flash、MiniMax-M2.7、claude-sonnet-4-6、gemini-3.1-pro-preview、glm-5.1、qwen3.6-plus、kimi-k2.6
|
||||
Agent モードでは、品質とコストのバランスから以下のモデルをおすすめします: deepseek-v4-flash、MiniMax-M2.7、claude-sonnet-4-6、gemini-3.1-pro-preview、glm-5.1、qwen3.6-plus、kimi-k2.6、ernie-4.5-turbo-128k
|
||||
</Note>
|
||||
|
||||
## 設定
|
||||
@@ -21,6 +21,9 @@ CowAgentは国内外の主要なLLMをサポートしています。モデルイ
|
||||
<Card title="DeepSeek" href="/ja/models/deepseek">
|
||||
deepseek-v4-flash、deepseek-v4-pro など
|
||||
</Card>
|
||||
<Card title="Baidu Qianfan / ERNIE" href="/ja/models/qianfan">
|
||||
ernie-4.5-turbo-128k、ernie-x1-turbo-32k など
|
||||
</Card>
|
||||
<Card title="MiniMax" href="/ja/models/minimax">
|
||||
MiniMax-M2.7およびその他のシリーズモデル
|
||||
</Card>
|
||||
|
||||
43
docs/ja/models/qianfan.mdx
Normal file
43
docs/ja/models/qianfan.mdx
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Baidu Qianfan / ERNIE
|
||||
description: Baidu Qianfan ERNIE モデル設定
|
||||
---
|
||||
|
||||
方法 1: 公式接続(推奨):
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"qianfan_api_key": "",
|
||||
"qianfan_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
| パラメータ | 説明 |
|
||||
| --- | --- |
|
||||
| `model` | 推奨は `ernie-4.5-turbo-128k`。`ernie-4.5-turbo-32k` と `ernie-x1-turbo-32k` も利用できます |
|
||||
| `qianfan_api_key` | Qianfan API Key。通常は `bce-v3/` で始まります |
|
||||
| `qianfan_api_base` | 任意。デフォルトは `https://qianfan.baidubce.com/v2` |
|
||||
|
||||
## モデル選択
|
||||
|
||||
| モデル | 用途 |
|
||||
| --- | --- |
|
||||
| `ernie-4.5-turbo-128k` | 長いコンテキストと一般的なチャット向けの推奨モデル |
|
||||
| `ernie-4.5-turbo-32k` | コンテキスト長とコストのバランスが良い一般チャット向け |
|
||||
| `ernie-x1-turbo-32k` | より強い推論が必要なタスク向け |
|
||||
|
||||
方法 2: OpenAI 互換接続:
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"bot_type": "openai",
|
||||
"open_ai_api_key": "",
|
||||
"open_ai_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
<Tip>
|
||||
新しい設定では `qianfan_api_key` の利用を推奨します。既存の `wenxin`、`wenxin-4`、`baidu_wenxin_api_key`、`baidu_wenxin_secret_key` 設定は引き続き利用できます。
|
||||
</Tip>
|
||||
@@ -6,7 +6,7 @@ description: CowAgent 支持的模型及推荐选择
|
||||
CowAgent 支持国内外主流厂商的大语言模型,模型接口实现在项目的 `models/` 目录下。
|
||||
|
||||
<Note>
|
||||
Agent 模式下推荐使用以下模型,可根据效果及成本综合选择:deepseek-v4-flash、MiniMax-M2.7、claude-sonnet-4-6、gemini-3.1-pro-preview、glm-5.1、qwen3.6-plus、kimi-k2.6
|
||||
Agent 模式下推荐使用以下模型,可根据效果及成本综合选择:deepseek-v4-flash、MiniMax-M2.7、claude-sonnet-4-6、gemini-3.1-pro-preview、glm-5.1、qwen3.6-plus、kimi-k2.6、ernie-4.5-turbo-128k
|
||||
|
||||
同时支持使用 [LinkAI](https://link-ai.tech) 平台接口,可灵活切换多种模型,并支持知识库、工作流、插件等 Agent 能力。
|
||||
</Note>
|
||||
@@ -26,6 +26,9 @@ CowAgent 支持国内外主流厂商的大语言模型,模型接口实现在
|
||||
<Card title="DeepSeek" href="/models/deepseek">
|
||||
deepseek-v4-flash、deepseek-v4-pro 等
|
||||
</Card>
|
||||
<Card title="百度千帆 / ERNIE" href="/models/qianfan">
|
||||
ernie-4.5-turbo-128k、ernie-x1-turbo-32k 等
|
||||
</Card>
|
||||
<Card title="MiniMax" href="/models/minimax">
|
||||
MiniMax-M2.7 等系列模型
|
||||
</Card>
|
||||
|
||||
43
docs/models/qianfan.mdx
Normal file
43
docs/models/qianfan.mdx
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: 百度千帆 / ERNIE
|
||||
description: 百度千帆 ERNIE 模型配置
|
||||
---
|
||||
|
||||
方式一:官方接入(推荐):
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"qianfan_api_key": "",
|
||||
"qianfan_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
| 参数 | 说明 |
|
||||
| --- | --- |
|
||||
| `model` | 推荐使用 `ernie-4.5-turbo-128k`;也可使用 `ernie-4.5-turbo-32k`、`ernie-x1-turbo-32k` |
|
||||
| `qianfan_api_key` | 千帆 API Key,格式通常以 `bce-v3/` 开头 |
|
||||
| `qianfan_api_base` | 可选,默认为 `https://qianfan.baidubce.com/v2` |
|
||||
|
||||
## 模型选择
|
||||
|
||||
| 模型 | 适用场景 |
|
||||
| --- | --- |
|
||||
| `ernie-4.5-turbo-128k` | 默认推荐,适合长上下文和通用对话 |
|
||||
| `ernie-4.5-turbo-32k` | 通用对话,成本和上下文更均衡 |
|
||||
| `ernie-x1-turbo-32k` | 需要更强推理能力的任务 |
|
||||
|
||||
方式二:OpenAI 兼容方式接入:
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "ernie-4.5-turbo-128k",
|
||||
"bot_type": "openai",
|
||||
"open_ai_api_key": "",
|
||||
"open_ai_api_base": "https://qianfan.baidubce.com/v2"
|
||||
}
|
||||
```
|
||||
|
||||
<Tip>
|
||||
新配置推荐使用 `qianfan_api_key`。旧的 `wenxin`、`wenxin-4`、`baidu_wenxin_api_key`、`baidu_wenxin_secret_key` 配置仍保持兼容。
|
||||
</Tip>
|
||||
Reference in New Issue
Block a user