mirror of
https://github.com/open-webui/open-webui
synced 2025-05-21 21:46:22 +00:00
fix: fix DoclingLoader input params
This commit is contained in:
parent
2419ef06a0
commit
a44b35e99e
@ -126,10 +126,29 @@ class DoclingLoader:
|
|||||||
raise ValueError("File path is required for DoclingLoader")
|
raise ValueError("File path is required for DoclingLoader")
|
||||||
|
|
||||||
with open(self.file_path, "rb") as f:
|
with open(self.file_path, "rb") as f:
|
||||||
files = {"files": (self.file_path, f, self.mime_type or "application/octet-stream")}
|
files = {
|
||||||
|
"files": (
|
||||||
|
self.file_path,
|
||||||
|
f,
|
||||||
|
self.mime_type or "application/octet-stream",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
"from_formats": ["docx", "pptx", "html", "xml_pubmed", "image", "pdf", "asciidoc", "md", "xlsx", "xml_uspto", "json_docling"],
|
"from_formats": [
|
||||||
|
"docx",
|
||||||
|
"pptx",
|
||||||
|
"html",
|
||||||
|
"image",
|
||||||
|
"pdf",
|
||||||
|
"asciidoc",
|
||||||
|
"md",
|
||||||
|
"csv",
|
||||||
|
"xlsx",
|
||||||
|
"xml_uspto",
|
||||||
|
"xml_jats",
|
||||||
|
"json_docling",
|
||||||
|
],
|
||||||
"to_formats": ["md"],
|
"to_formats": ["md"],
|
||||||
"image_export_mode": "placeholder",
|
"image_export_mode": "placeholder",
|
||||||
"do_ocr": True,
|
"do_ocr": True,
|
||||||
@ -137,7 +156,7 @@ class DoclingLoader:
|
|||||||
"ocr_engine": "easyocr",
|
"ocr_engine": "easyocr",
|
||||||
"ocr_lang": None,
|
"ocr_lang": None,
|
||||||
"pdf_backend": "dlparse_v2",
|
"pdf_backend": "dlparse_v2",
|
||||||
"table_mode": "fast",
|
"table_mode": "accurate",
|
||||||
"abort_on_error": False,
|
"abort_on_error": False,
|
||||||
"return_as_file": False,
|
"return_as_file": False,
|
||||||
"do_table_structure": True,
|
"do_table_structure": True,
|
||||||
|
Loading…
Reference in New Issue
Block a user