From 214a79b0451c399bd851ecf1913fe0fe1353646f Mon Sep 17 00:00:00 2001 From: Motin Date: Thu, 1 Feb 2024 12:31:15 +0200 Subject: [PATCH] Update list of env vars that are necessary --- automation-api/.env.example | 22 +++++++++------------- automation-api/DEV.md | 1 - automation-api/lib/config.py | 1 - 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/automation-api/.env.example b/automation-api/.env.example index 85dc251..7f0ab73 100644 --- a/automation-api/.env.example +++ b/automation-api/.env.example @@ -1,24 +1,20 @@ -# For deploying to production -GCP_PROJECT="gapminder-ai" -GCP_REGION="europe-west3" - -# For running in production +# For running the YiVal experiments OPENAI_API_KEY="" OPENAI_ORG_ID="" -## for Huggingface Hub HUGGINGFACEHUB_API_TOKEN="" -## for PALM PALM_API_KEY="" -## for iFlytek IFLYTEK_API_KEY="" IFLYTEK_API_SECRET="" IFLYTEK_APPID="" -## for Alibaba -DASHSCOPE_API_KEY="" -# for Replicate +DASHSCOPE_API_KEY="" # for Alibaba REPLICATE_API_KEY="" +GEMINI_API_KEY="" -# For local development +# For local development / notebooks etc SERVICE_ACCOUNT_CREDENTIALS="" AI_EVAL_SPREADSHEET_ID="" -AI_EVAL_DEV_SPREADSHEET_ID="" +AI_EVAL_DEV_SPREADSHEET_ID="" # currently the same + +# For deploying to production (later) +GCP_PROJECT="gapminder-ai" +GCP_REGION="europe-west3" diff --git a/automation-api/DEV.md b/automation-api/DEV.md index 2f971bc..11fe349 100644 --- a/automation-api/DEV.md +++ b/automation-api/DEV.md @@ -48,7 +48,6 @@ Configure the environment variables in `.env` as per the configuration sections The deployed cloud functions will use the access credentials of the current user and operate on the spreadsheet that is currently opened. During local development, we have neither active credentials or an open spreadsheet, so the following additional configuration is necessary: -- `OPENAI_API_DEV_KEY` - An OpenAI API key to use for OpenAI model evaluations when running locally - `SERVICE_ACCOUNT_CREDENTIALS` - Service account credentials, base64-encoded, native to the above GCP project (see below for instructions on how to obtain these) - `GS_AI_EVAL_SPREADSHEET_ID` - Spreadsheet ID of the production AI Eval Spreadsheet (Note: the service account needs access to this spreadsheet) - `GS_AI_EVAL_DEV_SPREADSHEET_ID` - Spreadsheet ID of a development copy of the AI Eval Spreadsheet (Note: the service account needs access to this spreadsheet) diff --git a/automation-api/lib/config.py b/automation-api/lib/config.py index cbab017..1c039c3 100644 --- a/automation-api/lib/config.py +++ b/automation-api/lib/config.py @@ -19,7 +19,6 @@ def read_config() -> dict[str, str]: raise Exception(f"The mandatory environment variable {key} is empty") # Optional configuration for key in [ - "OPENAI_API_DEV_KEY", "SERVICE_ACCOUNT_CREDENTIALS", "AI_EVAL_SPREADSHEET_ID", "AI_EVAL_DEV_SPREADSHEET_ID",