mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #5714] Swagger docs require an Internet connection #29624
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gaby on GitHub (Sep 26, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5714
Bug Report
Installation Method
Environment
Expected Behavior:
Visiting the API docs page would render the Swagger page.
Actual Behavior:
Swagger / API docs do not render.
Description
Bug Summary:
While Open-WebUI relies on FastAPI by default it requires internet to download the JS/CSS files for the Swagger docs.
This is heavily documented here: https://github.com/fastapi/fastapi/issues/608
And can be easily solved by using the
fastapi offlinepackage here: https://github.com/turettn/fastapi_offline@tjbck commented on GitHub (Sep 27, 2024):
Will not be using fastapi_offline but investigating at the moment.
@gaby commented on GitHub (Sep 27, 2024):
@tjbck There's a solution here that doesnt use a dependency:
https://github.com/fastapi/fastapi/discussions/8500#discussioncomment-5152408
The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.
@tjbck commented on GitHub (Sep 27, 2024):
PR welcome!
@lee-b commented on GitHub (Sep 28, 2024):
Would suggest that tracking these updates is important, cybersecurity wise. The build process should probably pull the latest versions in automatically, subject to subsequent scans.
I tend to agree that using fastapi_offline here would mostly just introduce new supply chain security concerns, no guarantees of any improved maintenance, so that it's probably simpler to maintain this in-project for now.
Longer-term, the solution is probably to raise this issue with the fastapi team, and have them fix it there.
@gaby commented on GitHub (Sep 28, 2024):
I has been brought up in the fastapi repo multiple times and there's still no built-in way of doing this.
Both Open-WebUI and Ollama use a ton of dependencie, I don't see anyone bringing up the "supply chain" concerns on those.
Whichever solution works, I just want to be able to use Open-WebUI offline as it's README says. That is currently not possible, a lot of features don't work at all.
@flefevre commented on GitHub (Nov 12, 2024):
@gaby for a newbee like me could you give the url to access the initial fastapi of open-webui?
http(s)://localhost:port/XXX ?
Thanks
@semidark commented on GitHub (Nov 21, 2024):
https://docs.openwebui.com/getting-started/advanced-topics/api-endpoints/#swagger-documentation-links
I am also having trouble finding the API Docs in my locally hosted Open-WebUI instance.
http://localhost:3000/api/v1/docs returns
Though the API is working. as described in the Link to the docs.
@lililililli1 commented on GitHub (Nov 24, 2024):
是的,在完全断网的情况下webui完全不能使用
@gaby commented on GitHub (Dec 14, 2024):
@semidark I was getting that error until I added an environment variable to docker run:
-e ENV=devRegardless, the swagger docs or any api docs do not load when self-hosted without internet access.
@gaby commented on GitHub (Dec 25, 2024):
Fixed via #7905 released in https://github.com/open-webui/open-webui/releases/tag/v0.5.0