Originally created by @oxaronick on GitHub (Jan 15, 2024).
The README.md says:
🔒 Backend Reverse Proxy Support: Bolster security through direct communication between Ollama Web UI backend and Ollama. This key feature eliminates the need to expose Ollama over LAN. Requests made to the '/ollama/api' route from the web UI are seamlessly redirected to Ollama from the backend, enhancing overall system security.
A request to /ollama/api/generate returns a 403, so the endpoint is authenticated, which is good.
Looking through the code, the server is looking for a Bearer token. However, there are no docs and nothing I can see in the UI to allow me to get a Bearer token to use with this feature.
Describe the solution you'd like
I'd like documentation on how to get a Bearer token for my user, to allow me to make API requests directly to Ollama.
Describe alternatives you've considered
I could set up my own authentication using NGINX. However, the description above shows this feature is explicitly meant to allow admins to not have to do that, so I'm hopeful I can use this feature as advertised.
Additional context
I'm looking to make API requests directly to Ollama because I'd like in-editor code completion, and there are VSCode extensions that will use an Ollama server to generate completions.
Originally created by @oxaronick on GitHub (Jan 15, 2024).
The README.md says:
> 🔒 Backend Reverse Proxy Support: Bolster security through direct communication between Ollama Web UI backend and Ollama. This key feature eliminates the need to expose Ollama over LAN. Requests made to the '/ollama/api' route from the web UI are seamlessly redirected to Ollama from the backend, enhancing overall system security.
A request to `/ollama/api/generate` returns a 403, so the endpoint is authenticated, which is good.
Looking through the code, the server is looking for a Bearer token. However, there are no docs and nothing I can see in the UI to allow me to get a Bearer token to use with this feature.
**Describe the solution you'd like**
I'd like documentation on how to get a Bearer token for my user, to allow me to make API requests directly to Ollama.
**Describe alternatives you've considered**
I could set up my own authentication using NGINX. However, the description above shows this feature is explicitly meant to allow admins to not have to do that, so I'm hopeful I can use this feature as advertised.
**Additional context**
I'm looking to make API requests directly to Ollama because I'd like in-editor code completion, and there are VSCode extensions that will use an Ollama server to generate completions.
@justinh-rahb commented on GitHub (Jan 15, 2024):
Not sure use by external applications is officially supported as of yet, but this discussion thread is about the same topic and has some information that may be useful to you:
https://github.com/ollama-webui/ollama-webui/discussions/351
I'm good now but there is still documentation needed. Feel free to keep open to track, or just close this issue.
@oxaronick commented on GitHub (Jan 15, 2024):
I'm good now but there is still documentation needed. Feel free to keep open to track, or just close this issue.
Indeed, this would be great to have for the documentation. Let's continue our discussion here: open-webui/docs#44
@tjbck commented on GitHub (Jan 15, 2024):
Indeed, this would be great to have for the documentation. Let's continue our discussion here: open-webui/docs#44
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @oxaronick on GitHub (Jan 15, 2024).
The README.md says:
A request to
/ollama/api/generatereturns a 403, so the endpoint is authenticated, which is good.Looking through the code, the server is looking for a Bearer token. However, there are no docs and nothing I can see in the UI to allow me to get a Bearer token to use with this feature.
Describe the solution you'd like
I'd like documentation on how to get a Bearer token for my user, to allow me to make API requests directly to Ollama.
Describe alternatives you've considered
I could set up my own authentication using NGINX. However, the description above shows this feature is explicitly meant to allow admins to not have to do that, so I'm hopeful I can use this feature as advertised.
Additional context
I'm looking to make API requests directly to Ollama because I'd like in-editor code completion, and there are VSCode extensions that will use an Ollama server to generate completions.
@justinh-rahb commented on GitHub (Jan 15, 2024):
Not sure use by external applications is officially supported as of yet, but this discussion thread is about the same topic and has some information that may be useful to you:
https://github.com/ollama-webui/ollama-webui/discussions/351
@oxaronick commented on GitHub (Jan 15, 2024):
@justinh-rahb That's the info I was looking for - thanks!
@oxaronick commented on GitHub (Jan 15, 2024):
I'm good now but there is still documentation needed. Feel free to keep open to track, or just close this issue.
@tjbck commented on GitHub (Jan 15, 2024):
Indeed, this would be great to have for the documentation. Let's continue our discussion here: open-webui/docs#44