WebEnhancement - web知识增强
更新时间:2025-12-25
API访问域名
| 请求方式 | POST |
|---|---|
| base url | https://keyue.cloud.baidu.com |
| 后缀接口 | /open/v1/api/v2/llm/document/enhancement |
| Authentication | token为API Key |
说明
无
请求参数
Header参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| Content-Type | string | 是 | 内容类型 | 固定值:application/json |
| token | string | 是 | API KEY | 机器人API KEY。 详细获取方式参考:准备工作 |
| uid | string | 是 | 用户ID | 详细获取方式参考:准备工作 |
| username | string | 是 | 用户名 | 详细获取方式参考:准备工作 |
Parameter参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| type | string | 是 | 类型 | 固定值,document |
Body参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| enhanceIds | array | 是 | 文档ID列表 | ["6c0cb880-f7cc-43f5-9805-a0395f48eb36"] |
| knowledgeType | string | 是 | 类型 | document |
| enhancement | int | 是 | 学习类型 | 0取消增强,1开启增强,2失败重新开启增强 |
| adminId | string | 是 | 租户管理者id | 48c93c8a53fd47c1bb7a130417531fd9 |
| target | string | 是 | 操作类型 | submit |
响应参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| time | integer | 是 | 时间 | 1716985128196 |
| data | null | 是 | 数据 | null |
| code | integer | 是 | 状态码 | 200 |
| msg | string | 是 | 状态信息 | OK |
请求示例
Bash
1curl --location --request POST 'https://keyue.cloud.baidu.com/open/v1/api/v2/llm/document/enhancement?type=document' \
2--header 'token: xxxx' \
3--header 'Content-Type: application/json' \
4--header 'uid: xxxx' \
5--header 'username: xxxx' \
6--data '{
7 "enhanceIds": [
8 "95570780-7ef4-4c8f-8926-3cf6d900894c"
9 ],
10 "knowledgeType": "document",
11 "enhancement": 1,
12 "target": "submit"
13}'
响应示例
1{
2 "time": 1717487792072,
3 "data": null,
4 "code": 200,
5 "msg": "OK"
6}
1{
2 "msg":"服务器处理该请求失败,请检查请求是否合法",
3 "requestId":"e183d35b5c314eb3b0226606d724a240",
4 "code":4002012
5}
