From bca5488140b7001cbd31a8977736864ef0430d72 Mon Sep 17 00:00:00 2001 From: inesh Date: Wed, 16 Apr 2025 15:09:19 +0000 Subject: [PATCH 1/3] [Library-chart]Add conditions on aiAssistant in secret.tpl --- charts/library-chart/Chart.yaml | 2 +- charts/library-chart/templates/_secret.tpl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/library-chart/Chart.yaml b/charts/library-chart/Chart.yaml index 9ae6ca70e..f587dfbcd 100644 --- a/charts/library-chart/Chart.yaml +++ b/charts/library-chart/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: library-chart -version: 1.6.16 +version: 1.6.17 type: library diff --git a/charts/library-chart/templates/_secret.tpl b/charts/library-chart/templates/_secret.tpl index 828e2485b..a86eea398 100644 --- a/charts/library-chart/templates/_secret.tpl +++ b/charts/library-chart/templates/_secret.tpl @@ -411,12 +411,24 @@ stringData: name: config version: 0.0.1 models: + {{- if .Values.userPreferences.aiAssistant.model }} - name: {{ .Values.userPreferences.aiAssistant.model | quote }} + {{- end }} + {{- if .Values.userPreferences.aiAssistant.provider }} provider: {{ .Values.userPreferences.aiAssistant.provider | quote }} + {{- end }} + {{- if .Values.userPreferences.aiAssistant.model }} model: {{ .Values.userPreferences.aiAssistant.model | quote }} + {{- end }} + {{- if {{ .Values.userPreferences.aiAssistant.apiBase | quote }} }} apiBase: {{ .Values.userPreferences.aiAssistant.apiBase | quote }} + {{- end }} + {{- if .Values.userPreferences.aiAssistant.apiKey }} apiKey: {{ .Values.userPreferences.aiAssistant.apiKey | quote }} + {{- end }} + {{- if .Values.userPreferences.aiAssistant.useLegacyCompletionsEndpoint }} useLegacyCompletionsEndpoint: {{ .Values.userPreferences.aiAssistant.useLegacyCompletionsEndpoint }} + {{- end }} context: - provider: problems - provider: debugger From 574c50fafb499a9379d81aa6ed78d80ffccc4f06 Mon Sep 17 00:00:00 2001 From: inesh Date: Wed, 16 Apr 2025 15:24:16 +0000 Subject: [PATCH 2/3] fix --- charts/library-chart/templates/_secret.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/library-chart/templates/_secret.tpl b/charts/library-chart/templates/_secret.tpl index a86eea398..0c7ce246e 100644 --- a/charts/library-chart/templates/_secret.tpl +++ b/charts/library-chart/templates/_secret.tpl @@ -420,7 +420,7 @@ stringData: {{- if .Values.userPreferences.aiAssistant.model }} model: {{ .Values.userPreferences.aiAssistant.model | quote }} {{- end }} - {{- if {{ .Values.userPreferences.aiAssistant.apiBase | quote }} }} + {{- if .Values.userPreferences.aiAssistant.apiBase | quote }} apiBase: {{ .Values.userPreferences.aiAssistant.apiBase | quote }} {{- end }} {{- if .Values.userPreferences.aiAssistant.apiKey }} From 4a1f0ed1871256bdfd9aa7de93af5f1dab478dee Mon Sep 17 00:00:00 2001 From: inesh Date: Wed, 16 Apr 2025 15:44:14 +0000 Subject: [PATCH 3/3] fix --- charts/library-chart/templates/_secret.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/library-chart/templates/_secret.tpl b/charts/library-chart/templates/_secret.tpl index 0c7ce246e..15ff8d1b7 100644 --- a/charts/library-chart/templates/_secret.tpl +++ b/charts/library-chart/templates/_secret.tpl @@ -420,7 +420,7 @@ stringData: {{- if .Values.userPreferences.aiAssistant.model }} model: {{ .Values.userPreferences.aiAssistant.model | quote }} {{- end }} - {{- if .Values.userPreferences.aiAssistant.apiBase | quote }} + {{- if .Values.userPreferences.aiAssistant.apiBase }} apiBase: {{ .Values.userPreferences.aiAssistant.apiBase | quote }} {{- end }} {{- if .Values.userPreferences.aiAssistant.apiKey }}