feat(meituan): 政治类文章拦截 + 写'无可奉告' + Angel 并发 3→1
- llm_settings 加 meituan_blocked_topics / blocked_keywords / no_comment_text - alembic 0006 迁移,默认 topics=[时政/国际/军事/政治/战争/冲突/制裁/选举], 默认文案='无可奉告' - enrichment._is_meituan_blocked 预检:category 命中 topic 或 关键词 → 直接写'无可奉告',不调美团 API - 命中后 commentary_meituan_model='policy-block' 标识非真实生成 - enrichment_loop Semaphore(3)→(1),Agnes 免费 plan 不再 429 - 前端 AdminLlmSettings 美团卡片加 3 字段 UI(主题/关键词/固定文案)
This commit is contained in:
@@ -71,6 +71,20 @@ class LlmSetting(Base):
|
||||
meituan_interval_sec: Mapped[float] = mapped_column(default=2.0, nullable=False)
|
||||
meituan_enabled: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
meituan_commentary_prompt: Mapped[str | None] = mapped_column(Text) # 留空用默认
|
||||
# 美团"无可奉告"主题清单 — 命中这些 topic 的文章,直接写"无可奉告" + 不调美团 API
|
||||
# (避免 LongCat security_audit_fail 400 循环重试,污染评论失败率)
|
||||
# 匹配规则:article.category 含任一项 OR 标题/正文命中关键词(宽松匹配)
|
||||
meituan_blocked_topics: Mapped[list[str]] = mapped_column(
|
||||
JSONB, nullable=False, default=list, server_default="[]"
|
||||
)
|
||||
meituan_blocked_keywords: Mapped[list[str]] = mapped_column(
|
||||
JSONB, nullable=False, default=list, server_default="[]"
|
||||
)
|
||||
meituan_no_comment_text: Mapped[str] = mapped_column(
|
||||
Text,
|
||||
default="无可奉告",
|
||||
nullable=False,
|
||||
)
|
||||
|
||||
# === 时间 ===
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
|
||||
Reference in New Issue
Block a user