Spaces:
Sleeping
Sleeping
Change output_type from "dict" to "any" in multiple tools for improved flexibility
Browse files
tools/get_monthly_stats_tool.py
CHANGED
|
@@ -10,7 +10,7 @@ class GetMonthlyStatsTool(Tool):
|
|
| 10 |
'month': {'type': 'integer', 'description': 'Month number (1-12). If not provided, current month is used.'},
|
| 11 |
'year': {'type': 'integer', 'description': 'Year (e.g., 2023). If not provided, current year is used.'}
|
| 12 |
}
|
| 13 |
-
output_type = "
|
| 14 |
|
| 15 |
def __init__(self, db_path="car_sharing.db"):
|
| 16 |
self.db = CarSharingDB(db_path)
|
|
|
|
| 10 |
'month': {'type': 'integer', 'description': 'Month number (1-12). If not provided, current month is used.'},
|
| 11 |
'year': {'type': 'integer', 'description': 'Year (e.g., 2023). If not provided, current year is used.'}
|
| 12 |
}
|
| 13 |
+
output_type = "any"
|
| 14 |
|
| 15 |
def __init__(self, db_path="car_sharing.db"):
|
| 16 |
self.db = CarSharingDB(db_path)
|
tools/parse_km_reading_tool.py
CHANGED
|
@@ -8,7 +8,7 @@ class ParseKmReadingTool(Tool):
|
|
| 8 |
inputs = {
|
| 9 |
'input_text': {'type': 'string', 'description': 'Text input from the user that may contain kilometer readings'}
|
| 10 |
}
|
| 11 |
-
output_type = "
|
| 12 |
|
| 13 |
def __init__(self):
|
| 14 |
self.is_initialized = True
|
|
|
|
| 8 |
inputs = {
|
| 9 |
'input_text': {'type': 'string', 'description': 'Text input from the user that may contain kilometer readings'}
|
| 10 |
}
|
| 11 |
+
output_type = "any"
|
| 12 |
|
| 13 |
def __init__(self):
|
| 14 |
self.is_initialized = True
|
tools/record_trip_tool.py
CHANGED
|
@@ -10,7 +10,7 @@ class RecordTripTool(Tool):
|
|
| 10 |
'start_km': {'type': 'integer', 'description': 'Starting kilometer reading of the vehicle'},
|
| 11 |
'end_km': {'type': 'integer', 'description': 'Ending kilometer reading of the vehicle'}
|
| 12 |
}
|
| 13 |
-
output_type = "
|
| 14 |
|
| 15 |
def __init__(self, db_path="car_sharing.db"):
|
| 16 |
self.db = CarSharingDB(db_path)
|
|
|
|
| 10 |
'start_km': {'type': 'integer', 'description': 'Starting kilometer reading of the vehicle'},
|
| 11 |
'end_km': {'type': 'integer', 'description': 'Ending kilometer reading of the vehicle'}
|
| 12 |
}
|
| 13 |
+
output_type = "any"
|
| 14 |
|
| 15 |
def __init__(self, db_path="car_sharing.db"):
|
| 16 |
self.db = CarSharingDB(db_path)
|
tools/user_management_tool.py
CHANGED
|
@@ -11,7 +11,7 @@ class UserManagementTool(Tool):
|
|
| 11 |
'user_name': {'type': 'string', 'description': 'Name of the user'},
|
| 12 |
'user_info': {'type': 'any', 'description': 'User information to store (for set action)'}
|
| 13 |
}
|
| 14 |
-
output_type = "
|
| 15 |
|
| 16 |
def __init__(self, users_file="car_sharing_users.json"):
|
| 17 |
self.is_initialized = True
|
|
|
|
| 11 |
'user_name': {'type': 'string', 'description': 'Name of the user'},
|
| 12 |
'user_info': {'type': 'any', 'description': 'User information to store (for set action)'}
|
| 13 |
}
|
| 14 |
+
output_type = "any"
|
| 15 |
|
| 16 |
def __init__(self, users_file="car_sharing_users.json"):
|
| 17 |
self.is_initialized = True
|