Spaces:
Sleeping
Sleeping
tool: calculate sum of numbers
Browse files
app.py
CHANGED
|
@@ -33,6 +33,14 @@ 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 calculate_sum_of_numbers(numbers: list) -> int:
|
| 38 |
+
"""A tool that calculates the sum of a list of numbers.
|
| 39 |
+
Args:
|
| 40 |
+
numbers: A list of numbers to sum.
|
| 41 |
+
"""
|
| 42 |
+
return sum(numbers)
|
| 43 |
+
|
| 44 |
|
| 45 |
final_answer = FinalAnswerTool()
|
| 46 |
|