Maximize Qdrant utilization: richer memory payloads, filtered retrieval, and qdrant health in metrics API
This commit is contained in:
4
bot.py
4
bot.py
@@ -125,9 +125,11 @@ def run_cycle():
|
||||
|
||||
# learning memory + notes + orchestration signal
|
||||
qdrant_add_memory(symbol, f"{symbol} {decision['action']} conf={decision['confidence']} reason={decision['reason']}", {
|
||||
"memory_type": "execution",
|
||||
"status": drow.status,
|
||||
"action": decision["action"],
|
||||
"confidence": decision["confidence"],
|
||||
"outcome_score": 1 if ok else -1,
|
||||
"ts": datetime.utcnow().isoformat(),
|
||||
})
|
||||
trilium_log(
|
||||
@@ -145,9 +147,11 @@ def run_cycle():
|
||||
|
||||
# store non-trade decisions too for memory
|
||||
qdrant_add_memory(symbol, f"{symbol} decision={decision['action']} conf={decision['confidence']} status={drow.status}", {
|
||||
"memory_type": "decision",
|
||||
"status": drow.status,
|
||||
"action": decision["action"],
|
||||
"confidence": decision["confidence"],
|
||||
"outcome_score": 0 if drow.status in {"skipped", "risk_blocked"} else (-1 if drow.status=="failed" else 1),
|
||||
"ts": datetime.utcnow().isoformat(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user