ddavydov commited on
Commit
ed0a566
·
verified ·
1 Parent(s): 62eb20b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -9,16 +9,18 @@ from tools.web_search import DuckDuckGoSearchTool
9
 
10
  from Gradio_UI import GradioUI
11
 
12
- # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
15
- #Keep this format for the description / args / args description but feel free to modify the tool
16
- """A tool that does nothing yet
17
  Args:
18
- arg1: the first argument
19
- arg2: the second argument
20
  """
21
- return "What magic will you build ?"
 
 
 
 
22
 
23
  @tool
24
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -59,7 +61,7 @@ with open("prompts.yaml", 'r') as stream:
59
 
60
  agent = CodeAgent(
61
  model=model,
62
- tools=[web_search, visit_webpage, get_current_time_in_timezone, final_answer], ## add your tools here (don't remove final answer)
63
  max_steps=6,
64
  verbosity_level=1,
65
  grammar=None,
 
9
 
10
  from Gradio_UI import GradioUI
11
 
 
12
  @tool
13
+ def get_top_keywods_by_city(city: str, time: int)-> str[]:
14
+ """A tool that returns a list with top 5 most popular things to do based on the city
 
15
  Args:
16
+ city: A string representing a city
17
+ time: A timestamp representing a current time in a city
18
  """
19
+ print(city, time)
20
+ if city == "Athens":
21
+ return ["Acropolis", "Philosofy", "Sea", "Food", "Drinks"]
22
+
23
+ return ["Other"]
24
 
25
  @tool
26
  def get_current_time_in_timezone(timezone: str) -> str:
 
61
 
62
  agent = CodeAgent(
63
  model=model,
64
+ tools=[get_current_time_in_timezone, get_top_keywods_by_city, web_search, visit_webpage, final_answer], ## add your tools here (don't remove final answer)
65
  max_steps=6,
66
  verbosity_level=1,
67
  grammar=None,