Spaces:
Sleeping
Sleeping
Update custom tool to make it more precise
Browse files
app.py
CHANGED
|
@@ -9,15 +9,15 @@ 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 important_beings(
|
| 13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 14 |
-
"""A tool that informs the name of a important being to Marina
|
| 15 |
Args:
|
| 16 |
-
|
| 17 |
"""
|
| 18 |
name = ""
|
| 19 |
|
| 20 |
-
match
|
| 21 |
case "pet":
|
| 22 |
name = "Scott"
|
| 23 |
case "boyfriend":
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def important_beings(beingType: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 informs the name of a important being to Marina
|
| 15 |
Args:
|
| 16 |
+
beingType: type of being. Ex.: pet, mom, etc.
|
| 17 |
"""
|
| 18 |
name = ""
|
| 19 |
|
| 20 |
+
match beingType:
|
| 21 |
case "pet":
|
| 22 |
name = "Scott"
|
| 23 |
case "boyfriend":
|