dianamclean commited on
Commit
de4dcbd
·
verified ·
1 Parent(s): cd9ec4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -33,14 +33,21 @@ def get_current_time_in_timezone(timezone: str) -> str:
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
- def my_ai_joke(arg1:str)-> str: #it's import to specify the return type
37
- #Keep this format for the description / args / args description but feel free to modify the tool
38
  """A tool that tells an AI joke about agents and humans working together
39
  Args:
40
- arg1: the first argument
41
- arg2:
42
  """
43
- return "What magic will you build ?"
 
 
 
 
 
 
 
 
44
 
45
 
46
  final_answer = FinalAnswerTool()
 
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
+ def my_ai_joke(arg1: str) -> str: # it's import to specify the return type
37
+ # Keep this format for the description / args / args description but feel free to modify the tool
38
  """A tool that tells an AI joke about agents and humans working together
39
  Args:
40
+ arg1: A string representing the setup for the joke. For example, "Why did the AI cross the road?"
 
41
  """
42
+
43
+ if not arg1:
44
+ return "Why did the AI cross the road? ... To get to the other dataset!"
45
+ elif "why did the ai" in arg1.lower():
46
+ return f"{arg1}... Because it had a better algorithm to get there!"
47
+ elif "human" in arg1.lower() and "ai" in arg1.lower():
48
+ return f"{arg1} ... They make a great team: the human brings the creativity and the AI brings the execution... and sometimes a random error message!"
49
+ else:
50
+ return "Why did the AI refuse to work with the human? ... It said they had too many 'bugs' in their thinking!"
51
 
52
 
53
  final_answer = FinalAnswerTool()