rag_index_file
Index a local file into a knowledge base by detecting its format, splitting content structurally, generating vector embeddings, and skipping unchanged files via SHA-256 checks.
Instructions
摄取本地单个文件,自动识别文件格式并进行结构感知切片、向量嵌入与持久化索引。
支持 SHA-256 内容指纹校验与幂等更新(若文件未修改则秒级跳过)。
Args:
kb_name: 目标知识库名称
file_path: 本地文件绝对或相对路径
metadata: 可选的附加结构化元数据(标签、分类等)
Returns:
dict[str, Any]: 索引结果状态字典
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": {
"kb_name": "<kb_name>",
"file_path": "<file_path>"
},
"name": "rag_index_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kb_name | Yes | ||
| metadata | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||