Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,18 @@ 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 |
-
try:
|
| 20 |
-
return f"The first argument is {arg1} and the second is {arg2}."
|
| 21 |
-
except Exception as e:
|
| 22 |
-
return f"Error fetching values '{arg1}' '{arg2}': {str(e)}"
|
| 23 |
-
|
| 24 |
-
|
| 25 |
return "What magic will you build ?"
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
|
|
|
| 16 |
arg1: the first argument
|
| 17 |
arg2: the second argument
|
| 18 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
+
@tool
|
| 22 |
+
def random_tool(arg1:str)-> str: #it's import to specify the return type
|
| 23 |
+
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 24 |
+
"""A tool that does nothing yet
|
| 25 |
+
Args:
|
| 26 |
+
arg1: the first argument
|
| 27 |
+
arg2: the second argument
|
| 28 |
+
"""
|
| 29 |
+
return f"What magic will you build {arg1} ?"
|
| 30 |
+
|
| 31 |
@tool
|
| 32 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 33 |
"""A tool that fetches the current local time in a specified timezone.
|