rag-api

by hajowieland

Helm chartv1.0.0App v0.5.0Verified publisher

A Helm chart for rag-api (LibreChat)

About this chart

rag-api

A Helm chart for rag-api (LibreChat)

TL;DR;

helm repo add hajowieland https://charts.wieland.tech
helm repo update
helm install my-release hajowieland/librechat-rag-api

Introduction

This chart deploys the RAG API for LibreChat.

Prerequisites

You can reference the CNPG Cluster's app Secret in .postgresSecret.secretName.

To create the pgvector extension, superuser credentials are required. See ci-values.yaml for an example on how to get superuser username and password from another Secret.

Installing the Chart

To install the chart with the release name my-release:

helm repo add hajowieland https://charts.wieland.tech
helm repo update
helm install my-release hajowieland/miniflux

The Values section lists the values that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the my-release deployment:

helm uninstall my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

All RAG API configuration settings can be found here: https://github.com/danny-avila/rag_api/tree/v0.5.0?tab=readme-ov-file

Just add the Environment Variable in the .env section.

Values

KeyTypeDefaultDescription
affinityobject{}
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
config.env.CHUNK_OVERLAPstring"100"
config.env.CHUNK_SIZEstring"1500"
config.env.COLLECTION_NAMEstring"testcollection"
config.env.CONSOLE_JSONstring"True"
config.env.DEBUG_RAG_APIstring"False"
config.env.EMBEDDINGS_MODELstring"text-embedding-3-small"
config.env.EMBEDDINGS_PROVIDERstring"openai"
config.env.PDF_EXTRACT_IMAGESstring"False"
config.env.RAG_USE_FULL_CONTEXTstring"False"
config.env.VECTOR_DB_TYPEstring"pgvector"
config.envSecrets.secretKeyReflist[]
fullnameOverridestring""
image.pullPolicystring"Always"
image.repositorystring"ghcr.io/danny-avila/librechat-rag-api-dev-lite"
image.tagstring"latest"
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
livenessProbe.httpGet.pathstring"/health"
livenessProbe.httpGet.portstring"http"
nameOverridestring""
nodeSelectorobject{}
persistence.accessModestring"ReadWriteOnce"
persistence.enabledboolfalse
persistence.existingClaimstring""
persistence.sizestring"10Gi"
persistence.storageClassstring""
podAnnotationsobject{}
podLabelsobject{}
podSecurityContextobject{}
postgresSecret.dbnameKeystring"dbname"
postgresSecret.enabledboolfalse
postgresSecret.hostKeystring"host"
postgresSecret.passwordKeystring""if empty, set POSTGRES_PASSWORD in .config.env - or get superuser password from .config.secretKeyRef and set name: POSTGRES_PASSWORD
postgresSecret.portKeystring"port"
postgresSecret.secretNamestring""
postgresSecret.userKeystring""# if empty, set POSTGRES_USER in .config.env
readinessProbe.httpGet.pathstring"/health"
readinessProbe.httpGet.portstring"http"
replicaCountint1
resourcesobject{}
securityContextobject{}
service.portint8000
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.automountbooltrue
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]
volumeMountslist[]
volumeslist[]

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml hajowieland/miniflux

Deploy rag-api with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rag-api on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrag-api is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply