-
Notifications
You must be signed in to change notification settings - Fork 21
Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GOOGLE_API_KEY #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| GOOGLE_APPLICATION_CREDENTIALS={{GOOGLE_APPLICATION_CREDENTIALS}} | ||
| GOOGLE_API_KEY={{GOOGLE_API_KEY}} | ||
| OPENAI_API_KEY={{OPENAI_API_KEY}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,12 +18,9 @@ This project automates the evaluation of language model responses using classifi | |
|
|
||
| Create a `.env` file in the root directory with the following variables: | ||
| ```plaintext | ||
| GOOGLE_APPLICATION_CREDENTIALS=path/to/secret.json | ||
| OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models | ||
| GOOGLE_API_KEY=your_google_api_key | ||
| OPENAI_API_KEY=your_openai_api_key | ||
| ``` | ||
|
Comment on lines
19
to
23
|
||
| ### Required Files | ||
|
|
||
| - `secret.json`: Ensure you have a Google Vertex AI subscription and the necessary credentials file. | ||
|
|
||
| ### Data Files | ||
|
|
||
|
|
@@ -46,11 +43,10 @@ OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models | |
| Use the following command to execute the script with customizable options: | ||
|
|
||
| ```bash | ||
| python script.py --env-path /path/to/.env --creds-path /path/to/secret.json --iterations 10 --llms "base-gemini-1.5-flash,base-gpt-4o" --agent-retrievers "v1=http://url1.com,v2=http://url2.com" | ||
| python main.py --env-path /path/to/.env --iterations 10 --llms "base-gemini-1.5-flash,base-gpt-4o" --agent-retrievers "v1=http://url1.com,v2=http://url2.com" | ||
| ``` | ||
|
|
||
| - `--env-path`: Path to the `.env` file. | ||
| - `--creds-path`: Path to the `secret.json` file. | ||
| - `--iterations`: Number of iterations per question. | ||
| - `--llms`: Comma-separated list of LLMs to test. | ||
| - `--agent-retrievers`: Comma-separated list of agent-retriever names and URLs. | ||
|
|
@@ -73,10 +69,10 @@ python main.py | |
| - Tests all available LLMs. | ||
| - No additional agent-retrievers. | ||
|
|
||
| ### b. Specify .env and secret.json Paths | ||
| ### b. Specify .env Path | ||
|
|
||
| ```bash | ||
| python main.py --env-path /path/to/.env --creds-path /path/to/secret.json | ||
| python main.py --env-path /path/to/.env | ||
| ``` | ||
|
|
||
| ### c. Customize Iterations and Select Specific LLMs | ||
|
|
@@ -96,7 +92,6 @@ python main.py --agent-retrievers "v1=http://url1.com,v2=http://url2.com" | |
| ```bash | ||
| python main.py \ | ||
| --env-path /path/to/.env \ | ||
| --creds-path /path/to/secret.json \ | ||
| --iterations 10 \ | ||
| --llms "base-gemini-1.5-flash,base-gpt-4o" \ | ||
| --agent-retrievers "v1=http://url1.com,v2=http://url2.com" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked issue (#155) text says “Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GEMINI_API_KEY”, but this PR standardizes on
GOOGLE_API_KEY(and the codebase appears to useGOOGLE_API_KEYonly). To avoid confusion for contributors, consider updating the docs/issue reference to use the same env var name consistently (eitherGOOGLE_API_KEYeverywhere or rename in code/docs ifGEMINI_API_KEYis the intended target).