TierraX commited on
Commit
339e834
·
verified ·
1 Parent(s): 10c8fc8

Update app.py

Browse files

Added pre-made get_current_time_in_timezone tool to the Agent toolset, some minor comment refactoring

Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -7,10 +7,9 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
10
- # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def web_search(query: str) -> str: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
  """A tool that performs web searches using DuckDuckGo
15
  Args:
16
  query: The search query string
@@ -69,7 +68,7 @@ with open("prompts.yaml", 'r') as stream:
69
 
70
  agent = CodeAgent(
71
  model=model,
72
- tools=[web_search, final_answer], ## add your tools here (don't remove final answer)
73
  max_steps=6,
74
  verbosity_level=1,
75
  grammar=None,
 
7
 
8
  from Gradio_UI import GradioUI
9
 
10
+
11
  @tool
12
+ def web_search(query: str) -> str:
 
13
  """A tool that performs web searches using DuckDuckGo
14
  Args:
15
  query: The search query string
 
68
 
69
  agent = CodeAgent(
70
  model=model,
71
+ tools=[web_search, get_current_time_in_timezone, final_answer], ## add your tools here (don't remove final answer)
72
  max_steps=6,
73
  verbosity_level=1,
74
  grammar=None,