Skip to content

Commit

Permalink
Add AgentQnA UI
Browse files Browse the repository at this point in the history
Add AgentQnA UI support, and fix 2 issues.

Signed-off-by: Dolpher Du <dolpher.du@intel.com>
  • Loading branch information
yongfengdu committed Jan 17, 2025
1 parent 656fcbc commit c377fb0
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 3 deletions.
7 changes: 7 additions & 0 deletions helm-charts/agentqna/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,12 @@ dependencies:
- name: data-prep
version: 0-latest
repository: "file://../common/data-prep"
- name: ui
alias: agentqna-ui
version: 0-latest
repository: "file://../common/ui"
- name: nginx
version: 0-latest
repository: "file://../common/nginx"
version: 0-latest
appVersion: "v1.0"
15 changes: 15 additions & 0 deletions helm-charts/agentqna/templates/nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-nginx-config
labels:
{{- include "agentqna.labels" . | nindent 4 }}
data:
FRONTEND_SERVICE_IP: {{ include "ui.fullname" (index .Subcharts "agentqna-ui") | quote }}
FRONTEND_SERVICE_PORT: {{ index .Values "agentqna-ui" "service" "port" | quote }}
BACKEND_SERVICE_NAME: chat/completions
BACKEND_SERVICE_IP: {{ include "agentqna.fullname" (index .Subcharts "supervisor") | quote }}
BACKEND_SERVICE_PORT: {{ .Values.supervisor.service.port | quote }}
11 changes: 11 additions & 0 deletions helm-charts/agentqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ vllm:
VLLM_SKIP_WARMUP: true
extraCmdArgs: ["--tensor-parallel-size", "4", "--max-seq_len-to-capture", "16384"]

nginx:
service:
type: NodePort

agentqna-ui:
image:
repository: opea/agent-ui
tag: "latest"
BACKEND_SERVICE_ENDPOINT: "/v1/chat/completions"
containerPort: 5173

global:
http_proxy: ""
https_proxy: ""
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/common/agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ data:
{{- if .Values.WORKER_AGENT_URL }}
WORKER_AGENT_URL: {{ .Values.WORKER_AGENT_URL | quote }}
{{- else }}
WORKER_AGENT_URL: "http://{{ .Release.Name }}-rag-agent:9095/v1/chat/completions"
WORKER_AGENT_URL: "http://{{ .Release.Name }}-ragagent:9095/v1/chat/completions"
{{- end }}
{{- if .Values.SQL_AGENT_URL }}
SQL_AGENT_URL: {{ .Values.SQL_AGENT_URL | quote }}
{{- else }}
SQL_AGENT_URL: "http://{{ .Release.Name }}-sql-agent:9096/v1/chat/completions"
SQL_AGENT_URL: "http://{{ .Release.Name }}-sqlagent:9096/v1/chat/completions"
{{- end }}
require_human_feedback: {{ .Values.require_human_feedback | quote }}
recursion_limit: {{ .Values.recursion_limit | quote }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/agent/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
command: ['bash', '-c']
args:
- |
if [ {{ include "agent.fullname" . }} != "agent" ]; then
if [[ {{ include "agent.fullname" . }} != "agent"* ]]; then
echo "Skip test."
exit 0
fi
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/common/ui/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ data:
VITE_FAQ_GEN_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }}
{{- else if contains "faqgen-ui" .Values.image.repository }}
FAQ_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }}
{{- else if contains "agent-ui" .Values.image.repository }}
AGENT_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }}
{{- end }}
10 changes: 10 additions & 0 deletions helm-charts/common/ui/variant_agentqna_svelte-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

image:
repository: opea/agent-ui
tag: "latest"

containerPort: 5173

BACKEND_SERVICE_ENDPOINT: "/v1/chat/completions"

0 comments on commit c377fb0

Please sign in to comment.