mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
20af60be42
commit
d98c539d89
1 changed files with 0 additions and 9 deletions
|
|
@ -392,15 +392,6 @@ class Loader:
|
||||||
loader = MistralLoader(
|
loader = MistralLoader(
|
||||||
api_key=self.kwargs.get("MISTRAL_OCR_API_KEY"), file_path=file_path
|
api_key=self.kwargs.get("MISTRAL_OCR_API_KEY"), file_path=file_path
|
||||||
)
|
)
|
||||||
elif (
|
|
||||||
self.engine == "external"
|
|
||||||
and self.kwargs.get("MISTRAL_OCR_API_KEY") != ""
|
|
||||||
and file_ext
|
|
||||||
in ["pdf"] # Mistral OCR currently only supports PDF and images
|
|
||||||
):
|
|
||||||
loader = MistralLoader(
|
|
||||||
api_key=self.kwargs.get("MISTRAL_OCR_API_KEY"), file_path=file_path
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
if file_ext == "pdf":
|
if file_ext == "pdf":
|
||||||
loader = PyPDFLoader(
|
loader = PyPDFLoader(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue