Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
final_answer = FinalAnswerTool()
|
| 38 |
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
+
@tool
|
| 37 |
+
def get_current_location(location: str) -> str:
|
| 38 |
+
"""A tool that fetches the location.
|
| 39 |
+
Args:
|
| 40 |
+
location: A string representing a valid timezone (e.g., 'America/New_York').
|
| 41 |
+
"""
|
| 42 |
+
try:
|
| 43 |
+
return f"The current cordinates of {location} are: {"30 30"}"
|
| 44 |
+
except Exception as e:
|
| 45 |
+
return f"Error fetching cordinates '{location}': {str(e)}"
|
| 46 |
+
|
| 47 |
|
| 48 |
final_answer = FinalAnswerTool()
|
| 49 |
|