ciyidogan commited on
Commit
66e7c4d
·
verified ·
1 Parent(s): f454973

Update chat_handler.py

Browse files
Files changed (1) hide show
  1. chat_handler.py +4 -0
chat_handler.py CHANGED
@@ -38,6 +38,10 @@ def _safe_intent_parse(raw: str) -> tuple[str, str]:
38
  if not m:
39
  return "", raw
40
  name = m.group(1)
 
 
 
 
41
  tail = raw[m.end():]
42
  log(f"🎯 Parsed intent: {name}")
43
  return name, tail
 
38
  if not m:
39
  return "", raw
40
  name = m.group(1)
41
+ # Remove 'assistant' suffix if exists
42
+ if name.endswith("assistant"):
43
+ name = name[:-9] # Remove last 9 chars ("assistant")
44
+ log(f"🔧 Removed 'assistant' suffix from intent name")
45
  tail = raw[m.end():]
46
  log(f"🎯 Parsed intent: {name}")
47
  return name, tail