ai4scholar 0.6.0 → 0.6.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 +15 -5
- package/package.json +8 -2
- package/docs/tutorial.md +0 -344
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ AI4Scholar gives your OpenClaw agent direct access to **6 academic platforms** t
|
|
|
19
19
|
| **bioRxiv** | Biology preprints |
|
|
20
20
|
| **medRxiv** | Health sciences preprints |
|
|
21
21
|
|
|
22
|
-
### Tools (
|
|
22
|
+
### Tools (36)
|
|
23
23
|
|
|
24
24
|
**Search (9)**
|
|
25
25
|
|
|
@@ -113,10 +113,22 @@ AI4Scholar gives your OpenClaw agent direct access to **6 academic platforms** t
|
|
|
113
113
|
openclaw plugins install ai4scholar
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
### From GitHub
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
openclaw plugins install github:literaf/ai4scholar
|
|
120
|
+
```
|
|
121
|
+
|
|
116
122
|
After installation, **restart the gateway**:
|
|
117
123
|
|
|
118
124
|
```bash
|
|
119
|
-
openclaw gateway
|
|
125
|
+
openclaw gateway stop && openclaw gateway start
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Update
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
openclaw plugins update ai4scholar
|
|
120
132
|
```
|
|
121
133
|
|
|
122
134
|
### Verify
|
|
@@ -167,7 +179,7 @@ Add citations to this Introduction paragraph: <paste text>
|
|
|
167
179
|
Give me a literature survey on protein folding methods since 2020
|
|
168
180
|
```
|
|
169
181
|
|
|
170
|
-
For detailed usage
|
|
182
|
+
For detailed usage, visit [ai4scholar.net](https://ai4scholar.net?src=openclaw).
|
|
171
183
|
|
|
172
184
|
## Project Structure
|
|
173
185
|
|
|
@@ -190,8 +202,6 @@ ai4scholar/
|
|
|
190
202
|
│ ├── hooks/
|
|
191
203
|
│ │ └── scholar-mode.ts # Scholar mode system prompt
|
|
192
204
|
│ └── commands.ts # Slash commands
|
|
193
|
-
├── docs/
|
|
194
|
-
│ └── tutorial.md # Installation & usage tutorial
|
|
195
205
|
├── openclaw.plugin.json
|
|
196
206
|
└── index.ts
|
|
197
207
|
```
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai4scholar",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Multi-source academic literature search, management, and analysis plugin for OpenClaw. Powered by ai4scholar.net.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"!dist/*.map",
|
|
10
|
-
"docs",
|
|
11
10
|
"openclaw.plugin.json"
|
|
12
11
|
],
|
|
13
12
|
"keywords": [
|
|
@@ -25,6 +24,13 @@
|
|
|
25
24
|
"author": "ai4scholar",
|
|
26
25
|
"license": "MIT",
|
|
27
26
|
"homepage": "https://ai4scholar.net?src=openclaw",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/literaf/ai4scholar.git"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/literaf/ai4scholar/issues"
|
|
33
|
+
},
|
|
28
34
|
"scripts": {
|
|
29
35
|
"build": "node esbuild.config.mjs",
|
|
30
36
|
"build:tsc": "tsc --noEmit",
|
package/docs/tutorial.md
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
# AI4Scholar OpenClaw 教程:安装、配置与使用
|
|
2
|
-
|
|
3
|
-
> 让你的 OpenClaw 龙虾学会搜论文、读全文、加引用、画科研图。
|
|
4
|
-
|
|
5
|
-
AI4Scholar 提供两种接入方式:
|
|
6
|
-
|
|
7
|
-
| | MCP 方式(轻量) | 插件方式(完整) |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| 安装 | 无需安装,改配置即可 | 需要安装插件(零依赖,秒级完成) |
|
|
10
|
-
| 学术搜索工具 | ✅ | ✅ 36 个工具 |
|
|
11
|
-
| PDF 下载/阅读 | ✅ | ✅ |
|
|
12
|
-
| 文献自动标注 | ✅ | ✅ `auto_cite` |
|
|
13
|
-
| 科研绘图 | ✅ | ✅ `sci_draw` |
|
|
14
|
-
| Scholar Mode 提示 | ❌ | ✅ 自动注入学术助手上下文 |
|
|
15
|
-
| Slash 命令 | ❌ | ✅ `/library` `/projects` `/reading-list` |
|
|
16
|
-
|
|
17
|
-
**推荐**:MCP 方式已覆盖搜索、PDF、自动标注、科研绘图等核心能力,适合快速上手;插件方式额外提供 Scholar Mode 智能提示和 Slash 快捷命令。
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 一、获取 API Key
|
|
22
|
-
|
|
23
|
-
1. 打开 [ai4scholar.net](https://ai4scholar.net?src=openclaw)
|
|
24
|
-
2. 注册或登录你的账号
|
|
25
|
-
3. 点击「创建 API Key」,复制生成的 Key
|
|
26
|
-
|
|
27
|
-
请妥善保管你的 API Key,不要分享给他人。
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 二、MCP 接入(轻量)
|
|
32
|
-
|
|
33
|
-
适合只想快速体验论文搜索的用户,无需安装任何东西。
|
|
34
|
-
|
|
35
|
-
### 对话方式
|
|
36
|
-
|
|
37
|
-
直接在 OpenClaw 聊天中发送:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
请帮我配置 ai4scholar 的 MCP 服务器。在 openclaw.json 的 mcpServers 中添加:url 为 https://mcp.ai4scholar.net/sse,headers 中 Authorization 为 "Bearer 你的API Key"。配好后重启 Gateway。
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
> 把「你的API Key」替换成你在第一步获取的真实 Key。
|
|
44
|
-
|
|
45
|
-
### 手动方式
|
|
46
|
-
|
|
47
|
-
在 `openclaw.json`(通常在 `~/.openclaw/openclaw.json`)中添加:
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"mcpServers": {
|
|
52
|
-
"ai4scholar": {
|
|
53
|
-
"url": "https://mcp.ai4scholar.net/sse",
|
|
54
|
-
"headers": {
|
|
55
|
-
"Authorization": "Bearer 你的API Key"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
重启 Gateway:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
openclaw gateway stop && openclaw gateway start
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
配好后直接跟 Agent 对话就能搜论文了。如果你需要 Scholar Mode 智能提示和 Slash 命令等额外能力,继续往下安装插件。
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## 三、安装插件(完整体验)
|
|
73
|
-
|
|
74
|
-
获得全部 36 个工具 + Scholar Mode + Slash 命令。
|
|
75
|
-
|
|
76
|
-
### 对话方式
|
|
77
|
-
|
|
78
|
-
直接在 OpenClaw 聊天中发送:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
请帮我安装 ai4scholar 插件,然后在 openclaw.json 的 plugins.entries.ai4scholar 中配置 config.apiKey 为 "你的API Key",最后重启 Gateway。
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
> 把「你的API Key」替换成你在第一步获取的真实 Key。OpenClaw 会自动完成安装、配置和重启。
|
|
85
|
-
|
|
86
|
-
### 手动方式
|
|
87
|
-
|
|
88
|
-
#### 前提条件
|
|
89
|
-
|
|
90
|
-
- **OpenClaw** ≥ 2024.0.0
|
|
91
|
-
- **Node.js** ≥ 18
|
|
92
|
-
|
|
93
|
-
#### 安装
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
openclaw plugins install ai4scholar
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
插件为零依赖打包,安装通常几秒完成,无需额外下载依赖。
|
|
100
|
-
|
|
101
|
-
#### 配置 API Key
|
|
102
|
-
|
|
103
|
-
打开 `openclaw.json`(通常在 `~/.openclaw/openclaw.json`),找到 `ai4scholar` 部分,加上 `config`:
|
|
104
|
-
|
|
105
|
-
```json
|
|
106
|
-
"ai4scholar": {
|
|
107
|
-
"enabled": true,
|
|
108
|
-
"config": {
|
|
109
|
-
"apiKey": "你的API Key"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
> 安装器会自动创建 `"ai4scholar": { "enabled": true }`,你只需要加上 `"config": { "apiKey": "..." }` 即可。
|
|
115
|
-
|
|
116
|
-
#### 重启 Gateway
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
openclaw gateway stop && openclaw gateway start
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
> `openclaw gateway start` 以后台服务运行,关闭终端也不会停止。前台调试用 `openclaw gateway`。
|
|
123
|
-
|
|
124
|
-
启动日志中出现 `apiKey: configured` 说明配置成功。
|
|
125
|
-
|
|
126
|
-
> **提示**:arXiv / bioRxiv / medRxiv 工具无需 API Key 即可使用。
|
|
127
|
-
|
|
128
|
-
#### 验证
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
openclaw plugins list
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## 四、插件能力一览
|
|
137
|
-
|
|
138
|
-
安装后,你的 OpenClaw Agent 将获得 **36 个学术工具**,覆盖 6 大数据库平台。
|
|
139
|
-
|
|
140
|
-
### 4.1 论文搜索
|
|
141
|
-
|
|
142
|
-
| 工具 | 平台 | 说明 |
|
|
143
|
-
|------|------|------|
|
|
144
|
-
| `search_semantic` | Semantic Scholar | 语义搜索,支持年份过滤 |
|
|
145
|
-
| `search_pubmed` | PubMed | 生物医学论文搜索,支持日期范围 |
|
|
146
|
-
| `search_google_scholar` | Google Scholar | 通过 ai4scholar 代理搜索 |
|
|
147
|
-
| `search_arxiv` | arXiv | 搜索预印本论文 |
|
|
148
|
-
| `search_biorxiv` | bioRxiv | 搜索生物学预印本 |
|
|
149
|
-
| `search_medrxiv` | medRxiv | 搜索医学预印本 |
|
|
150
|
-
| `search_semantic_snippets` | Semantic Scholar | 在论文全文中搜索文本片段 |
|
|
151
|
-
| `search_semantic_bulk` | Semantic Scholar | 批量搜索,单次最多 1000 条 |
|
|
152
|
-
| `search_semantic_paper_match` | Semantic Scholar | 按标题精确匹配 |
|
|
153
|
-
|
|
154
|
-
### 4.2 论文详情
|
|
155
|
-
|
|
156
|
-
| 工具 | 说明 |
|
|
157
|
-
|------|------|
|
|
158
|
-
| `get_semantic_paper_detail` | 获取论文详细信息(支持 DOI、arXiv ID、PMID 等) |
|
|
159
|
-
| `get_pubmed_paper_detail` | 获取 PubMed 论文详情 |
|
|
160
|
-
| `get_semantic_paper_batch` | 批量获取论文详情(最多 500 篇) |
|
|
161
|
-
| `get_pubmed_paper_batch` | 批量获取 PubMed 论文详情 |
|
|
162
|
-
|
|
163
|
-
### 4.3 引用与参考文献
|
|
164
|
-
|
|
165
|
-
| 工具 | 说明 |
|
|
166
|
-
|------|------|
|
|
167
|
-
| `get_semantic_citations` | 查看谁引用了这篇论文 |
|
|
168
|
-
| `get_semantic_references` | 查看这篇论文引用了谁 |
|
|
169
|
-
| `get_pubmed_citations` | PubMed 引用查询 |
|
|
170
|
-
| `get_pubmed_related` | PubMed 相关论文推荐 |
|
|
171
|
-
|
|
172
|
-
### 4.4 作者信息
|
|
173
|
-
|
|
174
|
-
| 工具 | 说明 |
|
|
175
|
-
|------|------|
|
|
176
|
-
| `search_semantic_authors` | 按姓名搜索作者 |
|
|
177
|
-
| `get_semantic_author_detail` | 获取作者详情(h-index、论文数等) |
|
|
178
|
-
| `get_semantic_author_papers` | 获取某作者的所有论文 |
|
|
179
|
-
| `get_semantic_author_batch` | 批量获取作者详情(最多 1000 人) |
|
|
180
|
-
| `get_semantic_paper_authors` | 获取某论文的所有作者详情 |
|
|
181
|
-
|
|
182
|
-
### 4.5 论文推荐
|
|
183
|
-
|
|
184
|
-
| 工具 | 说明 |
|
|
185
|
-
|------|------|
|
|
186
|
-
| `get_semantic_recommendations` | 基于多篇论文推荐相关论文 |
|
|
187
|
-
| `get_semantic_recommendations_for_paper` | 基于单篇论文推荐 |
|
|
188
|
-
|
|
189
|
-
### 4.6 PDF 下载与全文阅读
|
|
190
|
-
|
|
191
|
-
| 工具 | 说明 |
|
|
192
|
-
|------|------|
|
|
193
|
-
| `download_semantic` | 获取 Semantic Scholar 开放获取 PDF 链接 |
|
|
194
|
-
| `read_semantic_paper` | 下载并提取 Semantic Scholar 论文全文 |
|
|
195
|
-
| `download_arxiv` | 获取 arXiv 论文 PDF 链接 |
|
|
196
|
-
| `read_arxiv_paper` | 下载并提取 arXiv 论文全文 |
|
|
197
|
-
| `download_biorxiv` | 获取 bioRxiv 论文 PDF 链接 |
|
|
198
|
-
| `download_medrxiv` | 获取 medRxiv 论文 PDF 链接 |
|
|
199
|
-
| `read_biorxiv_paper` | 下载并提取 bioRxiv 论文全文 |
|
|
200
|
-
| `read_medrxiv_paper` | 下载并提取 medRxiv 论文全文 |
|
|
201
|
-
| `download_by_doi` | 通过 DOI 下载论文 PDF(支持校园网机构访问) |
|
|
202
|
-
| `read_by_doi` | 通过 DOI 下载并提取论文全文 |
|
|
203
|
-
|
|
204
|
-
### 4.7 文献自动标注
|
|
205
|
-
|
|
206
|
-
| 工具 | 说明 |
|
|
207
|
-
|------|------|
|
|
208
|
-
| `auto_cite` | 一键为学术文本添加真实引用,支持 IEEE / APA / Vancouver / Nature 格式,返回标注文本 + 参考文献列表 + BibTeX |
|
|
209
|
-
|
|
210
|
-
### 4.8 科研绘图
|
|
211
|
-
|
|
212
|
-
| 工具 | 说明 |
|
|
213
|
-
|------|------|
|
|
214
|
-
| `sci_draw` | AI 科研绘图:智能绘图(支持中文)、文生图、图片编辑、风格转换、多图组合、迭代优化、图片评审、SVG 矢量图 |
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## 五、Slash 命令
|
|
219
|
-
|
|
220
|
-
安装插件后,你可以在聊天中使用以下快捷命令:
|
|
221
|
-
|
|
222
|
-
| 命令 | 说明 |
|
|
223
|
-
|------|------|
|
|
224
|
-
| `/library` | 列出当前项目中已下载的论文 |
|
|
225
|
-
| `/projects` | 列出所有文献项目 |
|
|
226
|
-
| `/reading-list` | 显示当前项目的阅读列表 |
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## 六、使用示例
|
|
231
|
-
|
|
232
|
-
以下是一些常见的使用场景,直接在聊天中发送即可。
|
|
233
|
-
|
|
234
|
-
### 搜索论文
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
帮我搜一下 CRISPR 在肿瘤免疫治疗中的最新进展
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
搜一下 2023 年以来关于 diffusion model 在蛋白质设计中的应用
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 查看论文详情
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
帮我查一下这篇论文的详细信息:10.1038/s41586-021-03819-2
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### 查看引用网络
|
|
251
|
-
|
|
252
|
-
```
|
|
253
|
-
这篇 AlphaFold 论文被哪些高引论文引用了?
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### 阅读全文
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
帮我读一下 arXiv:2401.12345 这篇论文的全文,总结一下 Methods 部分
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### 通过 DOI 下载论文
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
帮我下载这篇论文的 PDF:10.1126/science.abj8754
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
> 注意:通过 DOI 下载付费论文需要你的 OpenClaw 服务器部署在有机构访问权限的网络(如校园网)中。
|
|
269
|
-
|
|
270
|
-
### 自动加引用
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
给下面这段 Introduction 加上引用,用 IEEE 格式:
|
|
274
|
-
|
|
275
|
-
(粘贴你的学术文本,100-10000 字符)
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Agent 会调用 `auto_cite` 工具,服务端自动完成引用匹配,返回标注好的文本和参考文献列表(约 20-60 秒)。
|
|
279
|
-
|
|
280
|
-
### 科研绘图
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
帮我画一张蛋白质结构示意图,标注 alpha helix 和 beta sheet
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
```
|
|
287
|
-
帮我画一张 CRISPR-Cas9 基因编辑机制图,用高质量模式
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
```
|
|
291
|
-
把这张图转换成论文风格(发送图片后)
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## 七、常见问题
|
|
297
|
-
|
|
298
|
-
### Q: 安装后提示 "plugin not found"
|
|
299
|
-
|
|
300
|
-
确保 `openclaw.json` 中的 `plugins.entries` 里有 `ai4scholar` 的配置项。如果刚安装完就报错,尝试运行:
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
openclaw doctor --fix
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### Q: 搜索结果为空
|
|
307
|
-
|
|
308
|
-
检查以下几点:
|
|
309
|
-
1. API Key 是否正确配置
|
|
310
|
-
2. 网络是否通畅(需要能访问 ai4scholar.net)
|
|
311
|
-
3. 搜索关键词是否过于狭窄,尝试换更宽泛的关键词
|
|
312
|
-
|
|
313
|
-
### Q: DOI 下载论文失败
|
|
314
|
-
|
|
315
|
-
通过 DOI 下载付费论文需要网络环境支持。如果你的 OpenClaw 服务器不在校园网或有机构订阅的网络中,只能下载开放获取(Open Access)的论文。
|
|
316
|
-
|
|
317
|
-
对于开放获取论文,推荐优先使用 `download_semantic`、`download_arxiv` 等工具。
|
|
318
|
-
|
|
319
|
-
### Q: PDF 全文提取的文本质量不好
|
|
320
|
-
|
|
321
|
-
PDF 文本提取依赖论文的 PDF 格式。扫描版 PDF 或图片较多的论文可能提取效果不佳。对于这类论文,建议直接阅读 PDF 原文。
|
|
322
|
-
|
|
323
|
-
### Q: 如何更新插件
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
openclaw plugins update ai4scholar
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
更新后重启 Gateway:
|
|
330
|
-
|
|
331
|
-
```bash
|
|
332
|
-
openclaw gateway stop && openclaw gateway start
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
> 更新所有插件:`openclaw plugins update --all`。
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
## 八、反馈与帮助
|
|
340
|
-
|
|
341
|
-
- **网站**: [ai4scholar.net](https://ai4scholar.net?src=openclaw)
|
|
342
|
-
- **问题反馈**: 请在 [ai4scholar.net](https://ai4scholar.net?src=openclaw) 联系我们
|
|
343
|
-
|
|
344
|
-
让每只龙虾都学会搜论文。
|