CoralLeiCN commited on
Commit
5f8c1ae
·
1 Parent(s): 5d9b767

still have rate limit error. Update delay function to 8 seconds and modify BasicAgent instantiation to use default model

Browse files
Files changed (2) hide show
  1. agent/agents.py +4 -4
  2. app.py +2 -1
agent/agents.py CHANGED
@@ -25,17 +25,17 @@ class final_answer(BaseModel):
25
  answer: str
26
 
27
 
28
- def delay_6_seconds(
29
  agent: CodeAgent,
30
  ) -> bool:
31
  """
32
- Delay execution for 6 seconds.
33
  """
34
- time.sleep(6)
35
  return True
36
 
37
 
38
- STEP_CALLBACKS = [delay_6_seconds]
39
 
40
 
41
  # --- Basic Agent Definition ---
 
25
  answer: str
26
 
27
 
28
+ def delay_8_seconds(
29
  agent: CodeAgent,
30
  ) -> bool:
31
  """
32
+ Delay execution for 8 seconds.
33
  """
34
+ time.sleep(8)
35
  return True
36
 
37
 
38
+ STEP_CALLBACKS = [delay_8_seconds]
39
 
40
 
41
  # --- Basic Agent Definition ---
app.py CHANGED
@@ -38,7 +38,8 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
38
 
39
  # 1. Instantiate Agent ( modify this part to create your agent)
40
  try:
41
- code_agent = BasicAgent(model="gemini-2.0-flash")
 
42
  except Exception as e:
43
  print(f"Error instantiating agent: {e}")
44
  return f"Error initializing agent: {e}", None
 
38
 
39
  # 1. Instantiate Agent ( modify this part to create your agent)
40
  try:
41
+ # code_agent = BasicAgent(model="gemini-2.0-flash")
42
+ code_agent = BasicAgent()
43
  except Exception as e:
44
  print(f"Error instantiating agent: {e}")
45
  return f"Error initializing agent: {e}", None