Spaces:
Running

axeronis commited on
Commit
af3b3ec
·
1 Parent(s): 191d518

fix: remove redundant import causing UnboundLocalError

Browse files
Files changed (1) hide show
  1. backend/app/api/webhook.py +2 -3
backend/app/api/webhook.py CHANGED
@@ -1305,10 +1305,9 @@ async def process_ai_response_background(
1305
  # 2. SMART LLM ANALYSIS for critical moments
1306
  else:
1307
  try:
1308
- from app.services.ai_core import get_ai_core
1309
- ai_core = get_ai_core()
1310
 
1311
- voice_analysis = await ai_core.llm.generate_response(
1312
  prompt=f"""Is this a CRITICAL MOMENT that requires a personal voice message to build trust?
1313
 
1314
  User's message: "{user_text}"
 
1305
  # 2. SMART LLM ANALYSIS for critical moments
1306
  else:
1307
  try:
1308
+ voice_ai_core = get_ai_core()
 
1309
 
1310
+ voice_analysis = await voice_ai_core.llm.generate_response(
1311
  prompt=f"""Is this a CRITICAL MOMENT that requires a personal voice message to build trust?
1312
 
1313
  User's message: "{user_text}"