return single string
Browse files
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 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
)
|
| 34 |
return "\n".join(match_info)
|
| 35 |
-
return
|
| 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:
|