Skip to content

Commit

Permalink
chore: switch to docling-core-provided MD export
Browse files Browse the repository at this point in the history
Signed-off-by: Panos Vagenas <[email protected]>
  • Loading branch information
vagenas committed Jul 18, 2024
1 parent f09ffcc commit cbf92a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions docling/datamodel/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path, PurePath
from typing import ClassVar, Dict, Iterable, List, Optional, Type, Union

from deepsearch.documents.core.export import export_to_markdown
from docling_core.types import BaseCell, BaseText
from docling_core.types import BoundingBox as DsBoundingBox
from docling_core.types import Document as DsDocument
Expand Down Expand Up @@ -299,9 +298,7 @@ def render_as_dict(self):

def render_as_markdown(self):
if self.output:
return export_to_markdown(
self.output.model_dump(by_alias=True, exclude_none=True)
)
return self.output.export_to_markdown()
else:
return ""

Expand Down
9 changes: 5 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ packages = [{include = "docling"}]
[tool.poetry.dependencies]
python = "^3.11"
pydantic = "^2.0.0"
docling-core = "^0.2.0"
docling-core = "^1.1.0"
docling-ibm-models = "^0.2.0"
deepsearch-glm = ">=0.19.0,<1"
deepsearch-toolkit = ">=0.47.0,<1"
filetype = "^1.2.0"
pypdfium2 = "^4.30.0"
pydantic-settings = "^2.3.0"
Expand Down

0 comments on commit cbf92a6

Please sign in to comment.