rnrahate007 commited on
Commit
9f59e6e
·
verified ·
1 Parent(s): aa582f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,7 +38,7 @@ class GeminiReActAgent:
38
  raise ValueError("GEMINI_API_KEY not set")
39
 
40
  # Direct REST API endpoint for Gemini 2.5 Flash
41
- self.url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key={self.api_key}"
42
  print("Vanilla ReAct Gemini Agent initialized with rate-limit handling.")
43
 
44
  def call_gemini(self, history) -> str:
@@ -57,7 +57,7 @@ class GeminiReActAgent:
57
  try:
58
  # ENFORCED TIME PACING: Wait 15 seconds to stay under the 5 Requests Per Minute limit.
59
  print(" -> Pacing API: Sleeping for 15 seconds to respect 5 RPM limit...")
60
- time.sleep(15)
61
 
62
  response = requests.post(self.url, json=payload, timeout=20)
63
 
 
38
  raise ValueError("GEMINI_API_KEY not set")
39
 
40
  # Direct REST API endpoint for Gemini 2.5 Flash
41
+ self.url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key={self.api_key}"
42
  print("Vanilla ReAct Gemini Agent initialized with rate-limit handling.")
43
 
44
  def call_gemini(self, history) -> str:
 
57
  try:
58
  # ENFORCED TIME PACING: Wait 15 seconds to stay under the 5 Requests Per Minute limit.
59
  print(" -> Pacing API: Sleeping for 15 seconds to respect 5 RPM limit...")
60
+ time.sleep(5)
61
 
62
  response = requests.post(self.url, json=payload, timeout=20)
63