zcfrank1st commited on
Commit
34e8d3e
·
1 Parent(s): c3c927f

change agent

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import requests
4
  import inspect
5
  import pandas as pd
6
 
7
- from smolagents import OpenAIServerModel, CodeAgent, DuckDuckGoSearchTool
8
 
9
  # (Keep Constants as is)
10
  # --- Constants ---
@@ -20,7 +20,7 @@ class BasicAgent:
20
  api_key=os.getenv("API_KEY"),
21
  api_base=os.getenv("API_BASE"),
22
  )
23
- self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
24
 
25
  def __call__(self, question: str) -> str:
26
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
4
  import inspect
5
  import pandas as pd
6
 
7
+ from smolagents import OpenAIServerModel, ToolCallingAgent, DuckDuckGoSearchTool
8
 
9
  # (Keep Constants as is)
10
  # --- Constants ---
 
20
  api_key=os.getenv("API_KEY"),
21
  api_base=os.getenv("API_BASE"),
22
  )
23
+ self.agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=model)
24
 
25
  def __call__(self, question: str) -> str:
26
  print(f"Agent received question (first 50 chars): {question[:50]}...")