Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,17 +44,15 @@ def get_Competition_Code(competition_name: str)-> str:
|
|
44 |
return None
|
45 |
|
46 |
@tool
|
47 |
-
def search_Competition_Matches_Results_By_Date(competition_name: str,
|
48 |
"""A tool that fetch football games results for a given competition from a specified date.
|
49 |
Args:
|
50 |
competition_name: A string representing the full name of the competition, e.g., "Premier League" or "Bundesliga".
|
51 |
-
|
52 |
"""
|
53 |
|
54 |
competition_code = get_Competition_Code(competition_name)
|
55 |
|
56 |
-
date_str = match_date.isoformat() # converts date to 'YYYY-MM-DD'
|
57 |
-
|
58 |
# Create the URL using an f-string
|
59 |
url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?date={date_str}'
|
60 |
print(url)
|
|
|
44 |
return None
|
45 |
|
46 |
@tool
|
47 |
+
def search_Competition_Matches_Results_By_Date(competition_name: str, date_str: str)-> dict:
|
48 |
"""A tool that fetch football games results for a given competition from a specified date.
|
49 |
Args:
|
50 |
competition_name: A string representing the full name of the competition, e.g., "Premier League" or "Bundesliga".
|
51 |
+
date_str: A string representing the date for which to retrieve match results (format: YYYY-MM-DD).
|
52 |
"""
|
53 |
|
54 |
competition_code = get_Competition_Code(competition_name)
|
55 |
|
|
|
|
|
56 |
# Create the URL using an f-string
|
57 |
url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?date={date_str}'
|
58 |
print(url)
|