Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pip install langchain-docling

### Development setup

To develop for Docling Core, you need Python >=3.9 <=3.13 and uv. You can then install from your local clone's root dir:
To develop for Docling LangChain, you need Python 3.10 through 3.14 and uv. You can then install from your local clone's
root directory:
```bash
uv sync
```
Expand Down
89 changes: 58 additions & 31 deletions examples/docling_loader.ipynb

Large diffs are not rendered by default.

107 changes: 62 additions & 45 deletions examples/docling_picture_description.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion langchain_docling/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def lazy_load(
chunk_iter = self._chunker.chunk(dl_doc)
for chunk in chunk_iter:
yield Document(
page_content=self._chunker.serialize(chunk=chunk),
page_content=self._chunker.contextualize(chunk=chunk),
metadata=self._meta_extractor.extract_chunk_meta(
file_path=file_path,
chunk=chunk,
Expand Down
2 changes: 1 addition & 1 deletion langchain_docling/picture_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ def _annotate_images(self, images: Iterable[Image.Image]) -> Iterable[str]:

responses = self.llm.batch(batch_messages)
for resp in responses:
yield resp.text()
yield resp.text
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ classifiers = [
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",

]
requires-python = "~=3.9"
requires-python = ">=3.10,<4" # syntax without tilde to prevent uv warning
dependencies = [
"langchain-core~=0.3.19",
"docling~=2.18",
"langchain-core~=1.0",
"docling~=2.26",
]

[project.urls]
Expand Down Expand Up @@ -78,14 +78,14 @@ langchain_docling = "langchain_docling._plugins"

[tool.black]
line-length = 88
target-version = ["py39", "py310"]
target-version = ["py310"]
include = '\.pyi?$'
preview = true

[tool.isort]
profile = "black"
line_length = 88
py_version = 39
py_version = 310
multi_line_output = 3
include_trailing_comma = true

Expand All @@ -102,7 +102,7 @@ pretty = true
no_implicit_optional = true
namespace_packages = true
show_error_codes = true
python_version = "3.9"
python_version = "3.10"
plugins = ["pydantic.mypy"]

[tool.semantic_release]
Expand Down
2 changes: 0 additions & 2 deletions test/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from .test_data_gen_flag import GEN_TEST_DATA


@pytest.mark.requires("docling")
def test_load_as_markdown(monkeypatch: pytest.MonkeyPatch) -> None:

mock_dl_doc = DoclingDocument.load_from_json("test/data/input/dl_doc_1.json")
Expand Down Expand Up @@ -46,7 +45,6 @@ def test_load_as_markdown(monkeypatch: pytest.MonkeyPatch) -> None:
assert act_data == exp_data


@pytest.mark.requires("docling")
def test_load_as_doc_chunks(monkeypatch: pytest.MonkeyPatch) -> None:

mock_dl_doc = DoclingDocument.load_from_json("test/data/input/dl_doc_1.json")
Expand Down
4,965 changes: 2,482 additions & 2,483 deletions uv.lock

Large diffs are not rendered by default.

Loading