mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
Helm chart adds extra /api to end of ollama URL, which is invalid #593
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 @cprivitere on GitHub (Apr 4, 2024).
Bug Report
Description
Bug Summary:
Helm chart adds extra /api to end of ollama URL, which is invalid. Can by fixed by removing /api from line 10 of the _helpers function
Steps to Reproduce:
Install the helm chart and log in and check ollama's status in the settings. Just trim off the /api and then refresh and it works.
Expected Behavior:
Should just work without having to make this fix.
Actual Behavior:
Can't connect to ollama and thus no models work, nor can they be downloaded.
Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Installation Method
Helm
@justinh-rahb commented on GitHub (Apr 4, 2024):
What value are you using for your environment variable for the Ollama base URL? Previously it would have required
/apion the end, but we no longer take the endpoint path in the URL. If your value is set tohttp://ollama:11434/apifor example it would be the reason for this. At the same time this change was done, the variable name was changed fromOLLAMA_API_BASE_URLtoOLLAMA_BASE_URLas well.@slash-proc commented on GitHub (Apr 4, 2024):
I think he's talking about this line in the _helpers.tpl
46774aa5cd/kubernetes/helm/templates/_helpers.tpl (L10)The deployment for open-webui points towards ollama.url in _helpers.tpl and it uses /api which doesn't work.
Edit: I offer to fix this and refactor the helm stuff a little bit tomorrow. I avoided using the chart myself because it automatically installs ollama and I want to make that optional as well.
@justinh-rahb commented on GitHub (Apr 4, 2024):
I understand this, but specifically I want to know if the
OLLAMA_BASE_URLbeing used has/apiin it, which it should not. If this is the case, no modification is necessary, only using the correct variable format.I may be incorrect, there could be a mistake in this code. I don't personally use Kubernetes and neither does Tim, so we've relied entirely on contributors for this aspect.
@slash-proc commented on GitHub (Apr 4, 2024):
I think there's a misunderstanding. The string "/api" is present in the snippet I referenced from _helpers.tpl.
In the templates there's the deployment for open-webui which sets the environment variable to "ollama.url"
46774aa5cd/kubernetes/helm/templates/webui-deployment.yaml (L42-L44)The variable "ollama.url" is defined in _helpers.tpl with the snippet I originally linked. That will lead to a url that looks something like this:
http://ollama.open-webui.svc.cluster.local:80/apiEdit: Like I said, I offer to fix it tomorrow :)
@slash-proc commented on GitHub (Apr 4, 2024):
Quick fix for this specific issue: https://github.com/open-webui/open-webui/pull/1423