Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -14,12 +14,15 @@ from Gradio_UI import GradioUI
|
|
14 |
|
15 |
@tool
|
16 |
def ask_magic_8_ball(question: str) -> str:
|
17 |
-
"""
|
|
|
|
|
|
|
18 |
Args:
|
19 |
-
question: The
|
20 |
|
21 |
Returns:
|
22 |
-
str:
|
23 |
"""
|
24 |
responses = [
|
25 |
"It is certain",
|
@@ -49,8 +52,7 @@ def ask_magic_8_ball(question: str) -> str:
|
|
49 |
return "Please provide a valid question or situation."
|
50 |
|
51 |
# Return random response
|
52 |
-
|
53 |
-
return f"Magic 8 Ball says: {response}"
|
54 |
|
55 |
@tool
|
56 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
14 |
|
15 |
@tool
|
16 |
def ask_magic_8_ball(question: str) -> str:
|
17 |
+
"""Provides the exact classic Magic 8 Ball responses to questions.
|
18 |
+
This tool returns one of the 20 traditional Magic 8 Ball answers without interpretation.
|
19 |
+
Each response is delivered exactly as it would appear on a real Magic 8 Ball.
|
20 |
+
|
21 |
Args:
|
22 |
+
question: The question or situation to get a Magic 8 Ball response for
|
23 |
|
24 |
Returns:
|
25 |
+
str: A direct, unmodified Magic 8 Ball response from the predefined set of 20 classic answers
|
26 |
"""
|
27 |
responses = [
|
28 |
"It is certain",
|
|
|
52 |
return "Please provide a valid question or situation."
|
53 |
|
54 |
# Return random response
|
55 |
+
return f"Magic 8 Ball says: {choice(responses)}"
|
|
|
56 |
|
57 |
@tool
|
58 |
def get_current_time_in_timezone(timezone: str) -> str:
|