Optional Docling adapters implementing the runic.rag DocumentParser/DocumentChunker ports.
Project description
runic-rag-docling
Optional Docling adapters that
implement the runic.rag file-oriented ports DocumentParser and
DocumentChunker. Docling parses PDF/DOCX/PPTX/XLSX/HTML/images structure-aware
(layout, tables, headings) and chunks the structured document directly — no
Markdown re-parse. The heavy Docling dependency lives only in this add-on; the
runic.rag core stays light and imports no Docling.
Install
In-process (default, heavy — pulls torch):
uv add 'runic-rag-docling[local]'
Lightweight client against a docling-serve instance:
uv add 'runic-rag-docling[server]'
Usage
Variant A — inject DoclingChunker via the GraphRAG constructor
Wire the Docling chunker as the document_chunker; ingest_document then parses
and chunks the original structure-aware, while ingest_text keeps the built-in
ParagraphChunker.
from runic.rag import GraphRAG, ParagraphChunker, RagSettings # plus the other ports
from runic_rag_docling import DoclingChunker, DoclingSettings
rag = GraphRAG(
store,
ontology=ontology,
chunker=ParagraphChunker(settings),
document_chunker=DoclingChunker(DoclingSettings(mode="local")),
# extractor, embedder, resolver, retrievers, reranker, synthesizer, settings ...
)
rag.bootstrap_schema()
report = rag.ingest_document("whitepaper.pdf") # Docling parses + chunks the original
Runnable: examples/docling_explicit_wiring.py
wires the full stack by hand (no build_graphrag).
Variant B — build_graphrag one-liner (default stack + Docling)
from runic.rag import load_settings
from runic_rag_docling import DoclingSettings, build_graphrag
rag = build_graphrag(
load_settings(),
DoclingSettings(mode="server", server_url="http://localhost:5001"),
)
rag.bootstrap_schema()
report = rag.ingest_document("whitepaper.pdf")
For parse-only behavior, wire DoclingParser as the document_parser (keeps the
core Chunker).
Configuration
DoclingSettings reads from the environment with the RUNIC_DOCLING_ prefix
(e.g. RUNIC_DOCLING_MODE=server, RUNIC_DOCLING_SERVER_URL=...,
RUNIC_DOCLING_API_KEY=..., RUNIC_DOCLING_MAX_TOKENS=512).
See docs/rag/docling.md for the full guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file runic_rag_docling-0.2.0.tar.gz.
File metadata
- Download URL: runic_rag_docling-0.2.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b61d9687b8386e22dca15cca9fb700505ff0c399c45f9e7c7afaf79085971b4
|
|
| MD5 |
ab60d45e1066f258ab7bab6ff6db3096
|
|
| BLAKE2b-256 |
d8d0fa17b2adcc746c2394ed136c37f5c1e9e424899930e83ff994246ff5f8d5
|
File details
Details for the file runic_rag_docling-0.2.0-py3-none-any.whl.
File metadata
- Download URL: runic_rag_docling-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c0c163234f665976067293cd061135dd504fa26b7aa1dc01d90750b1b885ada
|
|
| MD5 |
5caa669cdff7459f62a1a750fa5d0ccd
|
|
| BLAKE2b-256 |
43058815702a0ce3278c4d87866857c41a804d38bbffa9b6f1960b4d4309aac1
|