Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,14 +36,19 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 36 |
|
| 37 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 38 |
@tool
|
| 39 |
-
def
|
| 40 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 41 |
-
"""A tool that
|
| 42 |
Args:
|
| 43 |
-
|
| 44 |
-
arg2: the second argument
|
| 45 |
"""
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
final_answer = FinalAnswerTool()
|
|
|
|
| 36 |
|
| 37 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 38 |
@tool
|
| 39 |
+
def get_restaurant_suggestion(food_type:str)-> str: #it's import to specify the return type
|
| 40 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 41 |
+
"""A tool that provides with a restaurant suggestion based on a food type
|
| 42 |
Args:
|
| 43 |
+
food_type: A string representing a valid food type e.g. italian
|
|
|
|
| 44 |
"""
|
| 45 |
+
restaurant = "The Default Restaurant"
|
| 46 |
+
if food_type=="italian":
|
| 47 |
+
restaurant = "Mario y Luigi"
|
| 48 |
+
if food_type=="asian":
|
| 49 |
+
restaurant = "The Great Wall"
|
| 50 |
+
|
| 51 |
+
return f"The restaurant suggestion for {food_type} is {restaurant}"
|
| 52 |
|
| 53 |
|
| 54 |
final_answer = FinalAnswerTool()
|