mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 12:34:22 +00:00
Pass nested clusters through GLM as payload
Signed-off-by: Christoph Auer <cau@zurich.ibm.com> Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
parent
4dcc738b6d
commit
0240ae2930
@ -215,17 +215,21 @@ class GlmModel:
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
obj_type=layout_label_to_ds_type.get(element.label),
|
obj_type=layout_label_to_ds_type.get(element.label),
|
||||||
payload=TypeAdapter(List[Cluster]).dump_python(
|
payload={
|
||||||
element.cluster.children
|
"children": TypeAdapter(List[Cluster]).dump_python(
|
||||||
), # hack to channel child clusters through GLM
|
element.cluster.children
|
||||||
|
)
|
||||||
|
}, # hack to channel child clusters through GLM
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif isinstance(element, ContainerElement):
|
elif isinstance(element, ContainerElement):
|
||||||
main_text.append(
|
main_text.append(
|
||||||
BaseText(
|
BaseText(
|
||||||
payload=TypeAdapter(List[Cluster]).dump_python(
|
payload={
|
||||||
element.cluster.children
|
"children": TypeAdapter(List[Cluster]).dump_python(
|
||||||
), # hack to channel child clusters through GLM
|
element.cluster.children
|
||||||
|
)
|
||||||
|
}, # hack to channel child clusters through GLM
|
||||||
obj_type=layout_label_to_ds_type.get(element.label),
|
obj_type=layout_label_to_ds_type.get(element.label),
|
||||||
name=element.label,
|
name=element.label,
|
||||||
prov=[
|
prov=[
|
||||||
|
Loading…
Reference in New Issue
Block a user