fix: harden image handling and update docs
This commit is contained in:
@@ -121,7 +121,9 @@ async def lookup_chat_history_tool(
|
||||
line = f"[{ts}] {role}:{msg}"
|
||||
lines.append(line)
|
||||
if r["direction"] == "in":
|
||||
if "已收到" in msg and "图" in msg:
|
||||
msg_type = int(r.get("msg_type") or 0)
|
||||
image_urls = str(r.get("image_urls", "") or "").strip()
|
||||
if msg_type == 1 or image_urls or ("已收到" in msg and "图" in msg):
|
||||
has_images = True
|
||||
if any(k in msg for k in ["找原图", "修复", "高清", "去背景", "抠图", "做衣服", "打印"]):
|
||||
customer_needs.append(msg[:60])
|
||||
|
||||
Reference in New Issue
Block a user