Docling LiteLLM Picture Description Plugin
This plugin allows you to use the LiteLLM library for generating picture descriptions in your Docling pipeline. This plugin will allow you to use Vision LLM from any external providers supported by LiteLLM, such as OpenAI, Azure OpenAI, Vertex AI, and xAI.
Installation
pip install docling-litellm-picture-description
Usage
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions
from docling_litellm_picture_description.datamodel.pipeline_options import PictureDescriptionLiteLLMOptions
picture_description_options = PictureDescriptionApiOptions(
model=self.model_name,
prompt="Describe the picture in detail.",
scale=1.0,
timeout=120,
)
pipeline_options = PdfPipelineOptions(
enable_remote_services=True,
allow_external_plugins=True,
do_picture_description=True,
picture_description_options=picture_description_options,
generate_picture_images=True,
)
converter = DocumentConverter(
format_options={
InputFormat.IMAGE: PdfFormatOption(
pipeline_options=pipeline_options,
),
InputFormat.PDF: PdfFormatOption(
pipeline_options=pipeline_options,
)
}
)
doc = converter.convert(file).document
markdown_text = doc.export_to_markdown()
Metadata
Release files for docling-litellm-picture-description 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| docling_litellm_picture_description-0.1.1.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docling_litellm_picture_description-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / docling_litellm_picture_description-0.1.1.tar.gz
| Download URL | docling_litellm_picture_description-0.1.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dd1dc9c408f393a22f32f996fb6deecb07c49cf7c242c94558038b37cd06228
|
|
BLAKE2b-256 checksum How to use checksums |
5c3e81e3727968bce650637ec3e1c350723a5d3c0eef648baf81160608912e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|
Release files / docling_litellm_picture_description-0.1.1-py3-none-any.whl
| Download URL | docling_litellm_picture_description-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba1820266879df27ca8088d3ff8acdd88fc55b65bf5580ccb40a1251f480dd10
|
|
BLAKE2b-256 checksum How to use checksums |
b8924ee1e7d8b9fde685fbab46ecd3c837ca24b862955584c2a139dedce07fb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|
Security for docling-litellm-picture-description 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.