diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index b536ae6..7290dfa 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -71,6 +71,7 @@ helm upgrade --install open-webui open-webui/open-webui | ollama.fullnameOverride | string | `"open-webui-ollama"` | If enabling embedded Ollama, update fullnameOverride to your desired Ollama name value, or else it will use the default ollama.name value from the Ollama chart | | ollamaUrls | list | `[]` | A list of Ollama API endpoints. These can be added in lieu of automatically installing the Ollama Helm chart, or in addition to it. | | ollamaUrlsFromExtraEnv | bool | `false` | Disables taking Ollama Urls from `ollamaUrls` list | +| enableOpenaiApi | bool | `true` | Enables the use of OpenAI APIs | openaiBaseApiUrl | string | `"https://api.openai.com/v1"` | OpenAI base API URL to use. Defaults to the Pipelines service endpoint when Pipelines are enabled, and "https://api.openai.com/v1" if Pipelines are not enabled and this value is blank | | openaiBaseApiUrls | list | `[]` | OpenAI base API URLs to use. Overwrites the value in openaiBaseApiUrl if set | | persistence.accessModes | list | `["ReadWriteOnce"]` | If using multiple replicas, you must update accessModes to ReadWriteMany | diff --git a/charts/open-webui/templates/workload-manager.yaml b/charts/open-webui/templates/workload-manager.yaml index 1a886a9..4edcb8f 100644 --- a/charts/open-webui/templates/workload-manager.yaml +++ b/charts/open-webui/templates/workload-manager.yaml @@ -121,22 +121,25 @@ spec: - name: "ENABLE_OLLAMA_API" value: "False" {{- end }} - {{- if and .Values.openaiBaseApiUrl (not .Values.openaiBaseApiUrls) (not .Values.pipelines.enabled) }} + {{- if and .Values.enableOpenaiApi .Values.openaiBaseApiUrl (not .Values.openaiBaseApiUrls) (not .Values.pipelines.enabled) }} # If only an OpenAI API value is set, set it to OPENAI_API_BASE_URL - name: "OPENAI_API_BASE_URL" value: {{ .Values.openaiBaseApiUrl | quote }} - {{- else if and .Values.openaiBaseApiUrl .Values.pipelines.enabled (not .Values.openaiBaseApiUrls) }} + {{- else if and .Values.enableOpenaiApi .Values.openaiBaseApiUrl .Values.pipelines.enabled (not .Values.openaiBaseApiUrls) }} # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values - name: "OPENAI_API_BASE_URLS" value: "{{ include "pipelines.serviceEndpoint" . }};{{ .Values.openaiBaseApiUrl }}" - {{- else if and .Values.pipelines.enabled (not .Values.openaiBaseApiUrl) (not .Values.openaiBaseApiUrls) }} + {{- else if and .Values.enableOpenaiApi .Values.pipelines.enabled (not .Values.openaiBaseApiUrl) (not .Values.openaiBaseApiUrls) }} # If Pipelines is enabled and no OpenAI API values are set, set OPENAI_API_BASE_URL to the Pipelines server endpoint - name: "OPENAI_API_BASE_URL" value: {{ include "pipelines.serviceEndpoint" . | quote }} - {{- else if and .Values.openaiBaseApiUrls .Values.pipelines.enabled }} + {{- else if and .Values.enableOpenaiApi .Values.openaiBaseApiUrls .Values.pipelines.enabled }} # If OpenAI API value(s) set and Pipelines is enabled, use OPENAI_API_BASE_URLS to support all the endpoints in the chart - name: "OPENAI_API_BASE_URLS" value: "{{ include "pipelines.serviceEndpoint" . }};{{ join ";" .Values.openaiBaseApiUrls }}" + {{- else if not .Values.enableOpenaiApi }} + - name: "ENABLE_OPENAI_API" + value: "False" {{- end }} {{- if .Values.extraEnvVars }} {{- toYaml .Values.extraEnvVars | nindent 8 }} diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index a554d44..913baa8 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -232,6 +232,9 @@ service: labels: {} loadBalancerClass: "" +# Enables the use of OpenAI APIs +enableOpenaiApi: true + # -- OpenAI base API URL to use. Defaults to the Pipelines service endpoint when Pipelines are enabled, and "https://api.openai.com/v1" if Pipelines are not enabled and this value is blank openaiBaseApiUrl: "https://api.openai.com/v1"