Update agents/planner.py
Browse files- agents/planner.py +11 -0
agents/planner.py
CHANGED
|
@@ -46,6 +46,14 @@ def detect_intent(message: str):
|
|
| 46 |
"estimate usage"
|
| 47 |
]
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
# ---------------------------------------------------------
|
| 50 |
# PRIORITY ORDER:
|
| 51 |
# 1. Full report
|
|
@@ -66,6 +74,9 @@ def detect_intent(message: str):
|
|
| 66 |
if any(k in msg for k in pick_keywords):
|
| 67 |
return "picking"
|
| 68 |
|
|
|
|
|
|
|
|
|
|
| 69 |
# -----------------------------
|
| 70 |
# UNKNOWN → DEFAULT TO REPORT
|
| 71 |
# -----------------------------
|
|
|
|
| 46 |
"estimate usage"
|
| 47 |
]
|
| 48 |
|
| 49 |
+
# -----------------------------
|
| 50 |
+
# REPLENISHMENT KEYWORDS
|
| 51 |
+
# -----------------------------
|
| 52 |
+
replenish_keywords = [
|
| 53 |
+
"replenish", "refill", "stock level", "stockout", "stock-out",
|
| 54 |
+
"low stock", "replenishment", "min max", "restock", "safety stock"
|
| 55 |
+
]
|
| 56 |
+
|
| 57 |
# ---------------------------------------------------------
|
| 58 |
# PRIORITY ORDER:
|
| 59 |
# 1. Full report
|
|
|
|
| 74 |
if any(k in msg for k in pick_keywords):
|
| 75 |
return "picking"
|
| 76 |
|
| 77 |
+
if any(k in msg for k in replenish_keywords):
|
| 78 |
+
return "replenishment"
|
| 79 |
+
|
| 80 |
# -----------------------------
|
| 81 |
# UNKNOWN → DEFAULT TO REPORT
|
| 82 |
# -----------------------------
|