Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
60 |
-
|
|
|
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,
|