feat: ai-first intent detection with keyword fallback

This commit is contained in:
2026-03-01 17:09:05 +08:00
parent 4a07f9c726
commit 00c80c3bec
5 changed files with 117 additions and 24 deletions

View File

@@ -148,9 +148,8 @@ def is_batch_finish_intent(text: str, state: Any, has_incoming_urls: bool) -> bo
return False
try:
from utils.intent_analyzer import detect_intent_embedding, detect_intent_keywords
intent = detect_intent_embedding(text) or detect_intent_keywords(text)
from utils.intent_analyzer import detect_intent
intent = detect_intent(text).intent
except Exception:
intent = ""
if intent in ("询价", "砍价"):