sreenivas-rao commited on
Commit
a7ce619
·
verified ·
1 Parent(s): c096a87

changed return type for live cricket match tool

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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()-> str: #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,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 json.dumps(data['data'])
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