Switching the AI model

Alan AI provides generative AI services through the following AI models:

To choose the AI model to use:

  1. In the scripts/_<project>_vars.sh file, set the model provider to openai or google:

    scripts/_<project>_vars.sh
    # Generative models provider.
    # Supported values: openai, google.
    export MODELS_PROVIDER=google
    
  2. [For Google Gemini] In the scripts/_<project>_vars.sh file, set the Google project ID and the project region:

    scripts/_<project>_vars.sh
    # 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
    
  3. 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

  4. Run the following command to update the local Alan AI deployment:

    Terminal
    ./scripts/local-helm-install.sh