Frazer2810 commited on
Commit
1294d97
·
verified ·
1 Parent(s): 735f39f

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +1 -1
agent.py CHANGED
@@ -137,7 +137,7 @@ def build_graph(provider: str = "groq"):
137
  try:
138
  return llm_with_tools.invoke(messages)
139
  except Exception as e:
140
- if ("503" in str(e) or "Service Unavailable" in str(e)) and attempt < MAX_ATTEMPTS - 1:
141
  last_err = e
142
  continue
143
  raise
 
137
  try:
138
  return llm_with_tools.invoke(messages)
139
  except Exception as e:
140
+ if ("503" in str(e) or "Service Unavailable" in str(e) or "429" in str(e)) and attempt < MAX_ATTEMPTS - 1:
141
  last_err = e
142
  continue
143
  raise