Skip to content

Commit d60651f

Browse files
committed
enable llm-uservice to point to external llm endpoints
Signed-off-by: devpramod <pramod.pai@intel.com>
1 parent 19e1030 commit d60651f

3 files changed

Lines changed: 16 additions & 28 deletions

File tree

helm-charts/docsum/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --set global.modelUs
2626
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/rocm-values.yaml
2727
# To use AMD ROCm device with TGI
2828
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/rocm-tgi-values.yaml
29-
# To use with OPEA KubeAI models installed to same cluster
30-
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/variant_external-llm-values.yaml --set externalLLM.LLM_SERVER_HOST="http://kubeai.kubeai/openai" --set externalLLM.LLM_SERVER_PORT="" --set externalLLM.LLM_MODEL="some-KubeAI-model" --set externalLLM.OPENAI_API_KEY=""
31-
# To use with other external OpenAI compatible LLM endpoints
32-
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/variant_external-llm-values.yaml --set externalLLM.LLM_SERVER_HOST="http://your-llm-server" --set externalLLM.LLM_MODEL="your-model" --set externalLLM.OPENAI_API_KEY="your-api-key"
29+
# To use with external OpenAI-compatible LLM endpoints (OpenAI, vLLM, TGI, etc.)
30+
# This configures the llm-uservice to connect to external LLM providers while maintaining DocSum compatibility
31+
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/variant_external-llm-values.yaml --set llm-uservice.env.OPENAI_API_KEY="your-api-key" --set llm-uservice.env.LLM_MODEL_ID="gpt-4-turbo"
32+
# For vLLM/TGI endpoints:
33+
# helm install docsum docsum --set global.HF_TOKEN=${HFTOKEN} --values docsum/variant_external-llm-values.yaml --set llm-uservice.env.LLM_ENDPOINT="http://your-vllm-server/v1" --set llm-uservice.env.LLM_MODEL_ID="your-model"
3334
```
3435

3536
## Verify

helm-charts/docsum/templates/deployment.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,15 @@ spec:
3535
- name: {{ .Release.Name }}
3636
env:
3737
- name: LLM_SERVICE_HOST_IP
38-
{{- if .Values.externalLLM.enabled }}
39-
value: {{ .Values.externalLLM.LLM_SERVER_HOST }}
40-
{{- else }}
4138
value: {{ include "llm-uservice.fullname" (index .Subcharts "llm-uservice") }}
42-
{{- end }}
4339
- name: LLM_SERVICE_PORT
44-
{{- if .Values.externalLLM.enabled }}
45-
value: {{ .Values.externalLLM.LLM_SERVER_PORT | default "80" | quote }}
46-
{{- else }}
4740
value: {{ index .Values "llm-uservice" "service" "port" | quote }}
48-
{{- end }}
4941
{{- if .Values.whisper.enabled }}
5042
- name: ASR_SERVICE_HOST_IP
5143
value: {{ include "whisper.fullname" (index .Subcharts "whisper") }}
5244
- name: ASR_SERVICE_PORT
5345
value: {{ index .Values "whisper" "service" "port" | quote }}
5446
{{- end }}
55-
{{- if .Values.externalLLM.enabled }}
56-
- name: LLM_MODEL
57-
value: {{ .Values.externalLLM.LLM_MODEL }}
58-
- name: OPENAI_API_KEY
59-
value: {{ .Values.externalLLM.OPENAI_API_KEY }}
60-
{{- end }}
6147
securityContext:
6248
{{- toYaml .Values.securityContext | nindent 12 }}
6349
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Copyright (C) 2024 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# External LLM configuration override
5-
externalLLM:
6-
enabled: true # Enable external LLM service
7-
LLM_SERVER_HOST: "http://your-llm-server" # External LLM service host
8-
LLM_SERVER_PORT: "80" # Port for the external LLM service
9-
LLM_MODEL: "your-model" # LLM model to use
10-
OPENAI_API_KEY: "your-api-key" # OpenAI API key for authentication
11-
12-
# Disable internal LLM service when using external LLM
4+
# External LLM configuration - configures llm-uservice to use external LLM providers
5+
# This keeps the llm-uservice wrapper (required for /v1/docsum endpoint) but connects it to external LLMs
136
llm-uservice:
14-
enabled: false
7+
enabled: true # Keep the wrapper service for DocSum compatibility
8+
env:
9+
# Configure llm-uservice to use external OpenAI-compatible endpoints
10+
LLM_ENDPOINT: "https://api.openai.com/v1" # External LLM API endpoint (OpenAI, vLLM, TGI, etc.)
11+
OPENAI_API_KEY: "${OPENAI_API_KEY}" # API key for authentication
12+
LLM_MODEL_ID: "gpt-4-turbo" # Model to use
13+
TEXTGEN_BACKEND: "openai" # Backend type for OpenAI-compatible endpoints
14+
15+
# Disable local inference services since we're using external LLMs
1516
vllm:
1617
enabled: false
1718
tgi:

0 commit comments

Comments
 (0)