vision_extract
Extract specified fields from PDFs or images into structured JSON using a local vision model. Define fields to get only the needed data from documents.
Instructions
vision_extract tool:视觉路单跑。
V1.3:新增 image_path 参数(独立图片输入,与 pdf_path 互斥二选一)。
Args: pdf_path: PDF 路径(与 image_path 互斥;二者必传其一)。 fields: 字段键(str | list[str] | dict;必填)。 pages: 页号(int | list[int] | None;1-based;图片输入忽略)。 model: 模型名(可选,默认 Settings.ollama_model)。 image_path: 独立图片文件路径(PNG/JPG 等,V1.3 新增)。
Returns: 结构化 JSON 文本(VisionExtractOutput)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| pages | No | ||
| fields | No | ||
| pdf_path | No | ||
| image_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |