100 lines
3.5 KiB
YAML
100 lines
3.5 KiB
YAML
|
|
identity:
|
|||
|
|
name: "pdf_summary"
|
|||
|
|
author: "yslg"
|
|||
|
|
label:
|
|||
|
|
en_US: "PDF Page Summary"
|
|||
|
|
zh_Hans: "PDF页面概述"
|
|||
|
|
pt_BR: "Resumo de Página PDF"
|
|||
|
|
ja_JP: "PDFページ概要"
|
|||
|
|
description:
|
|||
|
|
human:
|
|||
|
|
en_US: "Extract core elements (text, image, table, path) from PDF pages with coordinates, then summarize via LLM"
|
|||
|
|
zh_Hans: "提取PDF页面核心元素(文本、图片、表格、路径)及坐标,并通过LLM进行概述"
|
|||
|
|
pt_BR: "Extrair elementos principais (texto, imagem, tabela, caminho) de páginas PDF com coordenadas e resumir via LLM"
|
|||
|
|
ja_JP: "PDFページからコア要素(テキスト、画像、テーブル、パス)を座標付きで抽出し、LLMで要約"
|
|||
|
|
llm: "Extract core elements (text, image, table, drawing path) with coordinates from specified PDF page range, then use LLM to summarize the content"
|
|||
|
|
parameters:
|
|||
|
|
- name: file
|
|||
|
|
type: file
|
|||
|
|
required: true
|
|||
|
|
label:
|
|||
|
|
en_US: PDF File
|
|||
|
|
zh_Hans: PDF 文件
|
|||
|
|
pt_BR: Arquivo PDF
|
|||
|
|
ja_JP: PDFファイル
|
|||
|
|
human_description:
|
|||
|
|
en_US: "PDF file to process"
|
|||
|
|
zh_Hans: "要处理的 PDF 文件"
|
|||
|
|
pt_BR: "Arquivo PDF para processar"
|
|||
|
|
ja_JP: "処理するPDFファイル"
|
|||
|
|
llm_description: "PDF file to extract elements from and summarize"
|
|||
|
|
form: llm
|
|||
|
|
fileTypes:
|
|||
|
|
- "pdf"
|
|||
|
|
- name: pdf_start_page
|
|||
|
|
type: number
|
|||
|
|
required: true
|
|||
|
|
label:
|
|||
|
|
en_US: Start Page
|
|||
|
|
zh_Hans: 起始页码
|
|||
|
|
pt_BR: Página Inicial
|
|||
|
|
ja_JP: 開始ページ
|
|||
|
|
human_description:
|
|||
|
|
en_US: "Start page index (0-based)"
|
|||
|
|
zh_Hans: "起始页码(从0开始)"
|
|||
|
|
pt_BR: "Índice da página inicial (base 0)"
|
|||
|
|
ja_JP: "開始ページ番号(0始まり)"
|
|||
|
|
llm_description: "Start page index (0-based) for element extraction"
|
|||
|
|
form: llm
|
|||
|
|
default: 0
|
|||
|
|
- name: pdf_end_page
|
|||
|
|
type: number
|
|||
|
|
required: true
|
|||
|
|
label:
|
|||
|
|
en_US: End Page
|
|||
|
|
zh_Hans: 结束页码
|
|||
|
|
pt_BR: Página Final
|
|||
|
|
ja_JP: 終了ページ
|
|||
|
|
human_description:
|
|||
|
|
en_US: "End page index (0-based, inclusive)"
|
|||
|
|
zh_Hans: "结束页码(从0开始,包含该页)"
|
|||
|
|
pt_BR: "Índice da página final (base 0, inclusivo)"
|
|||
|
|
ja_JP: "終了ページ番号(0始まり、含む)"
|
|||
|
|
llm_description: "End page index (0-based, inclusive) for element extraction"
|
|||
|
|
form: llm
|
|||
|
|
default: 0
|
|||
|
|
- 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:
|
|||
|
|
en_US: "LLM model used for summarizing extracted content"
|
|||
|
|
zh_Hans: "用于概述提取内容的 LLM 模型"
|
|||
|
|
pt_BR: "Modelo LLM usado para resumir o conteúdo extraído"
|
|||
|
|
ja_JP: "抽出内容の要約に使用するLLMモデル"
|
|||
|
|
form: form
|
|||
|
|
- name: llm_prompt
|
|||
|
|
type: string
|
|||
|
|
required: false
|
|||
|
|
label:
|
|||
|
|
en_US: LLM Prompt
|
|||
|
|
zh_Hans: LLM 提示词
|
|||
|
|
pt_BR: Prompt do LLM
|
|||
|
|
ja_JP: LLMプロンプト
|
|||
|
|
human_description:
|
|||
|
|
en_US: "System prompt for LLM summarization"
|
|||
|
|
zh_Hans: "LLM 概述的系统提示词"
|
|||
|
|
pt_BR: "Prompt do sistema para resumo LLM"
|
|||
|
|
ja_JP: "LLM要約用のシステムプロンプト"
|
|||
|
|
llm_description: "System prompt guiding LLM on how to summarize the extracted PDF content"
|
|||
|
|
form: form
|
|||
|
|
default: "你是一个专业的文档分析助手。请根据以下从PDF页面中提取的结构化内容(包含文本、图片信息、表格和矢量图形),对每页内容进行准确、简洁的概述。"
|
|||
|
|
extra:
|
|||
|
|
python:
|
|||
|
|
source: tools/pdf_summary.py
|