Spaces:
Running

axeronis commited on
Commit
2a7e440
·
1 Parent(s): fd47d06

Fix: Use correct variable name conversation_history in escalation check

Browse files
Files changed (1) hide show
  1. backend/app/api/webhook.py +2 -2
backend/app/api/webhook.py CHANGED
@@ -1340,8 +1340,8 @@ async def process_ai_response_background(
1340
 
1341
  # Build conversation history for analysis
1342
  conv_history = []
1343
- if conversation_messages:
1344
- for msg in conversation_messages[-10:]: # Last 10 messages
1345
  conv_history.append({
1346
  "sender_type": msg.sender_type,
1347
  "content": msg.content or ""
 
1340
 
1341
  # Build conversation history for analysis
1342
  conv_history = []
1343
+ if conversation_history:
1344
+ for msg in conversation_history[-10:]: # Last 10 messages
1345
  conv_history.append({
1346
  "sender_type": msg.sender_type,
1347
  "content": msg.content or ""