This directory contains the code for the Retrieval-Augmented Generation (RAG) API service.
There are two modes to run the server:
This mode requires a running Spanner database.
make run-history-api
This command uses ./configs/chrome-internal.json by default.
This mode loads the index snapshot directly from GCS and serves queries from memory. It does not require a running Spanner database.
make run-history-api-in-memory
By default, it uses the date 2026-04-20. You can override the date by setting the INDEX_DATE environment variable:
INDEX_DATE=2026-04-20 make run-history-api-in-memory
Note: Ensure that your configuration file (e.g., ./configs/demo.json) has the gcs_bucket field set.
Configuration files are located in the configs directory. Key parameters include:
spanner_config: For database mode.gcs_bucket: For in-memory mode.query_embedding_model: Gemini model for embeddings.summary_model: Gemini model for summaries.Ensure you have the following environment variables set for Gemini API access:
GEMINI_API_KEY (if running locally with an API key)GEMINI_PROJECT and GEMINI_LOCATION if using Google Cloud project credentials.