https://github.com/docling-project/docling-langchain
Docling LangChain integration
https://github.com/docling-project/docling-langchain
Last synced: 9 months ago
JSON representation
Docling LangChain integration
- Host: GitHub
- URL: https://github.com/docling-project/docling-langchain
- Owner: docling-project
- License: mit
- Created: 2025-01-06T13:47:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-09T11:29:04.000Z (9 months ago)
- Last Synced: 2025-09-09T14:20:42.034Z (9 months ago)
- Language: Python
- Homepage: https://docling-project.github.io/docling/integrations/langchain
- Size: 871 KB
- Stars: 44
- Watchers: 1
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Maintainers: MAINTAINERS.md
Awesome Lists containing this project
README
# Docling LangChain integration
[](https://pypi.org/project/langchain-docling/)
[](https://pypi.org/project/langchain-docling/)
[](https://github.com/astral-sh/uv)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://pydantic.dev)
[](https://github.com/pre-commit/pre-commit)
[](https://opensource.org/licenses/MIT)
A [Docling](https://github.com/docling-project/docling) integration for
[LangChain](https://github.com/langchain-ai/langchain/).
## Installation
Simply install `langchain-docling` from your package manager, e.g. pip:
```bash
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:
```bash
uv sync
```
## Usage
### Basic usage
Basic usage of `DoclingLoader` looks as follows:
```python
from langchain_docling import DoclingLoader
FILE_PATH = ["https://arxiv.org/pdf/2408.09869"] # Docling Technical Report
loader = DoclingLoader(file_path=FILE_PATH)
docs = loader.load()
```
### Advanced usage
When initializing a `DoclingLoader`, you can use the following parameters:
- `file_path`: source as single str (URL or local file) or iterable thereof
- `converter` (optional): any specific Docling converter instance to use
- `convert_kwargs` (optional): any specific kwargs for conversion execution
- `export_type` (optional): export mode to use: `ExportType.DOC_CHUNKS` (default) or
`ExportType.MARKDOWN`
- `md_export_kwargs` (optional): any specific Markdown export kwargs (for Markdown mode)
- `chunker` (optional): any specific Docling chunker instance to use (for doc-chunk
mode)
- `meta_extractor` (optional): any specific metadata extractor to use
### Docs and examples
For more details and usage examples, check out
[this page](https://docling-project.github.io/docling/integrations/langchain/).