refac/fix: docling auth

This commit is contained in:
Timothy Jaeryang Baek 2025-12-06 08:06:42 -05:00
parent dcdbafa5ae
commit 7e6b8a9a71

View file

@ -144,19 +144,17 @@ class DoclingLoader:
with open(self.file_path, "rb") as f:
headers = {}
if self.api_key:
headers["Authorization"] = f"Bearer {self.api_key}"
files = {
"files": (
self.file_path,
f,
self.mime_type or "application/octet-stream",
)
}
headers["X-Api-Key"] = f"Bearer {self.api_key}"
r = requests.post(
f"{self.url}/v1/convert/file",
files=files,
files={
"files": (
self.file_path,
f,
self.mime_type or "application/octet-stream",
)
},
data={
"image_export_mode": "placeholder",
**self.params,