Registry / llm-agents / langchain-docling

langchain-docling

JSON →
library2.0.0pypypi✓ verified 84d ago

Integrates Docling document conversion capabilities into LangChain, enabling loading and chunking of documents (PDF, DOCX, PPTX, images) with native Deep Search or hybrid chunking. Current version is 2.0.0, requiring Python >=3.10 and <4. The library is actively maintained with regular releases.

pip install langchain-docling
INSTALL
IMPORT
SIG · LANGCHAIN-DOCLING
L
langchain-docling
llm-agentspythonv2.0.0
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
timeout
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DoclingLoader
from langchain_docling.loader import DoclingLoader
from langchain_docling import DoclingLoader
In v2.0.0 the canonical import path is from the loader submodule; direct import from package root may not work.
DoclingChunker
from langchain_docling.chunking import DoclingChunker
from langchain_docling.chunker import DoclingChunker
Submodule is named 'chunking' (with 'ing'), not 'chunker'. This is a common mistake.
DoclingDocumentConverter
from langchain_docling.converter import DoclingDocumentConverter

Load a PDF document with DoclingLoader and split into chunks using DoclingChunker.

from langchain_docling.loader import DoclingLoader from langchain_docling.chunking import DoclingChunker from langchain_docling.converter import DoclingDocumentConverter from langchain_core.documents import Document # Initialize converter with desired pipeline options converter = DoclingDocumentConverter() # Example: loading a document from a file path loader = DoclingLoader(file_path="example.pdf", converter=converter) docs = loader.load() print(docs[0].page_content[:200]) # Example: chunking documents chunker = DoclingChunker(chunk_size=512, chunk_overlap=50) chunks = chunker.split_documents(docs) print(f"Number of chunks: {len(chunks)}")
Debug
Known issues
breakingIn version 2.0.0, the import paths changed. Previously, symbols were importable directly from 'langchain_docling'; now they are in submodules (loader, chunking, converter). Update all imports accordingly.
fix
Use 'from langchain_docling.loader import DoclingLoader' instead of 'from langchain_docling import DoclingLoader'.
affects: 2.0.0
breakingDoclingLoader no longer accepts a 'converter' argument as positional; it must be passed as a keyword argument or use the default converter.
fix
Pass converter as keyword: DoclingLoader(file_path='doc.pdf', converter=my_converter).
affects: >=2.0.0
breakingThe 'mode' parameter in DoclingLoader has been removed. Use the converter's pipeline options instead.
fix
Configure pipeline settings via DoclingDocumentConverter, e.g., converter = DoclingDocumentConverter(pipeline_options=...).
affects: 2.0.0
gotchaDoclingChunker requires the document objects to have a 'page_content' attribute. Ensure you use the docling-converted documents, not raw LangChain documents.
fix
Always use DoclingLoader or DoclingDocumentConverter to generate documents for chunking.
affects: all
deprecatedThe 'DoclingImageLoader' has been deprecated in favor of using DoclingLoader with an image pipeline. It may be removed in a future version.
fix
Migrate to DoclingLoader with ImagePipelineOptions.
affects: >=2.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'DoclingLoader' from 'langchain_docling'
Symbol is not exposed at package root; must import from submodule.
fix
Use 'from langchain_docling.loader import DoclingLoader'.
AttributeError: 'DoclingLoader' object has no attribute 'load'
DoclingLoader might have been instantiated incorrectly or version mismatch.
fix
Ensure you are using the correct import path and version 2.0.0+. Call loader.load() after proper instantiation.
TypeError: DoclingLoader.__init__() got an unexpected keyword argument 'converter'
The 'converter' argument was renamed or removed in older versions (pre-2.0.0).
fix
Upgrade to langchain-docling >=2.0.0 and pass converter as keyword argument.
ValueError: Document must have page_content to be chunked
Attempting to chunk a document that is not produced by Docling's converter.
fix
Ensure documents are created by DoclingLoader or DoclingDocumentConverter.
Upgrade
Version history
2.0.0latest on PyPI · released Nov 17, 2025
Audit
Dependencies
langchain-corerequiredRequired for base classes (Document, BaseLoader, etc.).
doclingrequiredCore document conversion engine.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
langchain-docling — pip install langchain-docling · libregistry