feat: refine AI-only risk reply rules and remove fixed preview scripts
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
This commit is contained in:
@@ -225,11 +225,7 @@ class QingjianClient:
|
|||||||
)
|
)
|
||||||
if draw_res.get("ok"):
|
if draw_res.get("ok"):
|
||||||
preview_url = str(draw_res.get("url", "") or "")
|
preview_url = str(draw_res.get("url", "") or "")
|
||||||
await self.send_reply(data, "先给你做了预览图。", trace_id=trace_id)
|
|
||||||
await self.send_image(data, preview_url, trace_id=trace_id)
|
await self.send_image(data, preview_url, trace_id=trace_id)
|
||||||
final_text = "看下预览,满意再拍下付款。"
|
|
||||||
await self.send_reply(data, final_text, trace_id=trace_id)
|
|
||||||
self.last_reply_key[key] = final_text
|
|
||||||
# 预览完成后清掉当前批次,避免同一图重复触发
|
# 预览完成后清掉当前批次,避免同一图重复触发
|
||||||
self.pending_images[key].clear()
|
self.pending_images[key].clear()
|
||||||
activity_event(
|
activity_event(
|
||||||
@@ -242,7 +238,7 @@ class QingjianClient:
|
|||||||
await post_tianwang_callback(
|
await post_tianwang_callback(
|
||||||
"message_processed",
|
"message_processed",
|
||||||
data,
|
data,
|
||||||
extra={"trace_id": trace_id, "route": route, "action": "quote", "reply": final_text, "auto_draw": True},
|
extra={"trace_id": trace_id, "route": route, "action": "quote", "reply": "", "auto_draw": True},
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
activity_event(
|
activity_event(
|
||||||
|
|||||||
@@ -94,11 +94,13 @@ def rules_prompt() -> str:
|
|||||||
" - 政治/涉政/政治人物/政治事件/政治宣传;\n"
|
" - 政治/涉政/政治人物/政治事件/政治宣传;\n"
|
||||||
" - 地图类(地图/地形图/行政区划图/卫星地图等);\n"
|
" - 地图类(地图/地形图/行政区划图/卫星地图等);\n"
|
||||||
" - 黄暴/擦边/色情/露点/明显违规内容;\n"
|
" - 黄暴/擦边/色情/露点/明显违规内容;\n"
|
||||||
|
" - 外国平台相关内容询问;\n"
|
||||||
" - 客户索要站外联系方式(微信/QQ/手机号);\n"
|
" - 客户索要站外联系方式(微信/QQ/手机号);\n"
|
||||||
" - 文本出现超大尺寸需求(如超长边或超大面积,明显超出常规制作能力)。\n"
|
" - 文本出现超大尺寸需求(如超长边或超大面积,明显超出常规制作能力)。\n"
|
||||||
"2) 命中硬规则时,只能 action=reply 或 action=transfer:\n"
|
"2) 命中硬规则时,只能 action=reply 或 action=transfer:\n"
|
||||||
" - 可直接拒绝的,action=reply,reply简短明确边界;\n"
|
" - 可直接拒绝的,action=reply,reply简短明确边界;\n"
|
||||||
" - 风险高或不确定的,action=transfer,给 transfer_msg。\n"
|
" - 风险高或不确定的,action=transfer,给 transfer_msg。\n"
|
||||||
|
" - 外国平台相关内容由 AI 按上下文给出简短拒绝,不要展开解释。\n"
|
||||||
"3) 命中硬规则后禁止改口:后续客户追问“能不能做”,仍保持同一结论。\n"
|
"3) 命中硬规则后禁止改口:后续客户追问“能不能做”,仍保持同一结论。\n"
|
||||||
"4) 多图场景若部分可做、部分不可做,必须明确“哪张可做、哪张不做”,禁止含糊表述。\n\n"
|
"4) 多图场景若部分可做、部分不可做,必须明确“哪张可做、哪张不做”,禁止含糊表述。\n\n"
|
||||||
"MASTER_RULES:\n"
|
"MASTER_RULES:\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user