Skip to content

Commit

Permalink
Remove unused values and change GenAIExamples default (#397)
Browse files Browse the repository at this point in the history
* helm: remove unused values

Signed-off-by: Lianhao Lu <[email protected]>

* change GenAIExamples to download models by iteself

Changes the default example for K8S manifests for GenAIExamples to
always download the model to avoid extra setup requirements for the end
users.

Signed-off-by: Lianhao Lu <[email protected]>

---------

Signed-off-by: Lianhao Lu <[email protected]>
  • Loading branch information
lianhao authored Sep 5, 2024
1 parent 8206a8c commit 26f9b16
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 63 deletions.
3 changes: 0 additions & 3 deletions helm-charts/common/data-prep/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ data:
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
LANGCHAIN_TRACING_V2: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }}
LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY | quote }}
LANGCHAIN_PROJECT: "opea-dataprep-service"
LOGFLAG: {{ .Values.LOGFLAG | quote }}
2 changes: 0 additions & 2 deletions helm-charts/common/data-prep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,3 @@ global:
https_proxy: ""
no_proxy: ""
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
3 changes: 0 additions & 3 deletions helm-charts/common/embedding-usvc/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ data:
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
LANGCHAIN_TRACING_V2: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }}
LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY }}
LANGCHAIN_PROJECT: "opea-embedding-service"
LOGFLAG: {{ .Values.LOGFLAG | quote }}
6 changes: 0 additions & 6 deletions helm-charts/common/embedding-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,3 @@ global:
http_proxy: ""
https_proxy: ""
no_proxy: ""
# HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface
modelUseHostPath: /mnt/opea-models
13 changes: 6 additions & 7 deletions helm-charts/common/llm-uservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ curl http://localhost:9000/v1/chat/completions \

## Values

| Key | Type | Default | Description |
| ------------------------------- | ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| global.modelUseHostPath | string | `"/mnt/opea-models"` | Cached models directory, tgi will not download if the model is cached here. The host path "modelUseHostPath" will be mounted to container as /data directory |
| image.repository | string | `"opea/llm-tgi"` | |
| service.port | string | `"9000"` | |
| TGI_LLM_ENDPOINT | string | `""` | LLM endpoint |
| Key | Type | Default | Description |
| ------------------------------- | ------ | ---------------- | ------------------------------- |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| image.repository | string | `"opea/llm-tgi"` | |
| service.port | string | `"9000"` | |
| TGI_LLM_ENDPOINT | string | `""` | LLM endpoint |
3 changes: 0 additions & 3 deletions helm-charts/common/llm-uservice/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,4 @@ data:
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
LANGCHAIN_TRACING_V2: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }}
LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY }}
LANGCHAIN_PROJECT: "opea-llm-uservice"
LOGFLAG: {{ .Values.LOGFLAG | quote }}
5 changes: 0 additions & 5 deletions helm-charts/common/llm-uservice/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,3 @@ global:
https_proxy: ""
no_proxy: ""
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface
modelUseHostPath: /mnt/opea-models
3 changes: 0 additions & 3 deletions helm-charts/common/reranking-usvc/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ data:
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
LANGCHAIN_TRACING_V2: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }}
LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY | quote }}
LANGCHAIN_PROJECT: "opea-reranking-service"
LOGFLAG: {{ .Values.LOGFLAG | quote }}
6 changes: 0 additions & 6 deletions helm-charts/common/reranking-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,3 @@ global:
http_proxy: ""
https_proxy: ""
no_proxy: ""
# HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface
modelUseHostPath: /mnt/opea-models
3 changes: 0 additions & 3 deletions helm-charts/common/retriever-usvc/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ data:
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
LANGCHAIN_TRACING_V2: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }}
LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY | quote }}
LANGCHAIN_PROJECT: "opea-retriever-service"
HF_HOME: "/tmp/.cache/huggingface"
HUGGINGFACEHUB_API_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}}
LOGFLAG: {{ .Values.LOGFLAG | quote }}
2 changes: 0 additions & 2 deletions helm-charts/common/retriever-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,4 @@ global:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
3 changes: 1 addition & 2 deletions helm-charts/update_genaiexamples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ function generate_yaml {
extra=$5

local extraparams=""
extraparams="--set global.modelUseHostPath=${MODELPATH}"
[[ "x$extra" != "x" ]] && extraparams="${extraparams},${extra}"
[[ "x$extra" != "x" ]] && extraparams="--set ${extra}"

helm dependency update $chart
helm template $chart $chart --skip-tests $extraparams -f $chart/${valuefile} > $outputdir/$outputfile
Expand Down
3 changes: 0 additions & 3 deletions microservices-connector/config/manifests/data-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
LANGCHAIN_PROJECT: "opea-dataprep-service"
LOGFLAG: ""
---
# Source: data-prep/templates/service.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: insert-your-langchain-key-here
LANGCHAIN_PROJECT: "opea-llm-uservice"
LOGFLAG: ""
---
# Source: llm-uservice/templates/service.yaml
Expand Down
3 changes: 0 additions & 3 deletions microservices-connector/config/manifests/embedding-usvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: insert-your-langchain-key-here
LANGCHAIN_PROJECT: "opea-embedding-service"
LOGFLAG: ""
---
# Source: embedding-usvc/templates/service.yaml
Expand Down
3 changes: 0 additions & 3 deletions microservices-connector/config/manifests/llm-uservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: insert-your-langchain-key-here
LANGCHAIN_PROJECT: "opea-llm-uservice"
LOGFLAG: ""
---
# Source: llm-uservice/templates/service.yaml
Expand Down
3 changes: 0 additions & 3 deletions microservices-connector/config/manifests/reranking-usvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
LANGCHAIN_PROJECT: "opea-reranking-service"
LOGFLAG: ""
---
# Source: reranking-usvc/templates/service.yaml
Expand Down
3 changes: 0 additions & 3 deletions microservices-connector/config/manifests/retriever-usvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
LANGCHAIN_TRACING_V2: "false"
LANGCHAIN_API_KEY: "insert-your-langchain-key-here"
LANGCHAIN_PROJECT: "opea-retriever-service"
HF_HOME: "/tmp/.cache/huggingface"
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LOGFLAG: ""
Expand Down

0 comments on commit 26f9b16

Please sign in to comment.