feat: support Volcengine rerank

This commit is contained in:
KKtwo
2026-07-20 15:55:11 +08:00
committed by lyingbug
parent c387f09add
commit 3011f132e9
15 changed files with 514 additions and 25 deletions
+24 -1
View File
@@ -25,7 +25,7 @@ WeKnora 支持多种主流 AI 模型服务商,在创建模型时可通过 `par
| `openai` | OpenAI | Chat, Embedding, Rerank, VLLM |
| `aliyun` | 阿里云 DashScope | Chat, Embedding, Rerank, VLLM |
| `zhipu` | 智谱 BigModel | Chat, Embedding, Rerank, VLLM |
| `volcengine` | 火山引擎 Volcengine | Chat, Embedding, VLLM |
| `volcengine` | 火山引擎 Volcengine | Chat, Embedding, Rerank, VLLM |
| `hunyuan` | 腾讯混元 Hunyuan | Chat, Embedding |
| `deepseek` | DeepSeek | Chat |
| `minimax` | MiniMax | Chat |
@@ -263,6 +263,29 @@ curl --location 'http://localhost:8080/api/v1/models' \
}'
```
**远程 API 模型(火山引擎 VikingDB)**:
火山 Rerank 使用 AK/SK 签名,不使用方舟 API Key。`api_key` 保存 Access Key ID,
`app_secret` 保存 Secret Access Key;两项均按模型凭证加密存储。
```curl
curl --location 'http://localhost:8080/api/v1/models' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: your_api_key' \
--data '{
"name": "doubao-seed-rerank",
"type": "Rerank",
"source": "remote",
"description": "火山引擎托管 Rerank 模型",
"parameters": {
"base_url": "https://api-knowledgebase.mlp.cn-beijing.volces.com",
"api_key": "your-volcengine-access-key-id",
"app_secret": "your-volcengine-secret-access-key",
"provider": "volcengine"
}
}'
```
### 创建视觉模型(VLLM)
```curl
+2 -2
View File
@@ -20611,7 +20611,7 @@ const docTemplate = `{
"type": "string"
},
"appSecret": {
"description": "AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"description": "AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"type": "string"
},
"baseUrl": {
@@ -20848,7 +20848,7 @@ const docTemplate = `{
"type": "string"
},
"appSecret": {
"description": "AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"description": "AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"type": "string"
},
"baseUrl": {
+2 -2
View File
@@ -20604,7 +20604,7 @@
"type": "string"
},
"appSecret": {
"description": "AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"description": "AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"type": "string"
},
"baseUrl": {
@@ -20841,7 +20841,7 @@
"type": "string"
},
"appSecret": {
"description": "AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"description": "AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。",
"type": "string"
},
"baseUrl": {
+2 -2
View File
@@ -4776,7 +4776,7 @@ definitions:
apiKey:
type: string
appSecret:
description: AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。
description: AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。
type: string
baseUrl:
type: string
@@ -4944,7 +4944,7 @@ definitions:
apiKey:
type: string
appSecret:
description: AppSecret 用于 LKEAP Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。
description: AppSecret 用于 LKEAP / Volcengine Rerank 等需要第二段密钥的场景(对应模型 Parameters.AppSecret)。
type: string
baseUrl:
type: string