Skip to content

Commit

Permalink
Merge branch 'opea-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrishTa authored Jan 20, 2025
2 parents e32547d + 1a5a7f9 commit daa93ed
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Update Examples
e2e_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \
grep "^$CHARTS_DIR" | \
grep -vE 'README.md|common|*.sh' | \
grep -vE 'README.md|valuefiles.yaml|common|*.sh' | \
cut -d'/' -f2 | sort -u )
echo "Charts to be updated: $e2e_charts"
echo "${{ secrets.ACTION_TOKEN }}" | helm registry login ghcr.io -u opea --password-stdin
Expand Down
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 }}
2 changes: 1 addition & 1 deletion helm-charts/agentqna/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
# Ingest data
cd /mnt/tools
pip install requests tqdm
./ingest_data.sh
./ingest_data.sh {{ include "agentqna.fullname" (index .Subcharts "data-prep") }}
# Test ragagent
max_retry=10;
for ((i=1; i<=max_retry; i++)); do
Expand Down
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
4 changes: 2 additions & 2 deletions helm-charts/common/agent/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
command: ['bash', '-c']
args:
- |
if [ {{ include "agent.fullname" . }} != "agent" ]; then
echo "Skip test."
if [[ {{ include "agent.fullname" . }} == "agentqna"* ]]; then
echo "Skip agent component tests in agentqna e2e example test."
exit 0
fi
max_retry=20;
Expand Down
12 changes: 7 additions & 5 deletions helm-charts/common/embedding-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ spec:
port=80;
[[ "$proto" = "https" ]] && port=443;
fi;
retry_count={{ .Values.retryCount | default 60 }};
j=1;
while ! nc -z ${host} ${port}; do
[[ $j -ge ${retry_count} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+1)); sleep 1;
wait_timeout={{ .Values.waitTimeout | default 1 }};
total_timeout={{ .Values.retryTimeoutSeconds | default 60 }};
j=0;
while ! nc -w ${wait_timeout} -z ${host} ${port}; do
j=$((j+wait_timeout));
[[ $j -ge ${total_timeout} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+2)); sleep 2;
done;
echo "${host}:${port} is reachable within $j seconds.";
{{- end }}
Expand Down
12 changes: 7 additions & 5 deletions helm-charts/common/guardrails-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ spec:
port=80;
[[ "$proto" = "https" ]] && port=443;
fi;
retry_count={{ .Values.retryCount | default 60 }};
j=1;
while ! nc -z ${host} ${port}; do
[[ $j -ge ${retry_count} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+1)); sleep 1;
wait_timeout={{ .Values.waitTimeout | default 1 }};
total_timeout={{ .Values.retryTimeoutSeconds | default 60 }};
j=0;
while ! nc -w ${wait_timeout} -z ${host} ${port}; do
j=$((j+wait_timeout));
[[ $j -ge ${total_timeout} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+2)); sleep 2;
done;
echo "${host}:${port} is reachable within $j seconds.";
containers:
Expand Down
12 changes: 7 additions & 5 deletions helm-charts/common/llm-uservice/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ spec:
port=80;
[[ "$proto" = "https" ]] && port=443;
fi;
retry_count={{ .Values.retryCount | default 60 }};
j=1;
while ! nc -z ${host} ${port}; do
[[ $j -ge ${retry_count} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+1)); sleep 1;
wait_timeout={{ .Values.waitTimeout | default 1 }};
total_timeout={{ .Values.retryTimeoutSeconds | default 60 }};
j=0;
while ! nc -w ${wait_timeout} -z ${host} ${port}; do
j=$((j+wait_timeout));
[[ $j -ge ${total_timeout} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+2)); sleep 2;
done;
echo "${host}:${port} is reachable within $j seconds.";
containers:
Expand Down
12 changes: 7 additions & 5 deletions helm-charts/common/lvm-uservice/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ spec:
port=80;
[[ "$proto" = "https" ]] && port=443;
fi;
retry_count={{ .Values.retryCount | default 60 }};
j=1;
while ! nc -z ${host} ${port}; do
[[ $j -ge ${retry_count} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+1)); sleep 1;
wait_timeout={{ .Values.waitTimeout | default 1 }};
total_timeout={{ .Values.retryTimeoutSeconds | default 60 }};
j=0;
while ! nc -w ${wait_timeout} -z ${host} ${port}; do
j=$((j+wait_timeout));
[[ $j -ge ${total_timeout} ]] && echo "ERROR: ${host}:${port} is NOT reachable in $j seconds!" && exit 1;
j=$((j+2)); sleep 2;
done;
echo "${host}:${port} is reachable within $j seconds.";
containers:
Expand Down
12 changes: 7 additions & 5 deletions helm-charts/common/retriever-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ spec:
TESTHOST=$(MILVUS_HOST);
TESTPORT=$(MILVUS_PORT);
{{- end }}
retry_count={{ .Values.retryCount | default 60 }};
j=1;
while ! nc -z ${TESTHOST} ${TESTPORT}; do
[[ $j -ge ${retry_count} ]] && echo "ERROR: ${TESTHOST}:${TESTPORT} is NOT reachable in $j seconds!" && exit 1;
j=$((j+1)); sleep 1;
wait_timeout={{ .Values.waitTimeout | default 1 }};
total_timeout={{ .Values.retryTimeoutSeconds | default 60 }};
j=0;
while ! nc -w ${wait_timeout} -z ${TESTHOST} ${TESTPORT}; do
j=$((j+wait_timeout));
[[ $j -ge ${total_timeout} ]] && echo "ERROR: ${TESTHOST}:${TESTPORT} is NOT reachable in $j seconds!" && exit 1;
j=$((j+2)); sleep 2;
done;
echo "${TESTHOST}:${TESTPORT} is reachable within $j seconds.";
containers:
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 @@ -41,4 +41,6 @@ data:
BACKEND_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }}
{{- else if contains "text2image-ui" .Values.image.repository }}
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 daa93ed

Please sign in to comment.