Anesti commited on
Commit
ea55caa
·
verified ·
1 Parent(s): ad96aa7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
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.