mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac/fix: docling auth
This commit is contained in:
parent
dcdbafa5ae
commit
7e6b8a9a71
1 changed files with 8 additions and 10 deletions
|
|
@ -144,19 +144,17 @@ class DoclingLoader:
|
||||||
with open(self.file_path, "rb") as f:
|
with open(self.file_path, "rb") as f:
|
||||||
headers = {}
|
headers = {}
|
||||||
if self.api_key:
|
if self.api_key:
|
||||||
headers["Authorization"] = f"Bearer {self.api_key}"
|
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,
|
self.file_path,
|
||||||
f,
|
f,
|
||||||
self.mime_type or "application/octet-stream",
|
self.mime_type or "application/octet-stream",
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
|
|
||||||
r = requests.post(
|
|
||||||
f"{self.url}/v1/convert/file",
|
|
||||||
files=files,
|
|
||||||
data={
|
data={
|
||||||
"image_export_mode": "placeholder",
|
"image_export_mode": "placeholder",
|
||||||
**self.params,
|
**self.params,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue