samih-7 commited on
Commit
031af50
·
verified ·
1 Parent(s): 392f6cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,12 +8,12 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
- def custom_tool(query:str)-> str:
12
  """A tool that runs a DuckDuckGo search and returns a formatted result.
13
  Args:
14
  query: A string representing the query to search for.
15
  """
16
- return "My custom tool"
17
 
18
  @tool
19
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -52,7 +52,7 @@ with open("prompts.yaml", 'r') as stream:
52
 
53
  agent = CodeAgent(
54
  model=model,
55
- tools=[final_answer, get_current_time_in_timezone, DuckDuckGoSearchTool()], ## add your tools here (don't remove final answer)
56
  max_steps=6,
57
  verbosity_level=1,
58
  grammar=None,
 
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
+ def search_web(query:str)-> str:
12
  """A tool that runs a DuckDuckGo search and returns a formatted result.
13
  Args:
14
  query: A string representing the query to search for.
15
  """
16
+ return DuckDuckGoSearchTool(query)
17
 
18
  @tool
19
  def get_current_time_in_timezone(timezone: str) -> str:
 
52
 
53
  agent = CodeAgent(
54
  model=model,
55
+ tools=[final_answer, get_current_time_in_timezone, search_web], ## add your tools here (don't remove final answer)
56
  max_steps=6,
57
  verbosity_level=1,
58
  grammar=None,