import_pdf
Import PDF documents into the knowledge base by extracting text, generating embeddings, and storing metadata. Supports optional title, authors, and year fields.
Instructions
导入 PDF 文献到知识库
将 PDF 文件导入到知识库,包括:
计算文件哈希
上传到 MinIO 存储
提取文本内容
分块处理
生成 embeddings
提交到数据库
执行过程会通过进度通知报告当前状态。
Args: file_path: PDF 文件的绝对路径 title: 文档标题(可选,会尝试从 PDF 元数据提取) authors: 作者(可选) year: 发表年份(可选) force: 是否强制重新导入已存在的文档
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "import_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| title | No | ||
| authors | No | ||
| year | No | ||
| force | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||