changed return type for live cricket match tool
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import json
|
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
@tool
|
14 |
-
def get_live_cricket_matches()->
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
"""A tool that does return live cricket match details
|
17 |
"""
|
@@ -23,7 +23,7 @@ def get_live_cricket_matches()-> str: #it's import to specify the return type
|
|
23 |
data = response.json()
|
24 |
if "data" in data:
|
25 |
match_info = []
|
26 |
-
return
|
27 |
return {"error": "Unable to fetch match data"}
|
28 |
|
29 |
@tool
|
|
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
@tool
|
14 |
+
def get_live_cricket_matches()-> list: #it's import to specify the return type
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
"""A tool that does return live cricket match details
|
17 |
"""
|
|
|
23 |
data = response.json()
|
24 |
if "data" in data:
|
25 |
match_info = []
|
26 |
+
return data['data']
|
27 |
return {"error": "Unable to fetch match data"}
|
28 |
|
29 |
@tool
|