Update app.py
Browse files
app.py
CHANGED
|
@@ -39,6 +39,18 @@ def random_fact() -> str:
|
|
| 39 |
]
|
| 40 |
return random.choice(facts)
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
@tool
|
| 43 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 44 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 39 |
]
|
| 40 |
return random.choice(facts)
|
| 41 |
|
| 42 |
+
|
| 43 |
+
@tool
|
| 44 |
+
def tell_joke()-> str:
|
| 45 |
+
"""Returns a random joke."""
|
| 46 |
+
jokes = [
|
| 47 |
+
"Why don't skeletons fight each other? They don't have the guts.",
|
| 48 |
+
"I told my wife she was drawing her eyebrows too high. She looked surprised.",
|
| 49 |
+
"Why don’t scientists trust atoms? Because they make up everything!"
|
| 50 |
+
]
|
| 51 |
+
return random.choice(jokes)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
@tool
|
| 55 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 56 |
"""A tool that fetches the current local time in a specified timezone.
|