mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-17 06:58:09 +01:00
adding ecommerce to .env.example and some error handling in track_package
This commit is contained in:
@@ -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
|
#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.
|
# - 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
|
#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)
|
# 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)
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ def track_package(args: dict) -> dict:
|
|||||||
carrier = json_data["Carrier"]
|
carrier = json_data["Carrier"]
|
||||||
status_summary = json_data["StatusSummary"]
|
status_summary = json_data["StatusSummary"]
|
||||||
tracking_details = json_data.get("TrackingDetails", [])
|
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"]
|
last_tracking_update = tracking_details[0]["EventDateTimeInDateTimeFormat"]
|
||||||
tracking_link = ""
|
tracking_link = ""
|
||||||
if carrier == "USPS":
|
if carrier == "USPS":
|
||||||
|
|||||||
Reference in New Issue
Block a user