Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/ci-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,11 @@ jobs:
run: |
cp backend/.env.example backend/.env
sed -i 's|{{GOOGLE_API_KEY}}|${{ secrets.GOOGLE_API_KEY }}|g' backend/.env
sed -i 's|{{GOOGLE_PROJECT_ID}}|${{ secrets.GOOGLE_PROJECT_ID }}|g' backend/.env
sed -i 's|{{PATH_TO_GOOGLE_APPLICATION_CREDENTIALS}}|src/secret.json|g' backend/.env
sed -i 's|HF_TOKEN=|HF_TOKEN=${{ secrets.HF_TOKEN }}|g' backend/.env

cp backend/.env.example evaluation/.env
sed -i 's|{{GOOGLE_API_KEY}}|${{ secrets.GOOGLE_API_KEY }}|g' evaluation/.env
sed -i 's|{{GOOGLE_PROJECT_ID}}|${{ secrets.GOOGLE_PROJECT_ID }}|g' evaluation/.env
sed -i 's|{{PATH_TO_GOOGLE_APPLICATION_CREDENTIALS}}|src/secret.json|g' evaluation/.env
sed -i 's|HF_TOKEN=|HF_TOKEN=${{ secrets.HF_TOKEN }}|g' evaluation/.env
- name: Copy Google credentials
env:
GOOGLE_SECRET_JSON: ${{ secrets.PATH_TO_GOOGLE_APPLICATION_CREDENTIALS }}
run: |
make seed-credentials
- name: Build Docker image
run: |
make docker-up
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FOLDERS=backend frontend evaluation
GOOGLE_SECRET_JSON?=$(HOME)/secret.json

.PHONY: init
init:
Expand Down Expand Up @@ -34,11 +33,6 @@ docker-dev:
@docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build --wait

# --- Development Commands ---
.PHONY: seed-credentials
seed-credentials:
@cp $(GOOGLE_SECRET_JSON) backend/src
@cp $(GOOGLE_SECRET_JSON) evaluation/auto_evaluation/src

.PHONY: changelog
changelog:
@git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short --since="2024-06-01" > CHANGELOG.md
Expand Down
3 changes: 0 additions & 3 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
GOOGLE_API_KEY={{GOOGLE_API_KEY}}
GOOGLE_PROJECT_ID={{GOOGLE_PROJECT_ID}}
GOOGLE_APPLICATION_CREDENTIALS={{PATH_TO_GOOGLE_APPLICATION_CREDENTIALS}}
GOOGLE_CLOUD_LOCATION=us-central1

# Backend endpoint URL
BACKEND_ENDPOINT=http://localhost:8000
Expand Down
27 changes: 5 additions & 22 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,20 @@ cp .env.example .env
```


### Setting Up Google API Key and Credentials Variables

There are 2 variables that needs to be set up
### Setting Up Google API Key

- `GOOGLE_API_KEY`

This key is used to access the various google cloud functions.
This key is used to access the Google Gemini API.
Comment on lines +17 to +21
Copy link

Copilot AI Mar 3, 2026

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 use GOOGLE_API_KEY only). To avoid confusion for contributors, consider updating the docs/issue reference to use the same env var name consistently (either GOOGLE_API_KEY everywhere or rename in code/docs if GEMINI_API_KEY is the intended target).

Copilot uses AI. Check for mistakes.
- Go to [Google Cloud Console](https://console.cloud.google.com/)
- Create new project or select existing one
- Enable required APIs:
- Google Gemini API
- Vertex AI API
- Go to APIs & Services > Credentials
- Click "Create Credentials" > "API Key"
- Copy the generated key and it to the `.env` file

- `GOOGLE_APPLICATION_CREDENTIALS`
Since most of the GCP functions / services would be used by our app, we need to have a special credential that would allow `ORAssistant`'s access to the GCP
Steps to set up Service Account Credentials:
- In Google Cloud Console, go to IAM & Admin > Service Accounts
- Click "Create Service Account"
Fill in service account details
- Grant required roles:
- Vertex AI User
- Vertex AI Service Agent
- Create key (JSON format)
- Download JSON file
- Store securely and add path to .env:
`GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json`

**NOTE**: The user might need billing to be set up on google cloud account and make sure to name the file as `credentials.json` as this would be ignored by `.git` and wouldn't be exposed on Github
- Copy the generated key and add it to the `.env` file

**NOTE**: The user might need billing to be set up on their Google Cloud account.

### Running ORAssistant with a Local Ollama Model

Expand Down
2 changes: 1 addition & 1 deletion evaluation/script_based_evaluation/.env.sample
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}}
15 changes: 5 additions & 10 deletions evaluation/script_based_evaluation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README still contains stale credential/CLI guidance that conflicts with switching to GOOGLE_API_KEY only: it mentions “Google Vertex AI” in the intro and later example commands/flags reference secret.json / --creds-path, but script_based_evaluation/main.py doesn’t accept those args and the models use GOOGLE_API_KEY directly. Please update/remove those sections so the setup instructions are consistent throughout this README.

Copilot uses AI. Check for mistakes.
### Required Files

- `secret.json`: Ensure you have a Google Vertex AI subscription and the necessary credentials file.

### Data Files

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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"
Expand Down