Switching the AI model¶
Alan AI provides generative AI services through the following AI models:
To choose the AI model to use:
In the
scripts/_<project>_vars.sh
file, set the model provider toopenai
orgoogle
:# Generative models provider. # Supported values: openai, google. export MODELS_PROVIDER=google
[For Google Gemini] In the
scripts/_<project>_vars.sh
file, set the Google project ID and the project region:# Google Cloud Project ID and the name of the config subfolder under cfg/. # Replace with your actual project ID. export PROJECT_ID=YOUR-PROJECT-ID # Region of the Google Cloud project. # Set this to your project's region. export REGION=us-central1
By default, Alan AI offers to use its Google Gemini and OpenAI GPT projects. To switch to your own project, in the
cfg/$PROJECT_ID
folder, update the service account data and keys in the following files:For Google Gemini:
cfg/$PROJECT_ID/alan_dialog_sa_key.json
cfg/$PROJECT_ID/alan_tutor_sa_key.json
cfg/$PROJECT_ID/alan_tutor_sa_key.json
For OpenAI GPT-4:
cfg/$PROJECT_ID/openai_key.txt
Run the following command to update the local Alan AI deployment:
./scripts/local-helm-install.sh