29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
# Copyright (c) 2025 Patrick Motsch
|
|
# Context node definitions — structural extraction without AI.
|
|
|
|
from modules.shared.i18nRegistry import t
|
|
|
|
CONTEXT_NODES = [
|
|
{
|
|
"id": "context.extractContent",
|
|
"category": "context",
|
|
"label": t("Inhalt extrahieren"),
|
|
"description": t("Dokumentstruktur extrahieren ohne KI (Seiten, Abschnitte, Bilder, Tabellen)"),
|
|
"parameters": [
|
|
{"name": "documentList", "type": "str", "required": True, "frontendType": "hidden",
|
|
"description": t("Dokumentenliste (via Wire oder DataRef)"), "default": ""},
|
|
{"name": "extractionOptions", "type": "object", "required": False, "frontendType": "json",
|
|
"description": t(
|
|
"Extraktions-Optionen (JSON), z.B. {\"includeImages\": true, \"includeTables\": true, "
|
|
"\"outputDetail\": \"full\"}"),
|
|
"default": {}},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["DocumentList", "Transit"]}},
|
|
"outputPorts": {0: {"schema": "UdmDocument"}},
|
|
"meta": {"icon": "mdi-file-tree-outline", "color": "#00897B", "usesAi": False},
|
|
"_method": "context",
|
|
"_action": "extractContent",
|
|
},
|
|
]
|