ddeng1990 commited on
Commit
f9887e3
·
verified ·
1 Parent(s): 64b19fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -18,6 +18,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
18
  """
19
  return "What magic will you build ?"
20
 
 
 
 
 
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
23
  """A tool that fetches the current local time in a specified timezone.
@@ -56,8 +61,9 @@ with open("prompts.yaml", 'r') as stream:
56
  agent = CodeAgent(
57
  model=model,
58
  tools=[final_answer,
59
- get_current_time_in_timezone,
60
- image_generation_tool], ## add your tools here (don't remove final answer)
 
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
18
  """
19
  return "What magic will you build ?"
20
 
21
+ @tool
22
+ def calculate_square_root(number: float) -> float:
23
+ """Calculates the square root of a given number."""
24
+ return math.sqrt(number)
25
+
26
  @tool
27
  def get_current_time_in_timezone(timezone: str) -> str:
28
  """A tool that fetches the current local time in a specified timezone.
 
61
  agent = CodeAgent(
62
  model=model,
63
  tools=[final_answer,
64
+ get_current_time_in_timezone,
65
+ image_generation_tool,
66
+ calculate_square_root], ## add your tools here (don't remove final answer)
67
  max_steps=6,
68
  verbosity_level=1,
69
  grammar=None,