From 3df3cf866473e11555d8b6ee7a6cee21a1250468 Mon Sep 17 00:00:00 2001 From: ElHachem02 Date: Thu, 4 Dec 2025 13:36:20 +0100 Subject: [PATCH] fix: add page as argument to build_prompt Signed-off-by: ElHachem02 --- docling/experimental/pipeline/threaded_layout_vlm_pipeline.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py b/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py index e64cb201..5ff23fc4 100644 --- a/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py +++ b/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py @@ -86,6 +86,7 @@ class ThreadedLayoutVlmPipeline(BasePipeline): class LayoutAwareVlmOptions(type(base_vlm_options)): # type: ignore[misc] def build_prompt( self, + page: Optional[SegmentedPage], *, _internal_page: Optional[Page] = None, ) -> str: @@ -120,6 +121,9 @@ class ThreadedLayoutVlmPipeline(BasePipeline): print("Found a table!") tag_name = "otsl" + if tag_name == "section_header_level_1": + tag_name = "section_header" + # Convert bbox to tuple and get location tokens bbox_tuple = cluster.bbox.as_tuple() location_tokens = DocumentToken.get_location(