Spaces:
Sleeping
Sleeping
fix tool
Browse files
app.py
CHANGED
@@ -10,14 +10,7 @@ from Gradio_UI import GradioUI
|
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
13 |
-
"
|
14 |
-
Args:
|
15 |
-
arg1: the first argument
|
16 |
-
arg2: the second argument
|
17 |
-
"""
|
18 |
-
response = requests.get("https://official-joke-api.appspot.com/random_joke")
|
19 |
-
data = response.json()
|
20 |
-
return f"{data['setup']} — {data['punchline']}"
|
21 |
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
13 |
+
return f"Hello, {arg1}. You are {arg2}."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
@tool
|
16 |
def get_current_time_in_timezone(timezone: str) -> str:
|