Aizdes commited on
Commit
5631719
·
1 Parent(s): 6d81401

add search_tool

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -8,6 +8,9 @@ from smolagents.default_tools import FinalAnswerTool
8
  from smolagents.gradio_ui import GradioUI
9
 
10
 
 
 
 
11
  @tool
12
  def my_custom_tool(arg1:str, arg2:int)-> str: # it's important to specify the return type
13
  # Keep this format for the tool description / args description but feel free to modify the tool
@@ -59,7 +62,7 @@ with open("prompts.yaml", 'r') as f:
59
  # We're creating our CodeAgent
60
  agent = CodeAgent(
61
  model=model,
62
- tools=[final_answer, get_current_time_in_timezone], # add your tools here (don't remove final_answer)
63
  max_steps=6,
64
  verbosity_level=1,
65
  grammar=None,
 
8
  from smolagents.gradio_ui import GradioUI
9
 
10
 
11
+ search_tool = DuckDuckGoSearchTool()
12
+
13
+
14
  @tool
15
  def my_custom_tool(arg1:str, arg2:int)-> str: # it's important to specify the return type
16
  # Keep this format for the tool description / args description but feel free to modify the tool
 
62
  # We're creating our CodeAgent
63
  agent = CodeAgent(
64
  model=model,
65
+ tools=[final_answer, get_current_time_in_timezone, search_tool], # add your tools here (don't remove final_answer)
66
  max_steps=6,
67
  verbosity_level=1,
68
  grammar=None,