Repository for Deploy A Gradio App with Azure OpenAI as a backend LLM within Azure Red Hat OpenShift (ARO) cluster.
NOTE: The model used in Azure OpenAI is the GPT-3.5 Turbo, which can be changed to utilize other models such as GPT-4.
kubectl apply -k manifests/overlays/ocp
NOTE: Use kubectl apply -k manifests/overlays/k8s
if you want to deploy it in Vanilla K8s
export OPENAI_API_BASE="https://MY_FANCY_URL.openai.azure.com/"
export OPENAI_API_KEY="your-api-key"
export NAMESPACE="aro-azureopenai"
cat <<EOF | kubectl apply -n $NAMESPACE -f -
apiVersion: v1
kind: Secret
metadata:
name: azure-openai
type: Opaque
data:
OPENAI_API_BASE: $(echo -n "$OPENAI_API_BASE" | base64)
OPENAI_API_KEY: $(echo -n "$OPENAI_API_KEY" | base64)
EOF
export OPENAI_API_BASE="xxx"
export OPENAI_API_KEY="xxx"
python main.py