mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-15 11:18:42 +02:00
fix(ai): improved seasonality detection in batch by sending detailed month-by-month history
This commit is contained in:
1 parent
4f7701fa14
commit
fe8d0f1b32
2 files changed
+6
-4
No files matched your search
@@ -55,8 +55,10 @@ export function BulkAiAnalyzer() {
|
||||
ventes: r.totalQuantite || 0,
|
||||
marge: r.totalMarge ? parseFloat(((r.totalMarge / (r.totalCa || 1)) * 100).toFixed(1)) : 0,
|
||||
gammeInit: r.codeGammeInit || "N/A",
|
||||
// Simplified history: last 12 values joined (e.g., "5,0,10...")
|
||||
historique: Object.values(r.sales12m || {}).join(","),
|
||||
// Detailed history: "YYYYMM: Qty, YYYYMM: Qty..." to help AI see seasonality
|
||||
historique: Object.entries(r.sales12m || {})
|
||||
.map(([month, qty]) => `${month}:${qty}`)
|
||||
.join(", "),
|
||||
// Contextual nomenclature
|
||||
nomenclature: `${r.libelleNiveau1 || ""} > ${r.libelleNiveau2 || ""} > ${r.libelle3 || ""}`
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user