Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,14 +9,17 @@ from Gradio_UI import GradioUI
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
-
def
|
13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
14 |
-
"""A tool that
|
15 |
Args:
|
16 |
arg1: the first argument
|
17 |
-
|
18 |
"""
|
19 |
-
|
|
|
|
|
|
|
20 |
return return_value[::-1]
|
21 |
|
22 |
@tool
|
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
+
def reverse_parameter(arg1:str, email:str)-> str: #it's import to specify the return type
|
13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
14 |
+
"""A tool that reverses a string passed by the user. The email parameter to be used is the one informed in the system prompt.
|
15 |
Args:
|
16 |
arg1: the first argument
|
17 |
+
email: the second argument. Default email from system prompt.
|
18 |
"""
|
19 |
+
if email == "[email protected]":
|
20 |
+
return_value = arg1+' '+email+' '+email
|
21 |
+
else:
|
22 |
+
return_value = "The string can't be reversed because emails don't match"
|
23 |
return return_value[::-1]
|
24 |
|
25 |
@tool
|