🧱(helm) mount the LLM JSON configuration file

This allows to customize the LLM configuration for deployments.
This commit is contained in:
Quentin BEY
2025-09-03 12:01:10 +02:00
parent 5e2d77642d
commit 548679698f
7 changed files with 84 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
apiVersion: v2
type: application
name: conversations
version: 0.0.1
version: 0.0.2
appVersion: latest
+4 -1
View File
@@ -38,7 +38,7 @@
### backend
| Name | Description | Value |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|-------------------------------------------------------|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `backend.command` | Override the backend container command | `[]` |
| `backend.args` | Override the backend container args | `[]` |
| `backend.replicas` | Amount of backend replicas | `3` |
@@ -95,6 +95,9 @@
| `backend.themeCustomization.enabled` | Enable theme customization | `false` |
| `backend.themeCustomization.file_content` | Content of the theme customization file. Must be a json object. | `""` |
| `backend.themeCustomization.mount_path` | Path where the customization file will be mounted in the backend deployment. | `/app/conversations/configuration/theme` |
| `backend.llmConfiguration.enabled` | Enable LLM configuration from JSON file | `false` |
| `backend.llmConfiguration.file_content` | Content of the LLM configuration file. Must be a json object. | `""` |
| `backend.llmConfiguration.mount_path` | Path where the LLM configuration file will be mounted in the backend deployment. | `/app/conversations/configuration/llm` |
### frontend
@@ -95,6 +95,11 @@ spec:
mountPath: {{ .Values.backend.themeCustomization.mount_path }}
readOnly: true
{{- end }}
{{- if .Values.backend.llmConfiguration.enabled }}
- name: llm-configuration
mountPath: {{ .Values.backend.llmConfiguration.mount_path }}
readOnly: true
{{- end }}
{{- with .Values.backend.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -127,6 +132,11 @@ spec:
configMap:
name: conversations-theme-customization
{{- end }}
{{- if .Values.backend.llmConfiguration.enabled }}
- name: llm-configuration
configMap:
name: conversations-llm-configuration
{{- end }}
{{- range .Values.backend.extraVolumes }}
- name: {{ .name }}
{{- if .existingClaim }}
@@ -0,0 +1,10 @@
{{- if .Values.backend.llmConfiguration.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: conversations-llm-configuration
namespace: {{ .Release.Namespace }}
data:
default.json: |
{{ .Values.backend.themeCustomization.file_content | toJson | indent 4 }}
{{- end }}
+8
View File
@@ -235,6 +235,14 @@ backend:
file_content: ""
mount_path: /app/conversations/configuration/theme
## @param backend.llmConfiguration.enabled Enable LLM configuration from JSON file
## @param backend.llmConfiguration.file_content Content of the LLM configuration file. Must be a json object.
## @param backend.llmConfiguration.mount_path Path where the LLM configuration file will be mounted in the backend deployment.
llmConfiguration:
enabled: false
file_content: ""
mount_path: /app/conversations/configuration/llm
## @section frontend
frontend:
@@ -0,0 +1,47 @@
{
"models": [
{
"hrid": "default-model",
"model_name": "settings.AI_MODEL",
"human_readable_name": "Default Model",
"provider_name": "default-provider",
"profile": null,
"settings": {},
"is_active": true,
"icon": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAn1BMVEUALosAKoovTZjw8vb////+9/jlPUniAAz",
"iABUAGIWbpsTwq7HhAAAAI4dle7DrdX4AJohRaaboXWj7+/zn6On5//9NZaT29vfoWmVHYKDoUl/k5OUAIYddc6vpbHYCM47Y3+v53+LiFCUA",
"HIWnsckYPJHi6PL77O7jJjW3wdf1w8jre4QgQ5TZ2txwg7Pr3+I8WZ6OnsTuoamClL7tlZ5xz5y8AAAAzUlEQVR4AZ3RRQKDQBBEUSTu7h5c4",
"vc/W6Yp3KG2Dz4ynDdeEBvOmq12xx2E1u0B+4NOEocj4DgNJ1PgLAvni8WyBq5Yc71ubFJx23C2q4P7dRYejg1xzvCUgvz5guz11k7gXYKF/1",
"8oyiYuvHAYeVkhXCzolVStHcGDjiQzNmMQxsMI5rEJRdQSPZvbpE2E8aY6gC6Z+2Hg4dFA0Yb4YedNL/v4Fk8WJuwiGhrChJNXI210rnib9Fs",
"JlXRUC/HwTscPIXf/iklq/tjb/gHAdxkCUjAg2QAAAABJRU5ErkJggg=="
],
"system_prompt": "settings.AI_AGENT_INSTRUCTIONS",
"tools": "settings.AI_AGENT_TOOLS"
},
{
"hrid": "default-routing-model",
"model_name": "settings.AI_ROUTING_MODEL",
"human_readable_name": "Default Routing Model",
"provider_name": "default-routing-provider",
"profile": null,
"settings": {},
"is_active": true,
"icon": null,
"system_prompt": "settings.AI_ROUTING_SYSTEM_PROMPT",
"tools": []
}
],
"providers": [
{
"hrid": "default-provider",
"base_url": "settings.AI_BASE_URL",
"api_key": "settings.AI_API_KEY"
},
{
"hrid": "default-routing-provider",
"base_url": "settings.AI_ROUTING_MODEL_BASE_URL",
"api_key": "settings.AI_ROUTING_MODEL_API_KEY"
}
]
}
@@ -100,6 +100,10 @@ backend:
enabled: true
file_content: {{ readFile "./configuration/theme/demo.json" }}
llmConfiguration:
enabled: true
file_content: {{ readFile "./configuration/llm/demo.json" }}
# Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false
extraVolumeMounts:
- name: certs