Yous135774 commited on
Commit
5483422
·
verified ·
1 Parent(s): fa66dda

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +3 -3
bot.py CHANGED
@@ -139,8 +139,8 @@ class GeminiManager:
139
 
140
  def report_dead_key(self, key):
141
  with self.lock:
142
- self.cooldowns[key] = time.time() + 7200
143
- print(f"🔴 مفتاح تم حظره لمدة ساعتين: {key[:10]}...")
144
 
145
  async def analyze_image(self, image_path, advance_mode=False):
146
  prompt = """TASK: STRICT OCR ONLY (VISION + COMPLETENESS ENFORCED)
@@ -246,7 +246,7 @@ ORDER NO. 6: FINAL ENFORCEMENT (ZERO TOLERANCE)
246
  for attempt in range(len(self.keys)):
247
  current_api_key = self.get_valid_key()
248
  if not current_api_key:
249
- await asyncio.sleep(5)
250
  continue
251
 
252
  genai.configure(api_key=current_api_key)
 
139
 
140
  def report_dead_key(self, key):
141
  with self.lock:
142
+ self.cooldowns[key] = time.time() + 300
143
+ print(f" مفتاح تم حظره لمدة خمساية ن: {key[:10]}...")
144
 
145
  async def analyze_image(self, image_path, advance_mode=False):
146
  prompt = """TASK: STRICT OCR ONLY (VISION + COMPLETENESS ENFORCED)
 
246
  for attempt in range(len(self.keys)):
247
  current_api_key = self.get_valid_key()
248
  if not current_api_key:
249
+ await asyncio.sleep(2)
250
  continue
251
 
252
  genai.configure(api_key=current_api_key)