mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac/fix: marker
This commit is contained in:
parent
4d7c8b4a6a
commit
2bb6063dcb
2 changed files with 3 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ class DatalabMarkerLoader:
|
|||
return mime_map.get(ext, "application/octet-stream")
|
||||
|
||||
def check_marker_request_status(self, request_id: str) -> dict:
|
||||
url = f"{self.api_base_url}/marker/{request_id}"
|
||||
url = f"{self.api_base_url}/{request_id}"
|
||||
headers = {"X-Api-Key": self.api_key}
|
||||
try:
|
||||
response = requests.get(url, headers=headers)
|
||||
|
|
@ -111,7 +111,7 @@ class DatalabMarkerLoader:
|
|||
with open(self.file_path, "rb") as f:
|
||||
files = {"file": (filename, f, mime_type)}
|
||||
response = requests.post(
|
||||
f"{self.api_base_url}/marker",
|
||||
f"{self.api_base_url}",
|
||||
data=form_data,
|
||||
files=files,
|
||||
headers=headers,
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ class Loader:
|
|||
):
|
||||
api_base_url = self.kwargs.get("DATALAB_MARKER_API_BASE_URL", "")
|
||||
if not api_base_url or api_base_url.strip() == "":
|
||||
api_base_url = "https://www.datalab.to/api/v1"
|
||||
api_base_url = "https://www.datalab.to/api/v1/marker" # https://github.com/open-webui/open-webui/pull/16867#issuecomment-3218424349
|
||||
|
||||
loader = DatalabMarkerLoader(
|
||||
file_path=file_path,
|
||||
|
|
|
|||
Loading…
Reference in a new issue