merveyvz commited on
Commit
496234a
·
verified ·
1 Parent(s): 80af909
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -14,9 +14,12 @@ from Gradio_UI import GradioUI
14
 
15
  @tool
16
  def ask_magic_8_ball(question: str) -> str:
17
- """A Magic 8 Ball tool that provides random answers to user's questions about situations.
18
  Args:
19
  question: The situation or question the user wants advice about
 
 
 
20
  """
21
  responses = [
22
  "It is certain",
@@ -46,7 +49,8 @@ def ask_magic_8_ball(question: str) -> str:
46
  return "Please provide a valid question or situation."
47
 
48
  # Return random response
49
- return choice(responses)
 
50
 
51
  @tool
52
  def get_current_time_in_timezone(timezone: str) -> str:
 
14
 
15
  @tool
16
  def ask_magic_8_ball(question: str) -> str:
17
+ """A Magic 8 Ball tool that provides direct answers from its predefined set of responses.
18
  Args:
19
  question: The situation or question the user wants advice about
20
+
21
+ Returns:
22
+ str: One of the 20 classic Magic 8 Ball responses
23
  """
24
  responses = [
25
  "It is certain",
 
49
  return "Please provide a valid question or situation."
50
 
51
  # Return random response
52
+ response = choice(responses)
53
+ return f"Magic 8 Ball says: {response}"
54
 
55
  @tool
56
  def get_current_time_in_timezone(timezone: str) -> str: