Skip to content

Environment Variables

There are multiple .env files in this project. This guides you through what each of them is for and how to set them up.

backend/.env

This file is used to set environment variables for the backend. This file is used when running the backend locally, but the same variables can be set in production by updating the container app settings in the Azure Portal.

The variables that can be set in this file are:

  • SUMMARY_MODEL: The model to use for summarization. Default is gemini/gemini-2.0-flash-lite.
  • PRESENTATION_OUTLINE_MODEL: The model to use for generating presentation outlines. Default is gemini/gemini-2.5-flash.
  • SLIDES_CONTENT_GENERATION_MODEL: The model to use for generating slides. Default is gemini/gemini-2.5-flash.
  • EMBEDDINGS_MODEL: The model to use for generating slide visuals. Default is gemini/gemini-embedding-001.
  • GEMINI_API_KEY: At the moment, it isn't used as the Gemini API Key is fetched from the user. However, you can update fastapi.py to use this variable if you want to set a default API key for all users.
  • GEMINI_OPENAI_URL: The URL for the Gemini OpenAI API. Default is https://generativelanguage.googleapis.com/v1beta/openai/.
  • AZURE_OPENAI_ENDPOINT: The endpoint for Azure OpenAI, if you are using it.
  • AZURE_OPENAI_API_KEY: The API key for Azure OpenAI, if you are using it.
  • AZURE_OPENAI_API_VERSION: The API version for Azure OpenAI, if you are using it.
  • OLLAMA_URL: The URL for the Ollama API, if you are using it. Default is http://localhost:11434/v1.
  • GENERIC_OPENAI_BASE_URL: The base URL for an OpenAI-compatible service, if you are using one.
  • GENERIC_OPENAI_API_KEY: The API key for an OpenAI-compatible service, if you are using one.

Updating these variables allows you to customize the behavior of the backend without changing the code.

The backend is designed to be flexible in terms of the integrated model and can work with different models as needed.

frontend/.env

This file is used to set environment variables for the frontend. This file is used when running the frontend locally. There is only one variable that here that is set up in production using the GitHub Actions workflow. The value is:

  • VITE_BACKEND_URL: The URL of the backend API (e.g., http://localhost:8000 for local development).

When deploying the frontend, ensure that this variable points to the correct backend URL.

In the deploy frontend GitHub Actions workflow, this variable is taken as a parameter to the workflow. The workflow is is configured to run manually, so it will ask for the backend URL when you trigger it. You can set up a default value for this variable in the workflow file if needed. Currently, the default is set to the current production backend URL.