sreenivas-rao commited on
Commit
31f0655
·
verified ·
1 Parent(s): da285e1

return single string

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -27,12 +27,11 @@ def get_live_cricket_matches()-> str: #it's import to specify the return type
27
  match_info = []
28
  for match in data["data"]:
29
  if "date" in match and match["date"].startswith(today):
30
- if match.get("matchType") == "t20" or match.get("matchType") == "odi":
31
- match_info.append(
32
- f"{' vs '.join(match.get('teams', []))} ({match.get('matchType')}) -- {match.get('status')} -- at {match.get('venue')}"
33
- )
34
  return "\n".join(match_info)
35
- return {"error": "Unable to fetch match data"}
36
 
37
  @tool
38
  def get_current_time_in_timezone(timezone: str) -> str:
 
27
  match_info = []
28
  for match in data["data"]:
29
  if "date" in match and match["date"].startswith(today):
30
+ match_info.append(
31
+ f"{' vs '.join(match.get('teams', []))} ({match.get('matchType')}) -- {match.get('status')} -- at {match.get('venue')}"
32
+ )
 
33
  return "\n".join(match_info)
34
+ return "No matches scheduled for today."
35
 
36
  @tool
37
  def get_current_time_in_timezone(timezone: str) -> str: