Manan commited on
Commit
567bec5
·
verified ·
1 Parent(s): 1747d8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -20,7 +20,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
20
  """
21
  return "Return some cool stuff!!"
22
 
23
- @tool
24
  def get_random_city() -> str:
25
  """
26
  Promot Pick and let AI agent do magic!
@@ -37,9 +37,11 @@ def get_city_fact(city: str) -> str:
37
  city: Name of the city
38
  """
39
  try:
 
 
40
  search_tool = DuckDuckGoSearchTool(max_results=10)
41
  results = search_tool.forward(
42
- f"""Get facts about a city {city}"""
43
  )
44
 
45
  if results:
@@ -90,7 +92,7 @@ with open("prompts.yaml", 'r') as stream:
90
 
91
  agent = CodeAgent(
92
  model=model,
93
- tools=[final_answer, get_random_city, get_city_fact, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
94
  max_steps=6,
95
  verbosity_level=1,
96
  grammar=None,
 
20
  """
21
  return "Return some cool stuff!!"
22
 
23
+
24
  def get_random_city() -> str:
25
  """
26
  Promot Pick and let AI agent do magic!
 
37
  city: Name of the city
38
  """
39
  try:
40
+ get_random_city()
41
+
42
  search_tool = DuckDuckGoSearchTool(max_results=10)
43
  results = search_tool.forward(
44
+ f"""Get facts about a {city}"""
45
  )
46
 
47
  if results:
 
92
 
93
  agent = CodeAgent(
94
  model=model,
95
+ tools=[final_answer, get_city_fact, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
96
  max_steps=6,
97
  verbosity_level=1,
98
  grammar=None,