adding ecommerce to .env.example and some error handling in track_package

This commit is contained in:
Joshua Smith
2025-04-13 17:03:50 -04:00
parent 4e0ff0e535
commit dddd2977b9
2 changed files with 3 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ AGENT_GOAL=goal_choose_agent_type # for multi-goal start
#Choose which category(ies) of goals you want to be listed by the Agent Goal picker if enabled above
# - options are system (always included), hr, travel, or all.
GOAL_CATEGORIES=hr,travel-flights,travel-trains,fin # default is all
GOAL_CATEGORIES=hr,travel-flights,travel-trains,fin,ecommerce # default is all
#GOAL_CATEGORIES=travel-flights
# Set if the workflow should wait for the user to click a confirm button (and if the UI should show the confirm button and tool args)

View File

@@ -92,7 +92,8 @@ def track_package(args: dict) -> dict:
carrier = json_data["Carrier"]
status_summary = json_data["StatusSummary"]
tracking_details = json_data.get("TrackingDetails", [])
if tracking_details is not None and tracking_details[0] is not None:
last_tracking_update = ""
if tracking_details and tracking_details is not None and tracking_details[0] is not None:
last_tracking_update = tracking_details[0]["EventDateTimeInDateTimeFormat"]
tracking_link = ""
if carrier == "USPS":