dify/docker/envs/core-services/knowledge-fs-unstructured.env.example

23 lines
1.3 KiB
Plaintext

# ------------------------------------------------------------------
# Isolated KnowledgeFS remote-document parser.
#
# The same service handles PDF, Office, mail, EPUB, ODT, and RTF requests. Large PDFs additionally
# use bounded page groups: a child request contains at most SPLIT_SIZE pages, so it partitions
# locally instead of recursively splitting again. The paired KnowledgeFS client keeps a global
# remote-request limit and nests structurally or byte-heavy inputs inside the heavy-document gate.
#
# KnowledgeFS owns durable attempt retries. Keep the child retry loop disabled so one parser
# failure cannot multiply retries at both layers.
# PDF geometry, not compressed bytes, determines raster memory. The client preflights at 350 DPI;
# do not raise PDF_RENDER_DPI above 350 or raise/disable the 25-million-pixel per-page guard.
# These are provider process settings: this pinned HTTP API does not accept a pdf_image_dpi
# request parameter. Oversized pages must be resized or tiled before import.
# ------------------------------------------------------------------
PDF_RENDER_DPI=350
PDF_RENDER_MAX_PIXELS_PER_PAGE=25000000
UNSTRUCTURED_PARALLEL_MODE_ENABLED=true
UNSTRUCTURED_PARALLEL_MODE_URL=http://127.0.0.1:8000/general/v0/general
UNSTRUCTURED_PARALLEL_MODE_SPLIT_SIZE=6
UNSTRUCTURED_PARALLEL_MODE_THREADS=3
UNSTRUCTURED_PARALLEL_RETRY_ATTEMPTS=0