Kurama0303 commited on
Commit
9c44726
·
verified ·
1 Parent(s): ce24e12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
16
  # --- Basic Agent Definition ---
17
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
18
  # --- Retry Helper for Agent Call ---
19
- def safe_agent_call(agent, question, retries=5, wait_time=20):
20
  """
21
  Safely call the agent with retry on rate limit errors (HTTP 429).
22
  Retries up to `retries` times, waits `wait_time` seconds between attempts.
@@ -38,7 +38,7 @@ def safe_agent_call(agent, question, retries=5, wait_time=20):
38
  class BasicAgent:
39
  def __init__(self):
40
  self.agent = CodeAgent(
41
- model=OpenAIServerModel(model_id="gpt-4o"),
42
  tools=[
43
  DuckDuckGoSearchTool(),
44
  WikipediaSearchTool(),
 
16
  # --- Basic Agent Definition ---
17
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
18
  # --- Retry Helper for Agent Call ---
19
+ def safe_agent_call(agent, question, retries=5, wait_time=60):
20
  """
21
  Safely call the agent with retry on rate limit errors (HTTP 429).
22
  Retries up to `retries` times, waits `wait_time` seconds between attempts.
 
38
  class BasicAgent:
39
  def __init__(self):
40
  self.agent = CodeAgent(
41
+ model=OpenAIServerModel(model_id="gpt-4o-mini"),
42
  tools=[
43
  DuckDuckGoSearchTool(),
44
  WikipediaSearchTool(),