Skip to content

Commit 37fe3a7

Browse files
Remove the legacy document format to move to docling v2 output
Signed-off-by: Aakanksha Duggal <[email protected]>
1 parent 695c651 commit 37fe3a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/instructlab/sdg/utils/chunkers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,11 @@ def export_documents(self, converted_docs: Iterable[ConversionResult]):
522522

523523
# Export Deep Search document JSON format:
524524
with (docling_artifacts_path / f"{doc_filename}.json").open("w") as fp:
525-
fp.write(json.dumps(doc.legacy_document.export_to_dict()))
525+
fp.write(json.dumps(doc.export_to_dict()))
526526

527527
# Export Markdown format:
528528
with (docling_artifacts_path / f"{doc_filename}.md").open("w") as fp:
529-
fp.write(doc.legacy_document.export_to_markdown())
529+
fp.write(doc.export_to_markdown())
530530
else:
531531
logger.info(f"Document {doc.input.file} failed to convert.")
532532
failure_count += 1

0 commit comments

Comments
 (0)