{"id":23949,"library":"langchain-docling","title":"LangChain Docling","description":"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.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/docling-project/langchain-docling","tags":["langchain","docling","document-loading","chunking","pdf","document-conversion"],"install":[{"cmd":"pip install langchain-docling","lang":"bash","label":"Install the package"}],"dependencies":[{"reason":"Required for base classes (Document, BaseLoader, etc.).","package":"langchain-core","optional":false},{"reason":"Core document conversion engine.","package":"docling","optional":false}],"imports":[{"note":"In v2.0.0 the canonical import path is from the loader submodule; direct import from package root may not work.","wrong":"from langchain_docling import DoclingLoader","symbol":"DoclingLoader","correct":"from langchain_docling.loader import DoclingLoader"},{"note":"Submodule is named 'chunking' (with 'ing'), not 'chunker'. This is a common mistake.","wrong":"from langchain_docling.chunker import DoclingChunker","symbol":"DoclingChunker","correct":"from langchain_docling.chunking import DoclingChunker"},{"note":"","wrong":"","symbol":"DoclingDocumentConverter","correct":"from langchain_docling.converter import DoclingDocumentConverter"}],"quickstart":{"code":"from langchain_docling.loader import DoclingLoader\nfrom langchain_docling.chunking import DoclingChunker\nfrom langchain_docling.converter import DoclingDocumentConverter\nfrom langchain_core.documents import Document\n\n# Initialize converter with desired pipeline options\nconverter = DoclingDocumentConverter()\n\n# Example: loading a document from a file path\nloader = DoclingLoader(file_path=\"example.pdf\", converter=converter)\ndocs = loader.load()\nprint(docs[0].page_content[:200])\n\n# Example: chunking documents\nchunker = DoclingChunker(chunk_size=512, chunk_overlap=50)\nchunks = chunker.split_documents(docs)\nprint(f\"Number of chunks: {len(chunks)}\")","lang":"python","description":"Load a PDF document with DoclingLoader and split into chunks using DoclingChunker."},"warnings":[{"fix":"Use 'from langchain_docling.loader import DoclingLoader' instead of 'from langchain_docling import DoclingLoader'.","message":"In 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.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Pass converter as keyword: DoclingLoader(file_path='doc.pdf', converter=my_converter).","message":"DoclingLoader no longer accepts a 'converter' argument as positional; it must be passed as a keyword argument or use the default converter.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Configure pipeline settings via DoclingDocumentConverter, e.g., converter = DoclingDocumentConverter(pipeline_options=...).","message":"The 'mode' parameter in DoclingLoader has been removed. Use the converter's pipeline options instead.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Always use DoclingLoader or DoclingDocumentConverter to generate documents for chunking.","message":"DoclingChunker requires the document objects to have a 'page_content' attribute. Ensure you use the docling-converted documents, not raw LangChain documents.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate to DoclingLoader with ImagePipelineOptions.","message":"The 'DoclingImageLoader' has been deprecated in favor of using DoclingLoader with an image pipeline. It may be removed in a future version.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from langchain_docling.loader import DoclingLoader'.","cause":"Symbol is not exposed at package root; must import from submodule.","error":"ImportError: cannot import name 'DoclingLoader' from 'langchain_docling'"},{"fix":"Ensure you are using the correct import path and version 2.0.0+. Call loader.load() after proper instantiation.","cause":"DoclingLoader might have been instantiated incorrectly or version mismatch.","error":"AttributeError: 'DoclingLoader' object has no attribute 'load'"},{"fix":"Upgrade to langchain-docling >=2.0.0 and pass converter as keyword argument.","cause":"The 'converter' argument was renamed or removed in older versions (pre-2.0.0).","error":"TypeError: DoclingLoader.__init__() got an unexpected keyword argument 'converter'"},{"fix":"Ensure documents are created by DoclingLoader or DoclingDocumentConverter.","cause":"Attempting to chunk a document that is not produced by Docling's converter.","error":"ValueError: Document must have page_content to be chunked"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}