mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Add check if images and avoid trying to calculate embeddings
This commit is contained in:
parent
c2046b9247
commit
ac321f4b64
1 changed files with 1 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ def upload_file(
|
||||||
ProcessFileForm(file_id=id, content=result.get("text", "")),
|
ProcessFileForm(file_id=id, content=result.get("text", "")),
|
||||||
user=user,
|
user=user,
|
||||||
)
|
)
|
||||||
else:
|
elif file.content_type not in ["image/png", "image/jpeg", "image/gif"]:
|
||||||
process_file(request, ProcessFileForm(file_id=id), user=user)
|
process_file(request, ProcessFileForm(file_id=id), user=user)
|
||||||
|
|
||||||
file_item = Files.get_file_by_id(id=id)
|
file_item = Files.get_file_by_id(id=id)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue