Skip to content

Commit 09c57c6

Browse files
committed
WIP: Generalize ChatQnA external LLM to external inferencing support
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
1 parent 278886c commit 09c57c6

4 files changed

Lines changed: 121 additions & 26 deletions

File tree

helm-charts/chatqna/templates/deployment.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,47 @@ spec:
6565
{{- else if .Values.externalLLM.enabled }}
6666
value: {{ .Values.externalLLM.LLM_MODEL }}
6767
{{- end }}
68-
{{- if .Values.externalLLM.enabled }}
68+
{{- if .Values.externalAuthorization.needed }}
6969
- name: OPENAI_API_KEY
70-
value: {{ .Values.externalLLM.OPENAI_API_KEY }}
70+
value: {{ .Values.externalAuthorization.OPENAI_API_KEY }}
7171
{{- end }}
72+
{{- if .Values.externalRerank.enabled }}
73+
- name: RERANK_SERVER_HOST_IP
74+
value: {{ .Values.externalRerank.RERANK_SERVER_HOST }}
75+
- name: RERANK_SERVER_PORT
76+
value: {{ .Values.externalRerank.RERANK_SERVER_PORT | default "80" | quote }}
77+
{{- else }}
7278
- name: RERANK_SERVER_HOST_IP
7379
value: {{ .Release.Name }}-teirerank
7480
- name: RERANK_SERVER_PORT
7581
value: "80"
82+
{{- end }}
7683
- name: RETRIEVER_SERVICE_HOST_IP
7784
value: {{ .Release.Name }}-retriever-usvc
7885
- name: RETRIEVER_SERVICE_PORT
7986
value: "7000"
87+
{{- if .Values.externalEmbed.enabled }}
88+
- name: EMBEDDING_SERVER_HOST_IP
89+
value: {{ .Values.externalEmbed.EMBEDDING_SERVER_HOST }}
90+
- name: EMBEDDING_SERVER_PORT
91+
value: {{ .Values.externalEmbed.EMBEDDING_SERVER_PORT | default "80" | quote }}
92+
{{- else }}
8093
- name: EMBEDDING_SERVER_HOST_IP
8194
value: {{ .Release.Name }}-tei
8295
- name: EMBEDDING_SERVER_PORT
8396
value: "80"
97+
{{- end }}
98+
{{- if .Values.externalGuardrails.enabled }}
99+
- name: GUARDRAIL_SERVICE_HOST_IP
100+
value: {{ .Values.externalGuardrails.GUARDRAILS_SERVER_HOST }}
101+
- name: GUARDRAIL_SERVICE_PORT
102+
value: {{ .Values.externalGuardrails.GUARDRAILS_SERVER_PORT | default "80" | quote }}
103+
{{- else }}
84104
- name: GUARDRAIL_SERVICE_HOST_IP
85105
value: {{ .Release.Name }}-guardrails-usvc
86106
- name: GUARDRAIL_SERVICE_PORT
87107
value: "9090"
108+
{{- end }}
88109
- name: LLM_SERVICE_HOST_IP
89110
value: {{ .Release.Name }}-llm-uservice
90111
- name: LLM_SERVICE_PORT

helm-charts/chatqna/values.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,31 @@ chatqna-ui:
173173
dashboard:
174174
prefix: "OPEA ChatQnA"
175175

176-
# External LLM configuration
176+
# External inferencing configurations
177+
178+
externalAuthorization:
179+
needed: false
180+
# common authorization for all the external inferencing services
181+
OPENAI_API_KEY: "your-api-key"
182+
183+
externalEmbed:
184+
enabled: false
185+
EMBEDDING_SERVER_HOST: "http://your-embed-server"
186+
EMBEDDING_SERVER_PORT: "80"
187+
EMBEDDING_MODEL_ID: "your-embed-model"
188+
189+
externalRerank:
190+
enabled: false
191+
RERANK_SERVER_HOST: "http://your-rerank-server"
192+
RERANK_SERVER_PORT: "80"
193+
RERANK_MODEL_ID: "your-rerank-model"
194+
195+
externalGuardrails:
196+
enabled: false
197+
GUARDRAIL_SERVER_HOST: "http://your-guardrails-server"
198+
GUARDRAIL_SERVER_PORT: "80"
199+
GUARDRAIL_MODEL_ID: "your-guardrails-model"
200+
177201
externalLLM:
178202
enabled: false
179203
LLM_SERVER_HOST: "http://your-llm-server"
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
externalAuthorization:
5+
needed: true
6+
# common authorization key for all the external inferencing services
7+
OPENAI_API_KEY: "your-api-key"
8+
9+
10+
externalEmbed:
11+
enabled: true
12+
# External embedding service details
13+
EMBEDDING_SERVER_HOST: "http://your-embed-server"
14+
EMBEDDING_SERVER_PORT: "80"
15+
# TODO: ChatQnA does not support specifying model in embed queries
16+
EMBEDDING_MODEL_ID: "your-embed-model"
17+
18+
# Disable internal embedding services when using external embedding
19+
embedding-usvc:
20+
enabled: false
21+
tei:
22+
enabled :false
23+
24+
25+
externalRerank:
26+
enabled: true
27+
# External reranking service details
28+
RERANK_SERVER_HOST: "http://your-rerank-server"
29+
RERANK_SERVER_PORT: "80"
30+
# TODO: ChatQnA does not support specifying model in rerank queries
31+
RERANK_MODEL_ID: "your-rerank-model"
32+
33+
# Disable internal reranking services when using external reranking
34+
reranking-usvc:
35+
enabled: false
36+
teirerank:
37+
enabled :false
38+
39+
40+
externalGuardrails:
41+
enabled: true
42+
# External guardrails service details
43+
GUARDRAIL_SERVER_HOST: "http://your-guardrails-server"
44+
GUARDRAIL_SERVER_PORT: "80"
45+
# TODO: ChatQnA does not support specifying model in guardrail queries
46+
GUARDRAIL_MODEL_ID: "your-guardrail-model"
47+
48+
# Disable internal guardrail services when using external guardrails
49+
guardrails-usvc:
50+
# TODO: does guardrails work without the OPEA specific wrapper?
51+
enabled :false
52+
vllm-guardrails:
53+
enabled :false
54+
55+
56+
# External LLM configuration override
57+
externalLLM:
58+
enabled: true
59+
# External LLM service details
60+
LLM_SERVER_HOST: "http://your-llm-server"
61+
LLM_SERVER_PORT: "80"
62+
LLM_MODEL: "your-llm-model"
63+
64+
# Disable internal LLM services when using external LLM
65+
llm-uservice:
66+
# TODO: does FaqGen variat work without the OPEA specific wrapper?
67+
enabled: false
68+
vllm:
69+
enabled: false
70+
tgi:
71+
enabled: false
72+
ollama:
73+
enabled: false

helm-charts/chatqna/variant_external-llm-values.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)