feat(anything-llm) add gui items and update chart (#18268)

**Description**
Add gui items and update chart.
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [X] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [X] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Xstar97TheNoob
2024-02-19 07:35:33 -05:00
committed by GitHub
parent 176e5a7a61
commit 2f4e19ea1f
5 changed files with 513 additions and 3 deletions

View File

@@ -34,4 +34,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/anything-llm
- https://ghcr.io/mintplex-labs/anything-llm
type: application
version: 0.0.2
version: 0.0.3

View File

@@ -10,6 +10,384 @@ questions:
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
- variable: env
label: Image Environment
schema:
additional_attrs: true
type: dict
attrs:
- variable: LLM_PROVIDER
label: LLM Provider
schema:
type: string
required: true
default: default
enum:
- value: ""
description: Default
- value: openai
description: OpenAI
- value: gemini
description: Gemini
- value: azure
description: Azure
- value: anthropic
description: Anthropic
- value: lmstudio
description: LMStudio
- value: localai
description: LocalAI
- value: ollama
description: Ollama
- value: togetherai
description: TogetherAI
- value: mistral
description: Mistral
- value: huggingface
description: HuggingFace
- variable: OPEN_AI_KEY
label: Open AI Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "openai"]]
- variable: GEMINI_API_KEY
label: Gemini AI Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "gemini"]]
- variable: GEMINI_LLM_MODEL_PREF
label: Gemini LLM Model Pref
schema:
type: string
default: "gemini-pro"
show_if: [[LLM_PROVIDER, "=", "gemini"]]
- variable: AZURE_OPENAI_KEY
label: Azure OpenAI Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "azure"]]
- variable: AZURE_OPENAI_ENDPOINT
label: Azure OpenAI Endpoint
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "azure"]]
- variable: ANTHROPIC_API_KEY
label: Anthropic API Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "anthropic"]]
- variable: ANTHROPIC_MODEL_PREF
label: Anthropic Model Pref
schema:
type: string
default: "claude-2"
show_if: [[LLM_PROVIDER, "=", "anthropic"]]
- variable: LMSTUDIO_BASE_PATH
label: LMStudio Base Path
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "lmstudio"]]
- variable: LMSTUDIO_MODEL_TOKEN_LIMIT
label: LMStudio Model Token Limit
schema:
type: int
default: 4096
show_if: [[LLM_PROVIDER, "=", "lmstudio"]]
- variable: LOCAL_AI_API_KEY
label: Local AI API Key
schema:
type: string
default: "sk-123abc"
show_if: [[LLM_PROVIDER, "=", "localai"]]
- variable: LOCAL_AI_MODEL_TOKEN_LIMIT
label: Local AI Model Token Limit
schema:
type: int
default: 4096
show_if: [[LLM_PROVIDER, "=", "localai"]]
- variable: LOCAL_AI_BASE_PATH
label: Local AI Base Path
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "localai"]]
- variable: LOCAL_AI_MODEL_PREF
label: Local AI Model Pref
schema:
type: string
default: "luna-ai-llama2"
show_if: [[LLM_PROVIDER, "=", "localai"]]
- variable: OLLAMA_BASE_PATH
label: Ollama Base Path
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "ollama"]]
- variable: OLLAMA_MODEL_PREF
label: Ollama Model Pref
schema:
type: string
default: "llama2"
show_if: [[LLM_PROVIDER, "=", "ollama"]] - variable: LOCAL_AI_API_KEY
- variable: OLLAMA_MODEL_TOKEN_LIMIT
label: Ollama Model Token Limit
schema:
type: int
default: 4096
show_if: [[LLM_PROVIDER, "=", "ollama"]] - variable: LOCAL_AI_API_KEY
- variable: TOGETHER_AI_API_KEY
label: Together AI API Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "togetherai"]]
- variable: TOGETHER_AI_MODEL_PREF
label: Together AI Model pref
schema:
type: string
default: "mistralai/Mixtral-8x7B-Instruct-v0.1"
show_if: [[LLM_PROVIDER, "=", "togetherai"]]
- variable: MISTRAL_API_KEY
label: Mistral API Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "mistral"]]
- variable: MISTRAL_MODEL_PREF
label: Mistral Model pref
schema:
type: string
default: "mistral-tiny"
show_if: [[LLM_PROVIDER, "=", "mistral"]]
- variable: HUGGING_FACE_LLM_API_KEY
label: Hugging Face LLM API Key
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "huggingface"]]
- variable: HUGGING_FACE_LLM_TOKEN_LIMIT
label: Hugging Face LLM Token Limit
schema:
type: int
default: 8000
show_if: [[LLM_PROVIDER, "=", "huggingface"]]
- variable: HUGGING_FACE_LLM_ENDPOINT
label: Hugging Face LLM EndPoint
schema:
type: string
default: ""
show_if: [[LLM_PROVIDER, "=", "huggingface"]]
- variable: OPEN_MODEL_PREF
label: Open Model Pref
schema:
type: string
default: ""
- variable: EMBEDDING_ENGINE
label: Embedding Engine
schema:
type: string
required: true
default: default
enum:
- value: ""
description: Default
- value: openai
description: OpenAI
- value: azure
description: Azure
- value: localai
description: LocalAI
- variable: EMBEDDING_MODEL_PREF
label: Embedding Model Pref
schema:
type: string
default: ""
- variable: EMBEDDING_BASE_PATH
label: Embedding Base Path
schema:
type: string
default: ""
- variable: EMBEDDING_MODEL_MAX_CHUNK_LENGTH
label: Embedding Model Max Chunk Length
schema:
type: int
default: 1000
- variable: VECTOR_DB
label: Vector DB
schema:
type: string
required: true
default: default
enum:
- value: ""
description: Default
- value: chroma
description: Chroma
- value: pinecone
description: PineCone
- value: lancedb
description: LanceDB
- value: weaviate
description: Weaviate
- value: qdrant
description: Qdrant
- value: milvus
description: Milvus
- value: zilliz
description: Zilliz
- value: astra
description: Astra DB
- variable: CHROMA_API_KEY
label: Chroma API Key
schema:
type: string
default: "sk-123abc"
show_if: [[VECTOR_DB, "=", "chroma"]]
- variable: CHROMA_API_HEADER
label: Chroma API Header
schema:
type: string
default: "X-Api-Key"
show_if: [[VECTOR_DB, "=", "chroma"]]
- variable: CHROMA_ENDPOINT
label: Chroma Endpoint
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "chroma"]]
- variable: PINECONE_API_KEY
label: PineCone API Key
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "pinecone"]]
- variable: PINECONE_INDEX
label: PineCone Index
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "pinecone"]]
- variable: WEAVIATE_API_KEY
label: Weaviate API Key
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "weaviate"]]
- variable: WEAVIATE_ENDPOINT
label: Weaviate Endpoint
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "weaviate"]]
- variable: QDRANT_API_KEY
label: Qdrant API Key
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "qdrant"]]
- variable: QDRANT_ENDPOINT
label: Qdrant Endpointt
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "qdrant"]]
- variable: MILVUS_ADDRESS
label: Milvus Address
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "milvus"]]
- variable: MILVUS_USERNAME
label: Milvus UserName
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "milvus"]]
- variable: MILVUS_PASSWORD
label: Milvus Password
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "milvus"]]
- variable: ZILLIZ_API_TOKEN
label: Zilliz API Token
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "zilliz"]]
- variable: ZILLIZ_ENDPOINT
label: Zilliz EndPoint
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "zilliz"]]
- variable: ASTRA_DB_APPLICATION_TOKEN
label: Astra DB Application Token
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "astra"]]
- variable: ASTRA_DB_ENDPOINT
label: Astra DB EndPoint
schema:
type: string
default: ""
show_if: [[VECTOR_DB, "=", "astra"]]
- variable: adv_settings
label: Show Advanced Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: DISABLE_TELEMETRY
label: Disable Telemetry
schema:
type: boolean
default: false
- variable: PASSWORDMINCHAR
label: Password Min Char
schema:
type: int
default: 8
- variable: PASSWORDMAXCHAR
label: Password Max Char
schema:
type: int
default: 250
- variable: PASSWORDLOWERCASE
label: Password LowerCase
schema:
type: int
default: 1
- variable: PASSWORDUPPERCASE
label: Password UpperCase
schema:
type: int
default: 1
- variable: PASSWORDNUMERIC
label: Password Numeric
schema:
type: int
default: 1
- variable: PASSWORDSYMBOL
label: Password Symbol
schema:
type: int
default: 1
- variable: PASSWORDREQUIREMENTS
label: Password Requirements
schema:
type: int
default: 4
# Include{containerAdvanced}
# Include{containerConfig}
# Include{podOptions}

