Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -16,8 +16,14 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
16
  arg1: the first argument
17
  arg2: the second argument
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.
 
16
  arg1: the first argument
17
  arg2: the second argument
18
  """
19
+ if arg1 == "square":
20
+ return f"The square of {arg2} is {arg2 ** 2}"
21
+ elif arg1 == "double":
22
+ return f"The double of {arg2} is {arg2 * 2}"
23
+ elif arg1 == "triple":
24
+ return f"The triple of {arg2} is {arg2 * 3}"
25
+ else:
26
+ return "Unknown operation. Try 'square', 'double', or 'triple'."
27
  @tool
28
  def get_current_time_in_timezone(timezone: str) -> str:
29
  """A tool that fetches the current local time in a specified timezone.