BCopeland64 commited on
Commit
ed22e6d
·
verified ·
1 Parent(s): 345269d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -7,16 +7,14 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
10
- def get_ai_agent_info() -> str:
11
  """A tool that searches the net for information about becoming an AI agent.
12
  Args:
13
- None
14
  """
15
  search_query = "becoming an AI agent"
16
- url = f"https://api.duckduckgo.com/?q={search_query}&format=json"
17
- response = requests.get(url)
18
- data = response.json()
19
- return data["RelatedTopics"][0]["Text"]
20
 
21
  def get_ai_agent_roadmap() -> str:
22
  """A tool that provides a roadmap for becoming an AI agent.
 
7
 
8
  from Gradio_UI import GradioUI
9
 
10
+ def get_ai_agent_info(tool: DuckDuckGoSearchTool) -> str:
11
  """A tool that searches the net for information about becoming an AI agent.
12
  Args:
13
+ tool: The DuckDuckGoSearchTool
14
  """
15
  search_query = "becoming an AI agent"
16
+ result = tool.search(search_query)
17
+ return result
 
 
18
 
19
  def get_ai_agent_roadmap() -> str:
20
  """A tool that provides a roadmap for becoming an AI agent.