View File

@@ -0,0 +1,13 @@
{{/* Define the secrets */}}
{{- define "anythinglmm.secrets" -}}
{{- $secretName := (printf "%s-anythinglmm-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
{{- $jwtSecret := randAlphaNum 64 -}}
{{- with lookup "v1" "Secret" .Release.Namespace $secretName -}}
{{- $jwtSecret = index .data "JWT_SECRET" | b64dec -}}
{{- end }}
enabled: true
data:
JWT_SECRET: {{ $jwtSecret }}
{{- end -}}

View File

@@ -1 +1,11 @@
{{ include "tc.v1.common.loader.all" . }}
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . -}}
{{/* Render secrets for anythinglmm */}}
{{- $secrets := include "anythinglmm.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := set .Values.secret "anythinglmm-secrets" $secrets -}}
{{- end -}}
{{/* Render the templates */}}
{{- include "tc.v1.common.loader.apply" . -}}

View File

@@ -1,7 +1,7 @@
image:
repository: ghcr.io/mintplex-labs/anything-llm
pullPolicy: IfNotPresent
tag: latest@sha256:398218457ffe5e3be2d686f99ed759a9683075030f72832a89c4cc4429c481ac
tag: latest@sha256:6313fe9fa6c65e294da8a8b3066fdb8397d42df73b43b1800a289cd87f1a68cb
securityContext:
container:
readOnlyRootFilesystem: false
@@ -29,6 +29,115 @@ workload:
# forces users to use ingress if https is needed.
# keep false.
ENABLE_HTTPS: false
JWT_SECRET:
secretKeyRef:
name: anythinglmm-secrets
key: JWT_SECRET
# LLM_PROVIDER='openai'
# OPEN_AI_KEY=
# OPEN_MODEL_PREF='gpt-3.5-turbo'
# LLM_PROVIDER='gemini'
# GEMINI_API_KEY=
# GEMINI_LLM_MODEL_PREF='gemini-pro'
# LLM_PROVIDER='azure'
# AZURE_OPENAI_KEY=
# AZURE_OPENAI_ENDPOINT=
# OPEN_MODEL_PREF='my-gpt35-deployment' # This is the "deployment" on Azure you want to use. Not the base model.
# EMBEDDING_MODEL_PREF='embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002
# LLM_PROVIDER='anthropic'
# ANTHROPIC_API_KEY=sk-ant-xxxx
# ANTHROPIC_MODEL_PREF='claude-2'
# LLM_PROVIDER='lmstudio'
# LMSTUDIO_BASE_PATH='http://your-server:1234/v1'
# LMSTUDIO_MODEL_TOKEN_LIMIT=4096
# LLM_PROVIDER='localai'
# LOCAL_AI_BASE_PATH='http://host.docker.internal:8080/v1'
# LOCAL_AI_MODEL_PREF='luna-ai-llama2'
# LOCAL_AI_MODEL_TOKEN_LIMIT=4096
# LOCAL_AI_API_KEY="sk-123abc"
# LLM_PROVIDER='ollama'
# OLLAMA_BASE_PATH='http://host.docker.internal:11434'
# OLLAMA_MODEL_PREF='llama2'
# OLLAMA_MODEL_TOKEN_LIMIT=4096
# LLM_PROVIDER='togetherai'
# TOGETHER_AI_API_KEY='my-together-ai-key'
# TOGETHER_AI_MODEL_PREF='mistralai/Mixtral-8x7B-Instruct-v0.1'
# LLM_PROVIDER='mistral'
# MISTRAL_API_KEY='example-mistral-ai-api-key'
# MISTRAL_MODEL_PREF='mistral-tiny'
# LLM_PROVIDER='huggingface'
# HUGGING_FACE_LLM_ENDPOINT=https://uuid-here.us-east-1.aws.endpoints.huggingface.cloud
# HUGGING_FACE_LLM_API_KEY=hf_xxxxxx
# HUGGING_FACE_LLM_TOKEN_LIMIT=8000
# EMBEDDING_ENGINE='openai'
# OPEN_AI_KEY=sk-xxxx
# EMBEDDING_MODEL_PREF='text-embedding-ada-002'
# EMBEDDING_ENGINE='azure'
# AZURE_OPENAI_ENDPOINT=
# AZURE_OPENAI_KEY=
# EMBEDDING_MODEL_PREF='my-embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002
# EMBEDDING_ENGINE='localai'
# EMBEDDING_BASE_PATH='http://localhost:8080/v1'
# EMBEDDING_MODEL_PREF='text-embedding-ada-002'
# EMBEDDING_MODEL_MAX_CHUNK_LENGTH=1000 # The max chunk size in chars a string to embed can be
# Enable all below if you are using vector database: Chroma.
# VECTOR_DB="chroma"
# CHROMA_ENDPOINT='http://host.docker.internal:8000'
# CHROMA_API_HEADER="X-Api-Key"
# CHROMA_API_KEY="sk-123abc"
# VECTOR_DB="pinecone"
# PINECONE_API_KEY=
# PINECONE_INDEX=
# VECTOR_DB="lancedb"
# VECTOR_DB="weaviate"
# WEAVIATE_ENDPOINT="http://localhost:8080"
# WEAVIATE_API_KEY=
# VECTOR_DB="qdrant"
# QDRANT_ENDPOINT="http://localhost:6333"
# QDRANT_API_KEY=
# VECTOR_DB="milvus"
# MILVUS_ADDRESS="http://localhost:19530"
# MILVUS_USERNAME=
# MILVUS_PASSWORD=
# VECTOR_DB="zilliz"
# ZILLIZ_ENDPOINT="https://sample.api.gcp-us-west1.zillizcloud.com"
# ZILLIZ_API_TOKEN=api-token-here
# VECTOR_DB="astra"
# ASTRA_DB_APPLICATION_TOKEN=
# ASTRA_DB_ENDPOINT=
# AUTH_TOKEN="hunter2" # This is the password to your application if remote hosting.
# DISABLE_TELEMETRY="false"
# Documentation on how to use https://github.com/kamronbatman/joi-password-complexity
# Default is only 8 char minimum
PASSWORDMINCHAR: 8
PASSWORDMAXCHAR: 250
PASSWORDLOWERCASE: 1
PASSWORDUPPERCASE: 1
PASSWORDNUMERIC: 1
PASSWORDSYMBOL: 1
PASSWORDREQUIREMENTS: 4
persistence:
storage: