Keyurjotaniya007 commited on
Commit
9ed859c
·
verified ·
1 Parent(s): 4879399

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +1 -1
chatbot.py CHANGED
@@ -159,7 +159,7 @@ Here are the strict guidelines you must follow:
159
  print(f"Attempt {attempt+1}: Generated code missing HTML/BODY tags. Retrying...")
160
  time.sleep(5)
161
 
162
- except Exception as e:
163
  if "ResourceExhausted" in str(e) or "429" in str(e) or "500" in str(e):
164
  print(f"Attempt {attempt+1}: Rate limit or server error. Retrying in {30 * (attempt + 1)} seconds...")
165
  time.sleep(30 * (attempt + 1))
 
159
  print(f"Attempt {attempt+1}: Generated code missing HTML/BODY tags. Retrying...")
160
  time.sleep(5)
161
 
162
+ except Exception as e:
163
  if "ResourceExhausted" in str(e) or "429" in str(e) or "500" in str(e):
164
  print(f"Attempt {attempt+1}: Rate limit or server error. Retrying in {30 * (attempt + 1)} seconds...")
165
  time.sleep(30 * (attempt + 1))