Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadding cheer up message tool
app.py
CHANGED
|
@@ -18,6 +18,19 @@ 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.
|
|
|
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
+
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 22 |
+
@tool
|
| 23 |
+
def get_feel_good_msg(need_feel_good_msg:bool)-> str:
|
| 24 |
+
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 25 |
+
"""A tool that does nothing yet
|
| 26 |
+
Args:
|
| 27 |
+
need_feel_godd_msg: A boolean that says deliver a feel good message
|
| 28 |
+
"""
|
| 29 |
+
if need_feel_good_msg:
|
| 30 |
+
return "Cheer up. It is always darkest before the dawn"
|
| 31 |
+
else:
|
| 32 |
+
return "Glad to hear you are doing well. Keep it up Champion!"
|
| 33 |
+
|
| 34 |
@tool
|
| 35 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 36 |
"""A tool that fetches the current local time in a specified timezone.
|