fix: disable legacy fast quote path and tighten dense-text rejection
This commit is contained in:
@@ -1342,12 +1342,19 @@ class CustomerServiceAgent:
|
||||
try:
|
||||
from utils.content_filter import should_block_customer
|
||||
if should_block_customer(message.msg) or self._is_political_inquiry(message.msg):
|
||||
# 命中敏感询问时清空待报价队列,避免旧图残留污染后续会话
|
||||
state.pending_image_urls.clear()
|
||||
state.pending_requirements.clear()
|
||||
self._sync_pending_quote_state(message.from_id, state)
|
||||
reply = "这类不做哈,政治相关图片和人物都不接。"
|
||||
state.last_reply_at = datetime.now()
|
||||
print(f"{self.C_REPLY}[REPLY->CUSTOMER]{self.C_RESET} {reply}")
|
||||
return AgentResponse(reply=reply, should_reply=True, need_transfer=False)
|
||||
except Exception:
|
||||
if self._is_political_inquiry(message.msg):
|
||||
state.pending_image_urls.clear()
|
||||
state.pending_requirements.clear()
|
||||
self._sync_pending_quote_state(message.from_id, state)
|
||||
reply = "这类不做哈,政治相关图片和人物都不接。"
|
||||
state.last_reply_at = datetime.now()
|
||||
print(f"{self.C_REPLY}[REPLY->CUSTOMER]{self.C_RESET} {reply}")
|
||||
|
||||
Reference in New Issue
Block a user