Skip to content

Commit

Permalink
Update list of env vars that are necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
motin committed Feb 1, 2024
1 parent 21aa05f commit 214a79b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
22 changes: 9 additions & 13 deletions automation-api/.env.example
Original file line number Diff line number Diff line change
@@ -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"
1 change: 0 additions & 1 deletion automation-api/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion automation-api/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 214a79b

Please sign in to comment.