@opencxd/ascend-doc-mcp 0.0.1-alpha-1 → 0.0.1-alpha-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -44
- package/configs/hiascend.json +179 -32
- package/configs/hikunpeng.json +122 -21
- package/dist/index.js +3663 -3438
- package/dist/index.js.map +1 -1
- package/package.json +47 -45
- package/presets/ascend-aliases.json +192 -19
- package/presets/ascend-code-samples.json +37 -11
- package/presets/kunpeng-aliases.json +127 -14
- package/presets/kunpeng-code-samples.json +24 -4
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ascend-doc-mcp
|
|
1
|
+
# @opencxd/ascend-doc-mcp
|
|
2
2
|
|
|
3
3
|
配置驱动的昇腾社区文档查询 MCP 服务器。
|
|
4
4
|
|
|
@@ -6,21 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# 直接使用(npx 自动拉取最新版)
|
|
9
|
-
npx ascend-doc-mcp
|
|
9
|
+
npx @opencxd/ascend-doc-mcp
|
|
10
10
|
|
|
11
11
|
# 或全局安装
|
|
12
|
-
pnpm install -g ascend-doc-mcp
|
|
13
|
-
ascend-doc-mcp
|
|
12
|
+
pnpm install -g @opencxd/ascend-doc-mcp
|
|
14
13
|
```
|
|
15
14
|
|
|
16
15
|
### CLI 参数
|
|
17
16
|
|
|
18
17
|
所有启动参数通过 CLI 传入(跨平台通用,无需设置环境变量):
|
|
19
18
|
|
|
20
|
-
| 参数
|
|
21
|
-
|
|
22
|
-
| `--transport=stdio|http`
|
|
23
|
-
| `--port=3200`
|
|
19
|
+
| 参数 | 说明 | 默认值 |
|
|
20
|
+
| ------------------ | ------------- | --------- | ----- |
|
|
21
|
+
| `--transport=stdio | http` | 传输模式 | stdio |
|
|
22
|
+
| `--port=3200` | HTTP 端口 | 3200 |
|
|
24
23
|
| `--host=127.0.0.1` | HTTP 监听地址 | 127.0.0.1 |
|
|
25
24
|
|
|
26
25
|
环境变量 `TRANSPORT_MODE`、`MCP_PORT`、`MCP_HOST` 作为向后兼容 fallback。
|
|
@@ -31,16 +30,16 @@ ascend-doc-mcp
|
|
|
31
30
|
|
|
32
31
|
支持两种传输模式:**stdio**(默认)和 **StreamableHTTP**(远程服务)。
|
|
33
32
|
|
|
34
|
-
| 模式
|
|
35
|
-
|
|
36
|
-
| stdio
|
|
33
|
+
| 模式 | 适用场景 | 启动方式 |
|
|
34
|
+
| -------------- | ---------------------------------------------- | ------------------ |
|
|
35
|
+
| stdio | 本地 CLI / IDE 集成(Claude Desktop、VS Code) | 默认,无需额外配置 |
|
|
37
36
|
| StreamableHTTP | 远程服务 / 多客户端共享 / Claude Code url 配置 | `--transport=http` |
|
|
38
37
|
|
|
39
38
|
#### stdio 模式(默认)
|
|
40
39
|
|
|
41
40
|
```bash
|
|
42
41
|
# 启动 MCP 服务器
|
|
43
|
-
npx ascend-doc-mcp
|
|
42
|
+
npx @opencxd/ascend-doc-mcp
|
|
44
43
|
```
|
|
45
44
|
|
|
46
45
|
调用工具时传 `community` 参数指定昇腾社区:
|
|
@@ -53,7 +52,7 @@ npx ascend-doc-mcp
|
|
|
53
52
|
|
|
54
53
|
```bash
|
|
55
54
|
# 启动 HTTP 服务器
|
|
56
|
-
npx ascend-doc-mcp --transport=http
|
|
55
|
+
npx @opencxd/ascend-doc-mcp --transport=http
|
|
57
56
|
```
|
|
58
57
|
|
|
59
58
|
### AI 客户端配置示例
|
|
@@ -67,7 +66,7 @@ npx ascend-doc-mcp --transport=http
|
|
|
67
66
|
"mcpServers": {
|
|
68
67
|
"ascend-doc": {
|
|
69
68
|
"command": "npx",
|
|
70
|
-
"args": ["-y", "ascend-doc-mcp"]
|
|
69
|
+
"args": ["-y", "@opencxd/ascend-doc-mcp"]
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
}
|
|
@@ -95,34 +94,34 @@ npx ascend-doc-mcp --transport=http
|
|
|
95
94
|
|
|
96
95
|
典型工作流:`list_products` → `list_versions` → `get_doc_toc` → `get_doc_content`
|
|
97
96
|
|
|
98
|
-
| 工具
|
|
99
|
-
|
|
100
|
-
| `list_products`
|
|
101
|
-
| `list_versions`
|
|
102
|
-
| `get_doc_toc`
|
|
97
|
+
| 工具 | 说明 |
|
|
98
|
+
| ----------------- | ------------------------------- |
|
|
99
|
+
| `list_products` | 查询社区产品目录(按类别筛选) |
|
|
100
|
+
| `list_versions` | 查询产品版本列表 |
|
|
101
|
+
| `get_doc_toc` | 获取版本文档目录(章节树) |
|
|
103
102
|
| `get_doc_content` | 获取文档页内容(HTML→Markdown) |
|
|
104
|
-
| `search_docs`
|
|
103
|
+
| `search_docs` | 全站文档搜索 |
|
|
105
104
|
|
|
106
105
|
### P1 — 深度查询
|
|
107
106
|
|
|
108
|
-
| 工具
|
|
109
|
-
|
|
110
|
-
| `browse_docs`
|
|
111
|
-
| `check_compatibility`
|
|
112
|
-
| `search_troubleshooting`
|
|
113
|
-
| `get_latest_version`
|
|
114
|
-
| `get_download_options`
|
|
115
|
-
| `get_install_commands`
|
|
116
|
-
| `list_pdf_downloads`
|
|
117
|
-
| `get_version_announcements` | 获取版本公告/文档动态
|
|
107
|
+
| 工具 | 说明 |
|
|
108
|
+
| --------------------------- | -------------------------------------------------------------------------- |
|
|
109
|
+
| `browse_docs` | 按面包屑路径浏览文档 |
|
|
110
|
+
| `check_compatibility` | 硬件→软件兼容性矩阵 |
|
|
111
|
+
| `search_troubleshooting` | 搜索故障案例(源文件路径 `case/{caseId}` 可传给 get_doc_content 获取正文) |
|
|
112
|
+
| `get_latest_version` | 获取产品最新稳定版本 |
|
|
113
|
+
| `get_download_options` | 获取软件包下载选项树 |
|
|
114
|
+
| `get_install_commands` | 获取定制化安装命令 |
|
|
115
|
+
| `list_pdf_downloads` | 获取 PDF 文档下载列表 |
|
|
116
|
+
| `get_version_announcements` | 获取版本公告/文档动态 |
|
|
118
117
|
|
|
119
118
|
### P2 — 辅助工具
|
|
120
119
|
|
|
121
|
-
| 工具
|
|
122
|
-
|
|
123
|
-
| `search_docs_in_product` | 产品内文档搜索
|
|
124
|
-
| `get_doc_outline`
|
|
125
|
-
| `get_code_samples`
|
|
120
|
+
| 工具 | 说明 |
|
|
121
|
+
| ------------------------ | ---------------------- |
|
|
122
|
+
| `search_docs_in_product` | 产品内文档搜索 |
|
|
123
|
+
| `get_doc_outline` | 获取文档大纲(标题树) |
|
|
124
|
+
| `get_code_samples` | 获取文档中的代码示例 |
|
|
126
125
|
|
|
127
126
|
## 降级机制
|
|
128
127
|
|
|
@@ -149,19 +148,21 @@ presets/
|
|
|
149
148
|
|
|
150
149
|
```jsonc
|
|
151
150
|
{
|
|
152
|
-
"community": "ascend",
|
|
153
|
-
"baseUrl": "https://www.hiascend.com",
|
|
151
|
+
"community": "ascend", // 社区标识
|
|
152
|
+
"baseUrl": "https://www.hiascend.com", // 站点域名
|
|
154
153
|
"gateway": "/ascendgateway/ascendservice", // 网关前缀
|
|
155
|
-
"sourceBase": "/doc_center/source",
|
|
156
|
-
"apiStyles": {
|
|
154
|
+
"sourceBase": "/doc_center/source", // 源文件路径前缀
|
|
155
|
+
"apiStyles": {
|
|
156
|
+
// 接口风格差异
|
|
157
157
|
"breadcrumbs": { "style": "query", "path": "/doc/single/page/breadcrumbs" },
|
|
158
158
|
"versionAnnouncement": { "path": "/bulletins/front/nvod", "paramName": "bulletinsType", "bulletinType": 5 },
|
|
159
|
-
"versionTree": { "style": "query", "path": "/doc/version/new/tree" }
|
|
159
|
+
"versionTree": { "style": "query", "path": "/doc/version/new/tree" },
|
|
160
|
+
},
|
|
161
|
+
"degradations": {
|
|
162
|
+
// 降级策略
|
|
163
|
+
"check_compatibility": null, // null = 不降级
|
|
164
|
+
"popular_docs": "local_config", // 字符串 = 降级方式
|
|
160
165
|
},
|
|
161
|
-
"degradations": { // 降级策略
|
|
162
|
-
"check_compatibility": null, // null = 不降级
|
|
163
|
-
"popular_docs": "local_config" // 字符串 = 降级方式
|
|
164
|
-
}
|
|
165
166
|
}
|
|
166
167
|
```
|
|
167
168
|
|
package/configs/hiascend.json
CHANGED
|
@@ -5,11 +5,21 @@
|
|
|
5
5
|
"baseUrl": "https://www.hiascend.com",
|
|
6
6
|
"gateway": "/ascendgateway/ascendservice",
|
|
7
7
|
"sourceBase": "/doc_center/source",
|
|
8
|
-
"compatibilityUrl": "https://www.hiascend.com/
|
|
8
|
+
"compatibilityUrl": "https://www.hiascend.com/hardware/compatibility",
|
|
9
9
|
"apiStyles": {
|
|
10
|
-
"breadcrumbs": {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"breadcrumbs": {
|
|
11
|
+
"style": "query",
|
|
12
|
+
"path": "/doc/single/page/breadcrumbs"
|
|
13
|
+
},
|
|
14
|
+
"versionAnnouncement": {
|
|
15
|
+
"path": "/bulletins/front/nvod",
|
|
16
|
+
"paramName": "bulletinsType",
|
|
17
|
+
"bulletinType": 5
|
|
18
|
+
},
|
|
19
|
+
"versionTree": {
|
|
20
|
+
"style": "query",
|
|
21
|
+
"path": "/doc/version/new/tree"
|
|
22
|
+
}
|
|
13
23
|
},
|
|
14
24
|
"apiPaths": {
|
|
15
25
|
"searchSuggestions": "/content/querySameSearch",
|
|
@@ -20,8 +30,11 @@
|
|
|
20
30
|
"nodeTree": "/doc/node/tree",
|
|
21
31
|
"pdfDown": "/doc/pdf/down",
|
|
22
32
|
"caseLibraryList": "/case/library/list",
|
|
33
|
+
"caseLibraryDetail": "/case/library/detail",
|
|
34
|
+
"caseLibraryType": "/case/library/type",
|
|
23
35
|
"caseAssistantData": "/doc/caseAssistant/data",
|
|
24
36
|
"popularResource": "/popular/resource",
|
|
37
|
+
"popularDocs": "/popular/doc",
|
|
25
38
|
"cannDownloadTree": "/cannDownload/downloadTree",
|
|
26
39
|
"cannDownloadVersionList": "/cannDownload/version/list",
|
|
27
40
|
"cannDownloadCommand": "/cannDownload/downloadCommand",
|
|
@@ -35,68 +48,202 @@
|
|
|
35
48
|
},
|
|
36
49
|
"recommendations": {
|
|
37
50
|
"list_products": [
|
|
38
|
-
{
|
|
39
|
-
|
|
51
|
+
{
|
|
52
|
+
"tool": "list_versions",
|
|
53
|
+
"hint": "查看某产品的版本(参数 product 取本工具返回的产品 id)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"tool": "check_compatibility",
|
|
57
|
+
"hint": "检查硬件→软件兼容性矩阵"
|
|
58
|
+
}
|
|
40
59
|
],
|
|
41
60
|
"list_versions": [
|
|
42
|
-
{
|
|
43
|
-
|
|
61
|
+
{
|
|
62
|
+
"tool": "get_doc_toc",
|
|
63
|
+
"hint": "查看某版本的文档目录(参数 product/version 取本工具返回的 docpath 标识)"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"tool": "get_latest_version",
|
|
67
|
+
"hint": "获取最新稳定版本"
|
|
68
|
+
}
|
|
44
69
|
],
|
|
45
70
|
"get_doc_toc": [
|
|
46
|
-
{
|
|
71
|
+
{
|
|
72
|
+
"tool": "get_doc_content",
|
|
73
|
+
"hint": "获取具体文档页内容(参数 url 取本工具返回的 nodeUrl 或 codePath)"
|
|
74
|
+
}
|
|
47
75
|
],
|
|
48
76
|
"get_doc_content": [
|
|
49
|
-
{
|
|
50
|
-
|
|
77
|
+
{
|
|
78
|
+
"tool": "check_compatibility",
|
|
79
|
+
"hint": "安装前检查硬件兼容性",
|
|
80
|
+
"condition": "安装/部署类文档"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"tool": "search_troubleshooting",
|
|
84
|
+
"hint": "搜索安装/算子开发相关故障案例"
|
|
85
|
+
}
|
|
51
86
|
],
|
|
52
87
|
"search_docs": [
|
|
53
|
-
{
|
|
88
|
+
{
|
|
89
|
+
"tool": "get_doc_content",
|
|
90
|
+
"hint": "获取搜索到的文档内容(参数 url 取搜索结果的源文件路径)"
|
|
91
|
+
}
|
|
54
92
|
],
|
|
55
93
|
"check_compatibility": [
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
94
|
+
{
|
|
95
|
+
"tool": "get_doc_content",
|
|
96
|
+
"hint": "查看安装文档详情"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"tool": "get_download_options",
|
|
100
|
+
"hint": "获取 CANN 软件包下载选项树"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"tool": "get_install_commands",
|
|
104
|
+
"hint": "获取定制化安装命令"
|
|
105
|
+
}
|
|
59
106
|
],
|
|
60
107
|
"get_download_options": [
|
|
61
|
-
{
|
|
62
|
-
|
|
108
|
+
{
|
|
109
|
+
"tool": "get_install_commands",
|
|
110
|
+
"hint": "选择完成后获取安装命令(参数 hardwareId/cpuArchitectureId/operateSystemId/installMethodId 取本工具逐级选择的 id)"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"tool": "list_pdf_downloads",
|
|
114
|
+
"hint": "获取PDF文档下载列表"
|
|
115
|
+
}
|
|
63
116
|
],
|
|
64
117
|
"get_install_commands": [
|
|
65
|
-
{
|
|
66
|
-
|
|
118
|
+
{
|
|
119
|
+
"tool": "get_doc_content",
|
|
120
|
+
"hint": "查看安装文档详细说明"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"tool": "check_compatibility",
|
|
124
|
+
"hint": "确认硬件兼容性"
|
|
125
|
+
}
|
|
67
126
|
],
|
|
68
127
|
"list_pdf_downloads": [
|
|
69
|
-
{
|
|
128
|
+
{
|
|
129
|
+
"tool": "get_doc_content",
|
|
130
|
+
"hint": "查看对应文档内容(参数 url 取本工具返回的 pdfName 对应的文档路径)"
|
|
131
|
+
}
|
|
70
132
|
],
|
|
71
133
|
"browse_docs": [
|
|
72
|
-
{
|
|
134
|
+
{
|
|
135
|
+
"tool": "get_doc_content",
|
|
136
|
+
"hint": "获取文档详情内容(参数 url 取本工具返回的 firstDetailLink)"
|
|
137
|
+
}
|
|
73
138
|
],
|
|
74
139
|
"search_troubleshooting": [
|
|
75
|
-
{
|
|
140
|
+
{
|
|
141
|
+
"tool": "get_doc_content",
|
|
142
|
+
"hint": "获取案例完整正文(参数 url 取搜索结果的源文件路径 case/{caseId})",
|
|
143
|
+
"condition": "需要案例详情(原因分析、解决措施)时"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"tool": "search_docs",
|
|
147
|
+
"hint": "搜索相关文档补充背景知识"
|
|
148
|
+
}
|
|
76
149
|
],
|
|
77
150
|
"get_latest_version": [
|
|
78
|
-
{
|
|
151
|
+
{
|
|
152
|
+
"tool": "get_doc_toc",
|
|
153
|
+
"hint": "查看最新版本的文档目录(参数 product/version 取本工具返回的标识)"
|
|
154
|
+
}
|
|
79
155
|
],
|
|
80
156
|
"get_version_announcements": [
|
|
81
|
-
{
|
|
157
|
+
{
|
|
158
|
+
"tool": "get_latest_version",
|
|
159
|
+
"hint": "查看当前最新版本"
|
|
160
|
+
}
|
|
82
161
|
],
|
|
83
162
|
"search_docs_in_product": [
|
|
84
|
-
{
|
|
85
|
-
|
|
163
|
+
{
|
|
164
|
+
"tool": "get_doc_content",
|
|
165
|
+
"hint": "获取搜索到的文档内容(参数 url 取本工具返回的 codePath)"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"tool": "browse_docs",
|
|
169
|
+
"hint": "用searchContent搜索更广泛的关键词(安装/部署/推理等中文词在browse_docs中命中率更高)",
|
|
170
|
+
"condition": "搜索结果为空时"
|
|
171
|
+
}
|
|
86
172
|
],
|
|
87
173
|
"get_doc_outline": [
|
|
88
|
-
{
|
|
174
|
+
{
|
|
175
|
+
"tool": "get_doc_content",
|
|
176
|
+
"hint": "获取文档完整内容(参数 url 同本工具输入的 url)"
|
|
177
|
+
}
|
|
89
178
|
],
|
|
90
179
|
"get_code_samples": [
|
|
91
|
-
{
|
|
180
|
+
{
|
|
181
|
+
"tool": "get_doc_content",
|
|
182
|
+
"hint": "查看对应开发文档"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"get_popular_docs": [
|
|
186
|
+
{
|
|
187
|
+
"tool": "get_doc_content",
|
|
188
|
+
"hint": "获取热门文档的详细内容(参数 url 取本工具返回的 link)"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"tool": "list_products",
|
|
192
|
+
"hint": "浏览完整产品目录",
|
|
193
|
+
"condition": "热门文档未覆盖目标产品时"
|
|
194
|
+
}
|
|
92
195
|
]
|
|
93
196
|
},
|
|
94
197
|
"degradations": {
|
|
95
198
|
"check_compatibility": {
|
|
96
199
|
"type": "unsupported",
|
|
97
200
|
"reason": "/os/compatibility/list API返回结构与文档描述不一致,兼容性矩阵无法正确渲染",
|
|
98
|
-
"fallbackUrl": "https://www.hiascend.com/
|
|
201
|
+
"fallbackUrl": "https://www.hiascend.com/hardware/compatibility"
|
|
99
202
|
},
|
|
100
|
-
"popular_docs": {
|
|
101
|
-
|
|
102
|
-
}
|
|
203
|
+
"popular_docs": {
|
|
204
|
+
"type": "local_config"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"synonymMap": {
|
|
208
|
+
"profiling": ["性能分析", "性能调优", "性能数据", "profiling"],
|
|
209
|
+
"profile": ["性能分析", "性能调优", "profile"],
|
|
210
|
+
"debug": ["调试", "debug"],
|
|
211
|
+
"compile": ["编译", "compile"],
|
|
212
|
+
"deploy": ["部署", "deploy"],
|
|
213
|
+
"install": ["安装", "install"],
|
|
214
|
+
"tuning": ["调优", "tuning"],
|
|
215
|
+
"migration": ["迁移", "migration"],
|
|
216
|
+
"quantization": ["量化", "quantization"],
|
|
217
|
+
"pruning": ["剪枝", "pruning"],
|
|
218
|
+
"compression": ["压缩", "compression"],
|
|
219
|
+
"training": ["训练", "training"],
|
|
220
|
+
"inference": ["推理", "inference"],
|
|
221
|
+
"operator": ["算子", "operator"],
|
|
222
|
+
"model": ["模型", "model"],
|
|
223
|
+
"performance": ["性能", "performance"],
|
|
224
|
+
"accuracy": ["精度", "accuracy"],
|
|
225
|
+
"memory": ["内存", "memory"],
|
|
226
|
+
"overview": ["简介", "概述", "overview"],
|
|
227
|
+
"quickstart": ["快速入门", "quickstart"],
|
|
228
|
+
"userguide": ["用户指南", "userguide"],
|
|
229
|
+
"apireference": ["API参考", "apireference"],
|
|
230
|
+
"faq": ["常见问题", "FAQ"],
|
|
231
|
+
"release": ["版本说明", "release"]
|
|
232
|
+
},
|
|
233
|
+
"keywordPrefixes": ["Atlas ", "Atlas 200I ", "Atlas 300I ", "Atlas 300V ", "Atlas 500 ", "Atlas 800I ", "Atlas 800T ", "Atlas 900 ", "A300I "],
|
|
234
|
+
"crossCommunityKeywords": [
|
|
235
|
+
"DevKit",
|
|
236
|
+
"BoostKit",
|
|
237
|
+
"FlexDA",
|
|
238
|
+
"OmniRuntime",
|
|
239
|
+
"K-NET",
|
|
240
|
+
"鲲鹏RAG",
|
|
241
|
+
"鲲鹏数据库",
|
|
242
|
+
"鲲鹏大数据",
|
|
243
|
+
"鲲鹏云手机",
|
|
244
|
+
"机密计算",
|
|
245
|
+
"HPCKit",
|
|
246
|
+
"毕昇",
|
|
247
|
+
"同辕"
|
|
248
|
+
]
|
|
249
|
+
}
|
package/configs/hikunpeng.json
CHANGED
|
@@ -5,11 +5,21 @@
|
|
|
5
5
|
"baseUrl": "https://www.hikunpeng.com",
|
|
6
6
|
"gateway": "/kunpenggateway/kunpengservice",
|
|
7
7
|
"sourceBase": "/doc_center/source",
|
|
8
|
-
"compatibilityUrl": "https://www.hikunpeng.com/document/
|
|
8
|
+
"compatibilityUrl": "https://www.hikunpeng.com/zh/document/home",
|
|
9
9
|
"apiStyles": {
|
|
10
|
-
"breadcrumbs": {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"breadcrumbs": {
|
|
11
|
+
"style": "path",
|
|
12
|
+
"path": "/doc/page/breadcrumbs"
|
|
13
|
+
},
|
|
14
|
+
"versionAnnouncement": {
|
|
15
|
+
"path": "/bulletin/featured",
|
|
16
|
+
"paramName": "bulletinType",
|
|
17
|
+
"bulletinType": "文档动态"
|
|
18
|
+
},
|
|
19
|
+
"versionTree": {
|
|
20
|
+
"style": "path",
|
|
21
|
+
"path": "/doc/version/tree"
|
|
22
|
+
}
|
|
13
23
|
},
|
|
14
24
|
"apiPaths": {
|
|
15
25
|
"searchSuggestions": "/content/querySameSearch",
|
|
@@ -31,53 +41,144 @@
|
|
|
31
41
|
},
|
|
32
42
|
"recommendations": {
|
|
33
43
|
"list_products": [
|
|
34
|
-
{
|
|
35
|
-
|
|
44
|
+
{
|
|
45
|
+
"tool": "list_versions",
|
|
46
|
+
"hint": "查看某产品的版本(参数 product 取本工具返回的产品 id;鲲鹏多为单版本,version 用 docpath 标识)"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"tool": "search_troubleshooting",
|
|
50
|
+
"hint": "搜索迁移/调优相关案例(优先新版956条)"
|
|
51
|
+
}
|
|
36
52
|
],
|
|
37
53
|
"list_versions": [
|
|
38
|
-
{
|
|
54
|
+
{
|
|
55
|
+
"tool": "get_doc_toc",
|
|
56
|
+
"hint": "查看某版本的文档目录(参数 product/version 取本工具返回的 docpath 标识;鲲鹏单版本产品 version=docpath)"
|
|
57
|
+
}
|
|
39
58
|
],
|
|
40
59
|
"get_doc_toc": [
|
|
41
|
-
{
|
|
60
|
+
{
|
|
61
|
+
"tool": "get_doc_content",
|
|
62
|
+
"hint": "获取具体文档页内容(参数 url 取本工具返回的 nodeUrl 或 codePath)"
|
|
63
|
+
}
|
|
42
64
|
],
|
|
43
65
|
"get_doc_content": [
|
|
44
|
-
{
|
|
66
|
+
{
|
|
67
|
+
"tool": "search_troubleshooting",
|
|
68
|
+
"hint": "搜索迁移/调优/编译相关故障案例"
|
|
69
|
+
}
|
|
45
70
|
],
|
|
46
71
|
"search_docs": [
|
|
47
|
-
{
|
|
72
|
+
{
|
|
73
|
+
"tool": "get_doc_content",
|
|
74
|
+
"hint": "获取搜索到的文档内容(参数 url 取搜索结果的源文件路径)"
|
|
75
|
+
}
|
|
48
76
|
],
|
|
49
77
|
"browse_docs": [
|
|
50
|
-
{
|
|
78
|
+
{
|
|
79
|
+
"tool": "get_doc_content",
|
|
80
|
+
"hint": "获取文档详情内容(参数 url 取本工具返回的 firstDetailLink)"
|
|
81
|
+
}
|
|
51
82
|
],
|
|
52
83
|
"search_troubleshooting": [
|
|
53
|
-
{
|
|
84
|
+
{
|
|
85
|
+
"tool": "get_doc_content",
|
|
86
|
+
"hint": "获取案例完整正文(参数 url 取搜索结果的 firstDetailLink)",
|
|
87
|
+
"condition": "需要案例详情时"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"tool": "search_docs",
|
|
91
|
+
"hint": "搜索相关文档补充背景知识"
|
|
92
|
+
}
|
|
54
93
|
],
|
|
55
94
|
"get_latest_version": [
|
|
56
|
-
{
|
|
95
|
+
{
|
|
96
|
+
"tool": "get_doc_toc",
|
|
97
|
+
"hint": "查看最新版本的文档目录(参数 product/version 取本工具返回的标识)"
|
|
98
|
+
}
|
|
57
99
|
],
|
|
58
100
|
"get_version_announcements": [
|
|
59
|
-
{
|
|
101
|
+
{
|
|
102
|
+
"tool": "get_latest_version",
|
|
103
|
+
"hint": "查看当前最新版本"
|
|
104
|
+
}
|
|
60
105
|
],
|
|
61
106
|
"search_docs_in_product": [
|
|
62
|
-
{
|
|
63
|
-
|
|
107
|
+
{
|
|
108
|
+
"tool": "get_doc_content",
|
|
109
|
+
"hint": "获取搜索到的文档内容(参数 url 取本工具返回的 codePath)"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"tool": "browse_docs",
|
|
113
|
+
"hint": "用searchContent搜索更广泛的关键词(安装/部署/推理等中文词在browse_docs中命中率更高)",
|
|
114
|
+
"condition": "搜索结果为空时"
|
|
115
|
+
}
|
|
64
116
|
],
|
|
65
117
|
"get_doc_outline": [
|
|
66
|
-
{
|
|
118
|
+
{
|
|
119
|
+
"tool": "get_doc_content",
|
|
120
|
+
"hint": "获取文档完整内容(参数 url 同本工具输入的 url)"
|
|
121
|
+
}
|
|
67
122
|
],
|
|
68
123
|
"get_code_samples": [
|
|
69
|
-
{
|
|
124
|
+
{
|
|
125
|
+
"tool": "get_doc_content",
|
|
126
|
+
"hint": "查看对应开发文档(参数 url 取本工具返回的文档链接)"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"get_popular_docs": [
|
|
130
|
+
{
|
|
131
|
+
"tool": "list_products",
|
|
132
|
+
"hint": "浏览完整产品目录(鲲鹏无热门文档接口,建议直接浏览产品)"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"tool": "search_docs",
|
|
136
|
+
"hint": "搜索文档"
|
|
137
|
+
}
|
|
70
138
|
]
|
|
71
139
|
},
|
|
72
140
|
"degradations": {
|
|
73
141
|
"check_compatibility": {
|
|
74
142
|
"type": "unsupported",
|
|
75
143
|
"reason": "鲲鹏社区不提供硬件→软件兼容性查询接口(接口404)",
|
|
76
|
-
"fallbackUrl": "https://www.hikunpeng.com/document/
|
|
144
|
+
"fallbackUrl": "https://www.hikunpeng.com/zh/document/home"
|
|
77
145
|
},
|
|
78
146
|
"popular_docs": {
|
|
79
147
|
"type": "unsupported",
|
|
80
148
|
"reason": "鲲鹏社区不提供热门文档接口"
|
|
81
149
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
150
|
+
},
|
|
151
|
+
"synonymMap": {
|
|
152
|
+
"profiling": ["性能分析", "性能调优", "profiling"],
|
|
153
|
+
"debug": ["调试", "debug"],
|
|
154
|
+
"compile": ["编译", "compile"],
|
|
155
|
+
"deploy": ["部署", "deploy"],
|
|
156
|
+
"install": ["安装", "install"],
|
|
157
|
+
"tuning": ["调优", "tuning"],
|
|
158
|
+
"migration": ["迁移", "migration"],
|
|
159
|
+
"training": ["训练", "training"],
|
|
160
|
+
"inference": ["推理", "inference"],
|
|
161
|
+
"performance": ["性能", "performance"],
|
|
162
|
+
"overview": ["简介", "概述", "overview"],
|
|
163
|
+
"quickstart": ["快速入门", "quickstart"],
|
|
164
|
+
"userguide": ["用户指南", "userguide"],
|
|
165
|
+
"apireference": ["API参考", "apireference"],
|
|
166
|
+
"faq": ["常见问题", "FAQ"],
|
|
167
|
+
"release": ["版本说明", "release"]
|
|
168
|
+
},
|
|
169
|
+
"keywordPrefixes": [],
|
|
170
|
+
"crossCommunityKeywords": [
|
|
171
|
+
"CANN",
|
|
172
|
+
"MindIE",
|
|
173
|
+
"MindSpore",
|
|
174
|
+
"MindSpeed",
|
|
175
|
+
"MindEdge",
|
|
176
|
+
"MindSDK",
|
|
177
|
+
"Atlas",
|
|
178
|
+
"ATC",
|
|
179
|
+
"Ascend C",
|
|
180
|
+
"torch_npu",
|
|
181
|
+
"PyTorch",
|
|
182
|
+
"TensorFlow"
|
|
183
|
+
]
|
|
184
|
+
}
|