Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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

Copilot AI Mar 3, 2026

Copy link

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}}
5 changes: 1 addition & 4 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
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models

Copilot AI Mar 3, 2026

Copy link

Choose a reason for hiding this comment

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

OPENAI_API_KEY is documented here as only required when testing OpenAI models, but script_based_evaluation/main.py currently exits if OPENAI_API_KEY is missing even when you might only want to run Gemini-based evaluators. Either update the README to reflect that OPENAI_API_KEY is always required, or adjust the script so OpenAI is only initialized/required when OpenAI models are selected.

Suggested change
OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models
OPENAI_API_KEY=your_openai_api_key # Required by the evaluation scripts

Copilot uses AI. Check for mistakes.
```
Comment on lines 19 to 23

Copilot AI Mar 3, 2026

Copy link

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 Down
Loading