Files
urbanLifeline/difyPlugin/pdf/tools/pdf_toc.yaml

52 lines
1.6 KiB
YAML
Raw Normal View History

2026-03-06 14:50:43 +08:00
identity:
name: "pdf_toc"
author: "yslg"
label:
2026-03-15 13:00:30 +08:00
en_US: "PDF TOC"
zh_Hans: "PDF 目录提取"
pt_BR: "PDF TOC"
ja_JP: "PDF TOC"
2026-03-06 14:50:43 +08:00
description:
human:
2026-03-15 13:00:30 +08:00
en_US: "Extract the catalog array from a PDF file using metadata or LLM."
zh_Hans: "从PDF文件中提取目录数组优先使用元数据回退使用LLM解析。"
pt_BR: "Extrair o array de catálogo de um arquivo PDF."
ja_JP: "PDFファイルからカタログ配列を抽出する。"
llm: "Extract a catalog array from a PDF file. Returns JSON text like [{title,start,end,page_start_index,page_end_index}]."
2026-03-06 14:50:43 +08:00
parameters:
2026-03-15 13:00:30 +08:00
- name: file
type: file
2026-03-06 14:50:43 +08:00
required: true
label:
2026-03-15 13:00:30 +08:00
en_US: PDF File
zh_Hans: PDF 文件
pt_BR: PDF File
ja_JP: PDF File
2026-03-06 14:50:43 +08:00
human_description:
2026-03-15 13:00:30 +08:00
en_US: "PDF file to inspect"
zh_Hans: "要解析的PDF文件"
pt_BR: "PDF file to inspect"
ja_JP: "PDF file to inspect"
llm_description: "PDF file to extract catalog from"
2026-03-06 14:50:43 +08:00
form: llm
2026-03-15 13:00:30 +08:00
fileTypes:
- "pdf"
2026-03-06 14:50:43 +08:00
- name: model
type: model-selector
scope: llm
required: true
label:
en_US: LLM Model
zh_Hans: LLM 模型
pt_BR: Modelo LLM
ja_JP: LLMモデル
human_description:
2026-03-15 13:00:30 +08:00
en_US: "LLM model used for parsing TOC when metadata is unavailable"
zh_Hans: "当元数据不可用时用于解析目录的LLM模型"
pt_BR: "Modelo LLM para análise de TOC"
ja_JP: "メタデータが利用できない場合のTOC解析用LLMモデル"
2026-03-06 14:50:43 +08:00
form: form
extra:
python:
source: tools/pdf_toc.py