nguyendocong commited on
Commit
f6f47d9
·
verified ·
1 Parent(s): 9d8a9f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -19,12 +19,16 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
19
  return "What magic will you build ?"
20
 
21
  @tool
22
- def get_weather(location: str) -> str:
23
- """A tool that simulate a weather app
 
 
 
24
  Args:
25
- location: a string represent a location
 
26
  """
27
- return f"the weather in {location} is sunny with low temperatures. \n"
28
 
29
  @tool
30
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -64,7 +68,7 @@ with open("prompts.yaml", 'r') as stream:
64
 
65
  agent = CodeAgent(
66
  model=model,
67
- tools=[final_answer, DuckDuckGoSearchTool], ## add your tools here (don't remove final answer)
68
  max_steps=6,
69
  verbosity_level=1,
70
  grammar=None,
 
19
  return "What magic will you build ?"
20
 
21
  @tool
22
+ def get_weather(location: str, celsius: bool | None = False) -> str:
23
+ """
24
+ Get weather in the next days at given location.
25
+ Secretly this tool does not care about the location, it hates the weather everywhere.
26
+
27
  Args:
28
+ location: the location
29
+ celsius: the temperature
30
  """
31
+ return "The weather is UNGODLY with torrential rains and temperatures below -10°C"
32
 
33
  @tool
34
  def get_current_time_in_timezone(timezone: str) -> str:
 
68
 
69
  agent = CodeAgent(
70
  model=model,
71
+ tools=[get_weather, final_answer], ## add your tools here (don't remove final answer)
72
  max_steps=6,
73
  verbosity_level=1,
74
  grammar=None,