fix: dedupe wechat chat history and avoid duplicate outbound chat logging

This commit is contained in:
2026-02-28 20:18:29 +08:00
parent 40cb03dd28
commit 1a5b4a4be6
3 changed files with 34 additions and 16 deletions

View File

@@ -515,6 +515,10 @@ class CustomerServiceAgent:
try:
from image.image_analyzer import image_analyzer
result = await image_analyzer.analyze(image_url)
if result.get("feasibility") == "no" or result.get("risk") == "high":
return "该图风险高或不可做:不报价,建议换图或转人工评估。"
if not result.get("success", False):
return "图片识别异常:先不报价,建议客户重发更清晰图片。"
p = result.get("price_suggest", 20)
try:
st = self._get_conversation_state(ctx.deps.from_id)