Update agents/planner.py
Browse files- agents/planner.py +19 -2
agents/planner.py
CHANGED
|
@@ -5,6 +5,7 @@ def detect_intent(message: str):
|
|
| 5 |
- "slotting"
|
| 6 |
- "picking"
|
| 7 |
- "report"
|
|
|
|
| 8 |
"""
|
| 9 |
|
| 10 |
msg = message.lower().strip()
|
|
@@ -37,12 +38,28 @@ def detect_intent(message: str):
|
|
| 37 |
]
|
| 38 |
|
| 39 |
# -----------------------------
|
| 40 |
-
#
|
| 41 |
-
# (Prevents overlap confusion)
|
| 42 |
# -----------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
if any(k in msg for k in report_keywords):
|
| 44 |
return "report"
|
| 45 |
|
|
|
|
|
|
|
|
|
|
| 46 |
if any(k in msg for k in slot_keywords):
|
| 47 |
return "slotting"
|
| 48 |
|
|
|
|
| 5 |
- "slotting"
|
| 6 |
- "picking"
|
| 7 |
- "report"
|
| 8 |
+
- "forecast"
|
| 9 |
"""
|
| 10 |
|
| 11 |
msg = message.lower().strip()
|
|
|
|
| 38 |
]
|
| 39 |
|
| 40 |
# -----------------------------
|
| 41 |
+
# DEMAND FORECASTING KEYWORDS
|
|
|
|
| 42 |
# -----------------------------
|
| 43 |
+
forecast_keywords = [
|
| 44 |
+
"forecast", "predict", "demand", "future usage",
|
| 45 |
+
"consumption trend", "usage trend", "project demand",
|
| 46 |
+
"estimate usage"
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
# ---------------------------------------------------------
|
| 50 |
+
# PRIORITY ORDER:
|
| 51 |
+
# 1. Full report
|
| 52 |
+
# 2. Forecasting
|
| 53 |
+
# 3. Slotting
|
| 54 |
+
# 4. Picking
|
| 55 |
+
# ---------------------------------------------------------
|
| 56 |
+
|
| 57 |
if any(k in msg for k in report_keywords):
|
| 58 |
return "report"
|
| 59 |
|
| 60 |
+
if any(k in msg for k in forecast_keywords):
|
| 61 |
+
return "forecast"
|
| 62 |
+
|
| 63 |
if any(k in msg for k in slot_keywords):
|
| 64 |
return "slotting"
|
| 65 |
|