compass.services.cpu.read_docling_web_file#
- async read_docling_web_file(doc_bytes, url, source_uri=None, pdf_pipeline_options=None, **kwargs)[source]#
Read a web file using Docling in a Process Pool
- Parameters:
doc_bytes (
bytes) – Raw document payload forwarded to the Docling parser.url (
str) – Filename or URL of the file to read.source_uri (
str, optional) – Original remote URL for the file. If specified, this is used as the HTML base URI whileurlis still used as the stream name for Docling format inference. By default,None.pdf_pipeline_options (
dict, optional) – Dictionary of keyword-value arguments to pass todocling.datamodel.pipeline_options.PdfPipelineOptionsinitializer. Table structure defaults to enabled when omitted. OCR defaults to enabled only whenpytesseract_exe_fpis specified. By default,None.**kwargs – Additional keyword arguments passed to Docling’s
export_to_markdown()method.
- Returns:
elm.web.document.MDDocument– Parsed document.