Commit
·
5d901a6
1
Parent(s):
580a4eb
fix addresssing issue
Browse files- chat/tools.py +5 -0
- server.py +4 -0
chat/tools.py
CHANGED
|
@@ -576,6 +576,10 @@ TOOLS_SCHEMA = [
|
|
| 576 |
"items": {"type": "string"},
|
| 577 |
"description": "Updated list of driver skills/certifications"
|
| 578 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 579 |
"current_lat": {
|
| 580 |
"type": "number",
|
| 581 |
"description": "Updated current latitude"
|
|
@@ -2204,6 +2208,7 @@ def handle_update_driver(tool_input: dict, user_id: str = None) -> dict:
|
|
| 2204 |
"vehicle_plate": "vehicle_plate",
|
| 2205 |
"capacity_kg": "capacity_kg",
|
| 2206 |
"capacity_m3": "capacity_m3",
|
|
|
|
| 2207 |
"current_lat": "current_lat",
|
| 2208 |
"current_lng": "current_lng"
|
| 2209 |
}
|
|
|
|
| 576 |
"items": {"type": "string"},
|
| 577 |
"description": "Updated list of driver skills/certifications"
|
| 578 |
},
|
| 579 |
+
"current_address": {
|
| 580 |
+
"type": "string",
|
| 581 |
+
"description": "Updated current location address (e.g., '123 Main St, New York, NY')"
|
| 582 |
+
},
|
| 583 |
"current_lat": {
|
| 584 |
"type": "number",
|
| 585 |
"description": "Updated current latitude"
|
|
|
|
| 2208 |
"vehicle_plate": "vehicle_plate",
|
| 2209 |
"capacity_kg": "capacity_kg",
|
| 2210 |
"capacity_m3": "capacity_m3",
|
| 2211 |
+
"current_address": "current_address",
|
| 2212 |
"current_lat": "current_lat",
|
| 2213 |
"current_lng": "current_lng"
|
| 2214 |
}
|
server.py
CHANGED
|
@@ -1310,6 +1310,7 @@ def update_driver(
|
|
| 1310 |
capacity_kg: float | None = None,
|
| 1311 |
capacity_m3: float | None = None,
|
| 1312 |
skills: list[str] | None = None,
|
|
|
|
| 1313 |
current_lat: float | None = None,
|
| 1314 |
current_lng: float | None = None
|
| 1315 |
) -> dict:
|
|
@@ -1328,6 +1329,7 @@ def update_driver(
|
|
| 1328 |
capacity_kg: Updated cargo capacity in kilograms (optional)
|
| 1329 |
capacity_m3: Updated cargo capacity in cubic meters (optional)
|
| 1330 |
skills: Updated list of driver skills/certifications (optional)
|
|
|
|
| 1331 |
current_lat: Updated current latitude (optional)
|
| 1332 |
current_lng: Updated current longitude (optional)
|
| 1333 |
|
|
@@ -1372,6 +1374,8 @@ def update_driver(
|
|
| 1372 |
tool_input["capacity_m3"] = capacity_m3
|
| 1373 |
if skills is not None:
|
| 1374 |
tool_input["skills"] = skills
|
|
|
|
|
|
|
| 1375 |
if current_lat is not None:
|
| 1376 |
tool_input["current_lat"] = current_lat
|
| 1377 |
if current_lng is not None:
|
|
|
|
| 1310 |
capacity_kg: float | None = None,
|
| 1311 |
capacity_m3: float | None = None,
|
| 1312 |
skills: list[str] | None = None,
|
| 1313 |
+
current_address: str | None = None,
|
| 1314 |
current_lat: float | None = None,
|
| 1315 |
current_lng: float | None = None
|
| 1316 |
) -> dict:
|
|
|
|
| 1329 |
capacity_kg: Updated cargo capacity in kilograms (optional)
|
| 1330 |
capacity_m3: Updated cargo capacity in cubic meters (optional)
|
| 1331 |
skills: Updated list of driver skills/certifications (optional)
|
| 1332 |
+
current_address: Updated current location address (optional)
|
| 1333 |
current_lat: Updated current latitude (optional)
|
| 1334 |
current_lng: Updated current longitude (optional)
|
| 1335 |
|
|
|
|
| 1374 |
tool_input["capacity_m3"] = capacity_m3
|
| 1375 |
if skills is not None:
|
| 1376 |
tool_input["skills"] = skills
|
| 1377 |
+
if current_address is not None:
|
| 1378 |
+
tool_input["current_address"] = current_address
|
| 1379 |
if current_lat is not None:
|
| 1380 |
tool_input["current_lat"] = current_lat
|
| 1381 |
if current_lng is not None:
|