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

update core model with gpt-4o

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,10 +10,11 @@ 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 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]}...")
 
10
 
11
  # --- Basic Agent Definition ---
12
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
13
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, OpenAIServerModel
14
  class BasicAgent:
15
  def __init__(self):
16
+ model = OpenAIServerModel(model_id="gpt-4o")
17
+ self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
18
  print("BasicAgent initialized.")
19
  def __call__(self, question: str) -> str:
20
  print(f"Agent received question (first 50 chars): {question[:50]}...")