skyliulu commited on
Commit
df9a213
·
1 Parent(s): 11a3451
Files changed (1) hide show
  1. agents.py +2 -2
agents.py CHANGED
@@ -202,9 +202,9 @@ class GeminiAgent(LLMAgentBase):
202
  kwargs['start_timer_on_battle_start'] = True
203
  super().__init__(*args, **kwargs)
204
  self.model_name = model
205
- used_api_key = api_key or os.environ.get("GOOGLE_API_KEY")
206
  if not used_api_key:
207
- raise ValueError("Google API key not provided or found in GOOGLE_API_KEY env var.")
208
 
209
  # Initialize Gemini client using the correct API
210
  self.genai_client = genai.Client(api_key=used_api_key)
 
202
  kwargs['start_timer_on_battle_start'] = True
203
  super().__init__(*args, **kwargs)
204
  self.model_name = model
205
+ used_api_key = api_key or os.environ.get("GEMINI_API_KEY")
206
  if not used_api_key:
207
+ raise ValueError("Google API key not provided or found in GEMINI_API_KEY env var.")
208
 
209
  # Initialize Gemini client using the correct API
210
  self.genai_client = genai.Client(api_key=used_api_key)