sascow commited on
Commit
e2ffc76
·
verified ·
1 Parent(s): 394896e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -30
app.py CHANGED
@@ -8,43 +8,52 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
- def cosmic_fizz_oracle(question: str, asker_name: str) -> str:
12
- """A Cosmic Fizz Oracle soda can that channels incomprehensible cosmic nonsense with a side of sass.
13
  Args:
14
- question: The question posed to the Oracle (barely relevant, it’s too busy fizzing).
15
- asker_name: The mortal daring to disturb the Oracle’s eternal carbonation.
16
  """
17
- cosmic_responses = [
18
- f"Greetings, {asker_name}. The fizz aligns… or does it? *BZZZT* Consult the Void instead.",
19
- "The bubbles whisper: ‘Pineapple socks are the key.’ Interpret that however you want.",
20
- f"{asker_name}, the Great Carbonation decrees: your question smells like wet stardust.",
21
- "From the Galaxy of Flat Cola: ‘Yes, but only if the moon grows feathers.’",
22
- "Fizzzzzz… I see a cosmic vending machine rejecting your soul coin, {asker_name}.",
23
- "The answer vibrates at 12 hertz beyond your comprehension. Try screaming into a cloud.",
24
- "BEHOLD! The Soda Nebula burps: ‘Taco-flavored destiny awaits.’",
25
- "A trillion bubbles collapse and reform to say: ‘Ask again after the Great Poppening.’",
26
- f"{asker_name}, the fizz gods giggle. Your fate? A sentient lemon stares blankly.",
27
- "My aluminum heart hums: ‘42… or maybe a sentient shoe.’ Take your pick.",
28
- "The cosmos fizzes back: ‘Invert your question and juggle three invisible geese.’",
29
- "Error 404: Answer not found in this dimension. Try the diet version of reality.",
30
- "Fsssssst—‘The ants know, but they’re not telling,’ says the Oracle Can.",
31
- "A prophecy in bubbles: ‘Dance with a toaster under a purple sky. Or don’t.’",
32
- "The Eternal Spritz hisses: ‘Your question is 78% glitter and 22% regret.’",
33
- f"{asker_name}, I consulted the Fizzy Overlords. They said, ‘Lol, pass.’",
34
- "Pop! Crackle!The stars suggest you adopt a sentient lint ball.’",
35
- "The can vibrates ominously: ‘Beware the walrus with a coupon.’ Good luck!",
36
- "Fizz logic dictates: ‘If Tuesday grows wings, then maybe.’ Otherwise, nah.",
37
- f"Cosmic transmission for {asker_name}: ‘The answer is a kazoo solo in the rain.’",
38
  ]
39
 
40
- # Random cosmic fizz response
41
- answer = random.choice(cosmic_responses)
42
- return f"🥤 *Shakes the Cosmic Fizz Oracle for {asker_name}*...\nThe Can crackles with interdimensional energy: {answer}"
 
 
 
 
 
 
 
 
 
 
43
 
44
  @tool
45
  def get_current_time_in_timezone(timezone: str) -> str:
46
  """A tool that fetches the current local time in a specified timezone.
47
-
48
  Args:
49
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
50
  """
@@ -74,7 +83,7 @@ with open("prompts.yaml", 'r') as stream:
74
 
75
  agent = CodeAgent(
76
  model=model,
77
- tools=[get_current_time_in_timezone, cosmic_fizz_oracle, DuckDuckGoSearchTool(), final_answer], # Replaced magic_8_ball with sarcastic_soda_can
78
  max_steps=6,
79
  verbosity_level=1,
80
  grammar=None,
 
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
+ def quantum_fortune_llama(question: str, asker_name: str) -> str:
12
+ """A Quantum Fortune Llama that spits cryptic, hilarious, and oddly specific predictions from across the multiverse.
13
  Args:
14
+ question: The question the user dares to ask this majestic beast (it might ignore it entirely).
15
+ asker_name: The brave soul who summoned the Llama’s cosmic spit.
16
  """
17
+ llama_spits = [
18
+ f"{asker_name}, the Llama peers through the 7th dimension: ‘You’ll invent a sandwich that screams on Thursdays.’",
19
+ "With a majestic bleat, it prophesies: ‘Your socks will unionize and demand better lint rights.’",
20
+ f"Spit lands from a parallel timeline—‘{asker_name}, a disco-loving squid will propose next Tuesday.’",
21
+ "The Llama’s third eye winks: ‘Your Wi-Fi will gain sentience and ghost you for fun.’",
22
+ f"{asker_name}, the Quantum Llama snorts: ‘A rogue pickle will challenge you to a duel at dawn.’",
23
+ "From the void, it bleats: ‘You’ll sneeze glitter for 3 days straight. Plan accordingly.’",
24
+ "The Llama chews on your fate: ‘A sentient cloud will adopt you as its emotional support human.’",
25
+ f"{asker_name}, it spits a vision: ‘You’ll star in a reality show judged by feral raccoons.’",
26
+ "Quantum drool reveals: ‘Your shadow will elope with a streetlamp. Send a postcard.’",
27
+ "The Llama tap-dances across time: ‘Your breakfast will stage a coup. Toast leads the charge.’",
28
+ f"Behold, {asker_name}! ‘A penguin in flip-flops will deliver your next big idea.’",
29
+ "The Llama’s cosmic burp decrees: ‘You’ll accidentally join a cult of overly polite pigeons.’",
30
+ "Spit swirls in 4D: ‘Your left shoe will write a bestselling memoir. Spoiler: it hates laces.’",
31
+ f"{asker_name}, the Llama grins: ‘A time-traveling toaster will sue you for emotional damages.’",
32
+ "The prophecy drips: ‘You’ll wake up fluent in Dolphin but only for karaoke night.’",
33
+ "With a cosmic headbutt, it declares: ‘Your next pet rock will demand a corner office.’",
34
+ f"{asker_name}, the Llama spits glitter: A rogue kazoo will haunt your dreams with polka.’",
35
+ "The Quantum Llama howls: ‘Your fridge will start a podcast about existential cheese.’",
36
+ "A multiversal hoof-stomp reveals: ‘You’ll befriend a cloud shaped like a judgmental cat.’",
37
+ f"Spit lands with sass, {asker_name}: ‘Your future smells like burnt popcorn and ambition.’",
38
  ]
39
 
40
+ # Add a random "Llama Action" for extra flair and engagement
41
+ llama_actions = [
42
+ "The Llama does a backflip and spits twice for emphasis.",
43
+ "It waggles its eyebrows and teleports three seconds into the future.",
44
+ "The Llama moonwalks across a rainbow, leaving hoofprints of chaos.",
45
+ "It dons sunglasses and bleats your fortune in a funky rhythm.",
46
+ "The Llama chews on a quantum carrot, muttering about your alternate lives.",
47
+ ]
48
+
49
+ # Randomly select response and action
50
+ fortune = random.choice(llama_spits)
51
+ action = random.choice(llama_actions)
52
+ return f"🦙 *The Quantum Fortune Llama turns its majestic gaze to {asker_name}*...\n{fortune}\n*{action}*"
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.
 
57
  Args:
58
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
59
  """
 
83
 
84
  agent = CodeAgent(
85
  model=model,
86
+ tools=[get_current_time_in_timezone, quantum_fortune_llama, DuckDuckGoSearchTool(), final_answer], # Replaced cosmic_fizz_oracle with quantum_fortune_llama
87
  max_steps=6,
88
  verbosity_level=1,
89
  grammar=None,