jeyasee commited on
Commit
2bbb7ee
·
verified ·
1 Parent(s): b0747d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -1
app.py CHANGED
@@ -18,6 +18,44 @@ 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.
@@ -55,7 +93,7 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[get_current_time_in_timezone,final_answer], ## add your tools here (don't remove final answer)
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
 
18
  """
19
  return "What magic will you build ?"
20
 
21
+ def ai_fortune_teller(category: str) -> str:
22
+ """Predicts the future with extreme sarcasm and humor.
23
+
24
+ Args:
25
+ category: The category to predict ('career', 'love', 'finance').
26
+
27
+ Returns:
28
+ str: A sarcastic and funny prediction.
29
+ """
30
+ fortunes = {
31
+ 'career': [
32
+ "Your dream job? Oh, you mean winning the lottery and never working again? Keep dreaming. 😂",
33
+ "You're destined for greatness... if scrolling social media for 5 hours a day counts as a skill.",
34
+ "One day, you will lead a company. That company may just be your own failed startup, but hey, leadership is leadership. 👏",
35
+ "Your boss will finally appreciate you! Just kidding. They’ll steal your ideas and take all the credit. Classic. 🤡",
36
+ "A new job opportunity is coming your way. Too bad it requires 15 years of experience for an entry-level position. 🤦‍♂️"
37
+ ],
38
+ 'love': [
39
+ "What is love? I was hoping you’d tell me. Go ask your mom, she might know. 😂",
40
+ "You will meet the love of your life... and they will promptly ghost you after three messages. 💔",
41
+ "A grand romantic gesture is in your future! Unfortunately, it’s from someone you find incredibly annoying. 🤷",
42
+ "Your soulmate is out there... probably swiping left on your profile as we speak. 😬",
43
+ "True love is coming. It might just be your delivery guy, but hey, a connection is a connection. 🚀"
44
+ ],
45
+ 'finance': [
46
+ "Your financial future is bright! Unless, of course, you continue buying overpriced coffee every day. ☕💸",
47
+ "You will soon receive a large sum of money. Oh wait, I misread. You will soon receive a large sum of bills. Oops. 🤡",
48
+ "Invest in crypto! Or don’t. Either way, you’ll still be confused about how it actually works. 🧐",
49
+ "You are about to make a life-changing financial decision... by finally unsubscribing from that gym membership you never use. 👏",
50
+ "A golden financial opportunity is coming. Unfortunately, it’s an MLM pitch from your cousin. 🚩"
51
+ ]
52
+ }
53
+
54
+ if category in fortunes:
55
+ return random.choice(fortunes[category])
56
+ else:
57
+ return "Oh, you want a special prediction? Sure. I predict you’ll ignore this advice and continue making questionable life choices. 😂"
58
+
59
  @tool
60
  def get_current_time_in_timezone(timezone: str) -> str:
61
  """A tool that fetches the current local time in a specified timezone.
 
93
 
94
  agent = CodeAgent(
95
  model=model,
96
+ tools=[ai_fortune_teller,get_current_time_in_timezone,final_answer], ## add your tools here (don't remove final answer)
97
  max_steps=6,
98
  verbosity_level=1,
99
  grammar=None,