Skip to content

Commit 5c299c8

Browse files
author
MiaAppel
committed
fix: remove unnecessary loading of .env (artifact of previous verison that used gemini exclusively)
1 parent afba12f commit 5c299c8

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

testworkflows/scripts/evaluate.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from argparse import ArgumentError
77
from logging import Logger
88
from typing import Any
9-
from dotenv import load_dotenv
109
from datasets import Dataset
1110
from langchain_openai import ChatOpenAI
1211
from ragas import evaluate
@@ -197,21 +196,11 @@ def main(
197196
model: Model name to use for evaluation
198197
metrics: List of metric names to calculate
199198
"""
200-
# Load environment variables
201-
load_dotenv()
202199

203200
# Check if any metrics were provided
204201
if metrics is None:
205202
raise ArgumentError("No metrics were provided as arguments")
206203

207-
# Initialize the LLM for RAGAS evaluation
208-
# Using Google Generative AI (Gemini) via API key
209-
api_key = os.getenv("GOOGLE_API_KEY")
210-
if not api_key:
211-
raise ValueError("GOOGLE_API_KEY not found in environment variables")
212-
213-
214-
215204
# Create LLM client using the AI Gateway (environment variables 'OPEN_API_KEY' and 'OPENAI_API_BASE' need to be set)
216205
ragas_llm = ChatOpenAI(
217206
model=model

0 commit comments

Comments
 (0)