Commit ·
3b465fc
1
Parent(s): b95a3c1
fix((extra..)
Browse files- app/agents/orchestrator.py +11 -2
- app/utils/guvi_handler.py +0 -1
app/agents/orchestrator.py
CHANGED
|
@@ -221,8 +221,17 @@ class HoneypotOrchestrator:
|
|
| 221 |
self.logger.info("FASTEST-PATH: Turn 0 High Confidence Regex. Skipping ALL LLMs.", session_id=conv_id)
|
| 222 |
is_fast_path = True
|
| 223 |
detection = heuristic_detection
|
| 224 |
-
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
# Set Defaults for Fast Path
|
| 228 |
# MUST be a dict for persona_engine compatibility
|
|
|
|
| 221 |
self.logger.info("FASTEST-PATH: Turn 0 High Confidence Regex. Skipping ALL LLMs.", session_id=conv_id)
|
| 222 |
is_fast_path = True
|
| 223 |
detection = heuristic_detection
|
| 224 |
+
|
| 225 |
+
# [FIX] PRESERVE REGEX INTEL IN FAST-PATH
|
| 226 |
+
# Previously: intelligence = {} (Wiped out all extracted data)
|
| 227 |
+
from app.utils.extractors import extract_all
|
| 228 |
+
intelligence = extract_all(message)
|
| 229 |
+
|
| 230 |
+
# Calculate heuristic risk score for Fast Path
|
| 231 |
+
intelligence["risk_score"] = 0
|
| 232 |
+
if intelligence.get("upi_ids"): intelligence["risk_score"] += 20
|
| 233 |
+
if intelligence.get("bank_accounts"): intelligence["risk_score"] += 30
|
| 234 |
+
if intelligence.get("urls"): intelligence["risk_score"] += 10
|
| 235 |
|
| 236 |
# Set Defaults for Fast Path
|
| 237 |
# MUST be a dict for persona_engine compatibility
|
app/utils/guvi_handler.py
CHANGED
|
@@ -73,7 +73,6 @@ class GUVIHandler:
|
|
| 73 |
# [FIX] Use UUID to prevent session collision during pings
|
| 74 |
import uuid
|
| 75 |
session_id = str(session_id) if session_id else str(uuid.uuid4())
|
| 76 |
-
session_id = str(session_id) if session_id else str(uuid.uuid4())
|
| 77 |
request.resolved_session_id = session_id
|
| 78 |
|
| 79 |
# [PERFORMANCE] Single DB Fetch (Start of Lifecycle)
|
|
|
|
| 73 |
# [FIX] Use UUID to prevent session collision during pings
|
| 74 |
import uuid
|
| 75 |
session_id = str(session_id) if session_id else str(uuid.uuid4())
|
|
|
|
| 76 |
request.resolved_session_id = session_id
|
| 77 |
|
| 78 |
# [PERFORMANCE] Single DB Fetch (Start of Lifecycle)
|