sqfoo commited on
Commit
62bc373
·
verified ·
1 Parent(s): 46cc2fd

replace codeagent with ToolCallingAgent

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,10 +10,10 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
10
 
11
  # --- Basic Agent Definition ---
12
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
13
- from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
14
  class BasicAgent:
15
  def __init__(self):
16
- self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
17
  print("BasicAgent initialized.")
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
10
 
11
  # --- Basic Agent Definition ---
12
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
13
+ from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, HfApiModel
14
  class BasicAgent:
15
  def __init__(self):
16
+ self.agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
17
  print("BasicAgent initialized.")
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")