diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 0092f674..ea75ef79 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: maibot description: "Maimai Bot, a cyber friend dedicated to group chats" type: application -version: 0.11.3-beta -appVersion: 0.11.3-beta +version: 0.11.5-beta +appVersion: 0.11.5-beta diff --git a/helm-chart/templates/core/configmap.yaml b/helm-chart/templates/core/configmap.yaml index 25f0ef2d..98dadea8 100644 --- a/helm-chart/templates/core/configmap.yaml +++ b/helm-chart/templates/core/configmap.yaml @@ -7,6 +7,10 @@ data: .env: | HOST=0.0.0.0 PORT=8000 + WEBUI_ENABLED={{ if .Values.core.webui.enabled }}true{{ else }}false{{ end }} + WEBUI_MODE=production + WEBUI_HOST=0.0.0.0 + WEBUI_PORT=8001 model_config.toml: | {{ .Values.config.core_model_config | nindent 4 }} bot_config.toml: | diff --git a/helm-chart/templates/core/ingress.yaml b/helm-chart/templates/core/ingress.yaml new file mode 100644 index 00000000..203626d6 --- /dev/null +++ b/helm-chart/templates/core/ingress.yaml @@ -0,0 +1,26 @@ +{{- if and .Values.core.webui.enabled .Values.core.webui.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-maibot-webui + namespace: {{ .Release.Namespace }} + {{- if .Values.core.webui.ingress.annotations }} + annotations: + {{ toYaml .Values.core.webui.ingress.annotations | nindent 4 }} + {{- end }} + labels: + app: {{ .Release.Name }}-maibot-core +spec: + ingressClassName: {{ .Values.core.webui.ingress.className }} + rules: + - host: {{ .Values.core.webui.ingress.host }} + http: + paths: + - backend: + service: + name: {{ .Release.Name }}-maibot-core + port: + number: {{ .Values.core.webui.service.port }} + path: {{ .Values.core.webui.ingress.path }} + pathType: {{ .Values.core.webui.ingress.pathType }} +{{- end }} diff --git a/helm-chart/templates/core/service.yaml b/helm-chart/templates/core/service.yaml index c236e746..5b67de50 100644 --- a/helm-chart/templates/core/service.yaml +++ b/helm-chart/templates/core/service.yaml @@ -11,6 +11,15 @@ spec: port: 8000 protocol: TCP targetPort: 8000 + {{- if .Values.core.webui.enabled }} + - name: webui + port: {{ .Values.core.webui.service.port }} + protocol: TCP + targetPort: 8001 + {{- if eq .Values.core.webui.service.type "NodePort" }} + nodePort: {{ .Values.core.webui.service.nodePort | default nil }} + {{- end }} + {{- end }} selector: app: {{ .Release.Name }}-maibot-core type: ClusterIP diff --git a/helm-chart/templates/core/statefulset.yaml b/helm-chart/templates/core/statefulset.yaml index 2d5f6a68..d841c989 100644 --- a/helm-chart/templates/core/statefulset.yaml +++ b/helm-chart/templates/core/statefulset.yaml @@ -29,12 +29,17 @@ spec: value: 99f08e0cab0190de853cb6af7d64d4de - name: PRIVACY_AGREE value: 9943b855e72199d0f5016ea39052f1b6 - image: {{ .Values.core.image.repository | default "sengokucola/maibot" }}:{{ .Values.core.image.tag | default "0.11.3-beta" }} + image: {{ .Values.core.image.repository | default "sengokucola/maibot" }}:{{ .Values.core.image.tag | default "0.11.5-beta" }} imagePullPolicy: {{ .Values.core.image.pullPolicy }} ports: - containerPort: 8000 name: adapter-ws protocol: TCP + {{- if .Values.core.webui.enabled }} + - containerPort: 8001 + name: webui + protocol: TCP + {{- end }} {{- if .Values.core.resources }} resources: {{ toYaml .Values.core.resources | nindent 12 }} @@ -69,7 +74,7 @@ spec: command: - python3 workingDir: /MaiMBot - image: {{ .Values.core.image.repository | default "sengokucola/maibot" }}:{{ .Values.core.image.tag | default "0.11.3-beta" }} + image: {{ .Values.core.image.repository | default "sengokucola/maibot" }}:{{ .Values.core.image.tag | default "0.11.5-beta" }} imagePullPolicy: {{ .Values.core.image.pullPolicy }} name: setup-plugins resources: { } diff --git a/helm-chart/templates/job-post-install/job-gen-adapter-cm.yaml b/helm-chart/templates/job-post-install/job-gen-adapter-cm.yaml index 73e4c3dc..bbc49c83 100644 --- a/helm-chart/templates/job-post-install/job-gen-adapter-cm.yaml +++ b/helm-chart/templates/job-post-install/job-gen-adapter-cm.yaml @@ -15,7 +15,7 @@ spec: restartPolicy: Never containers: - name: adapter-cm-generator - image: {{ .Values.adapter.cm_generator.image.repository | default "reg.mikumikumi.xyz/maibot/adapter-cm-generator" }}:{{ .Values.adapter.cm_generator.image.tag | default "0.11.3-beta" }} + image: {{ .Values.adapter.cm_generator.image.repository | default "reg.mikumikumi.xyz/maibot/adapter-cm-generator" }}:{{ .Values.adapter.cm_generator.image.tag | default "0.11.5-beta" }} workingDir: /app env: - name: PYTHONUNBUFFERED diff --git a/helm-chart/templates/napcat/statefulset.yaml b/helm-chart/templates/napcat/statefulset.yaml index ddf6c397..7cca56df 100644 --- a/helm-chart/templates/napcat/statefulset.yaml +++ b/helm-chart/templates/napcat/statefulset.yaml @@ -26,7 +26,7 @@ spec: value: "{{ .Values.napcat.permission.uid }}" - name: TZ value: Asia/Shanghai - image: {{ .Values.napcat.image.repository | default "mlikiowa/napcat-docker" }}:{{ .Values.napcat.image.tag | default "v4.9.72" }} + image: {{ .Values.napcat.image.repository | default "mlikiowa/napcat-docker" }}:{{ .Values.napcat.image.tag | default "v4.9.73" }} imagePullPolicy: {{ .Values.napcat.image.pullPolicy }} livenessProbe: failureThreshold: 3 diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 14cbf2ff..5f32b1c1 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -38,7 +38,7 @@ adapter: cm_generator: image: repository: # 默认 reg.mikumikumi.xyz/maibot/adapter-cm-generator - tag: # 默认 0.11.3-beta + tag: # 默认 0.11.5-beta pullPolicy: IfNotPresent pullSecrets: [ ] @@ -48,7 +48,7 @@ core: image: repository: # 默认 sengokucola/maibot - tag: # 默认 0.11.3-beta + tag: # 默认 0.11.5-beta pullPolicy: IfNotPresent pullSecrets: [ ] @@ -65,6 +65,20 @@ core: setup_default_plugins: true # 启用一个初始化容器,用于为用户自动安装默认插件到存储卷中 + webui: # WebUI相关配置 + enabled: true # 默认启用 + service: + type: ClusterIP # ClusterIP / NodePort 指定NodePort可以将内网的服务端口映射到物理节点的端口 + port: 8001 # 服务端口 + nodePort: # 仅在设置NodePort类型时有效,不指定则会随机分配端口 + ingress: + enabled: false + className: nginx + annotations: { } + host: maim.example.com # 访问麦麦WebUI的域名 + path: / + pathType: Prefix + # 麦麦的运行统计看板配置 # 麦麦每隔一段时间会自动输出html格式的运行统计报告,此统计报告可以作为静态网页访问 # 此功能默认禁用。如果你认为报告可以被公开访问(报告包含联系人/群组名称、模型token花费信息等),则可以启用此功能 @@ -117,7 +131,7 @@ napcat: image: repository: # 默认 mlikiowa/napcat-docker - tag: # 默认 v4.9.72 + tag: # 默认 v4.9.73 pullPolicy: IfNotPresent pullSecrets: [ ] @@ -388,7 +402,7 @@ config: # core的bot_config.toml core_bot_config: | [inner] - version = "6.21.6" + version = "6.21.8" #----以下是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读---- #如果你想要修改配置文件,请递增version的值 @@ -600,6 +614,9 @@ config: show_replyer_prompt = false # 是否显示回复器prompt show_replyer_reasoning = false # 是否显示回复器推理 show_jargon_prompt = false # 是否显示jargon相关提示词 + show_memory_prompt = false # 是否显示记忆检索相关提示词 + show_planner_prompt = false # 是否显示planner的prompt和原始返回结果 + show_lpmm_paragraph = false # 是否显示lpmm找到的相关文段日志 [maim_message] auth_token = [] # 认证令牌,用于API验证,为空则不启用验证