From df3f03e6698f14e0209c32ba6e00a5683674b316 Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Fri, 2 Jan 2026 02:17:31 +0100
Subject: [PATCH] image caption
---
modules/services/serviceAi/subStructureFilling.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/services/serviceAi/subStructureFilling.py b/modules/services/serviceAi/subStructureFilling.py
index 1dba45a8..fae9a5bf 100644
--- a/modules/services/serviceAi/subStructureFilling.py
+++ b/modules/services/serviceAi/subStructureFilling.py
@@ -1722,6 +1722,7 @@ RETURN JSON:
"contentPartIds": ["extracted_part_1"],
"generationHint": "Include full text",
"useAiCall": false,
+ "caption": "optional, only for image sections",
"elements": []
}}
]
@@ -1733,10 +1734,13 @@ EXAMPLES (all content types):
- table: {{"id": "s3", "content_type": "table", "contentPartIds": ["extracted_1", "extracted_2"], "generationHint": "Create table", "useAiCall": true, "elements": []}}
- heading: {{"id": "s4", "content_type": "heading", "contentPartIds": ["extracted_1"], "generationHint": "Extract heading", "useAiCall": true, "elements": []}}
- code_block: {{"id": "s5", "content_type": "code_block", "contentPartIds": ["extracted_1"], "generationHint": "Format code", "useAiCall": true, "elements": []}}
-- image: {{"id": "s6", "content_type": "image", "contentPartIds": ["obj_1"], "generationHint": "Display image", "useAiCall": false, "elements": []}}
+- image: {{"id": "s6", "content_type": "image", "contentPartIds": ["obj_1"], "generationHint": "Display image", "caption": "Figure 1: Description of the image", "useAiCall": false, "elements": []}}
- reference: {{"id": "s7", "content_type": "paragraph", "contentPartIds": ["ref_1"], "generationHint": "Reference", "useAiCall": false, "elements": []}}
- NO CONTENT PARTS (generate from scratch): {{"id": "s8", "content_type": "paragraph", "contentPartIds": [], "generationHint": "Write a detailed professional paragraph explaining [specific topic or purpose]. Include [key points to cover]. Address [important aspects]. Conclude with [summary or recommendations].", "useAiCall": true, "elements": []}}
+IMAGE SECTIONS:
+- For image sections, always provide a "caption" field with a descriptive caption for the image.
+
Return only valid JSON. Do not include any explanatory text outside the JSON.
"""
return prompt