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:
xiaji
2026-06-12 22:44:00 +08:00
parent aaf728f3f4
commit 16536fe3a0
6 changed files with 185 additions and 2 deletions

View File

@@ -30,6 +30,9 @@ const setting = ref<LlmSetting>({
meituan_interval_sec: 2.0,
meituan_enabled: true,
meituan_commentary_prompt: '',
meituan_blocked_topics: ['时政', '国际', '军事', '政治', '战争', '冲突', '制裁', '选举'],
meituan_blocked_keywords: [],
meituan_no_comment_text: '无可奉告',
})
// === Angel api_key 编辑(不回显真值) ===
@@ -324,6 +327,46 @@ onMounted(load)
placeholder="留空用默认"
style="margin-top: 8px"
/>
<NDivider style="margin: 12px 0" />
<NText strong>🚧 主题拦截("无可奉告")</NText>
<NText depth="3" style="font-size: 12px; margin-top: 4px; display: block">
美团 LongCat 对战争/政治/敏感新闻会触发内容安全审核 400<br />
命中下述"主题""关键词"的文章,直接写固定文案(<NCode>无可奉告</NCode>),不调美团 API
</NText>
<NSpace vertical style="margin-top: 8px">
<NSpace align="start">
<NText style="min-width: 80px; padding-top: 4px">主题(topic):</NText>
<NInput
:value="(setting.meituan_blocked_topics || []).join(' / ')"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
placeholder="时政 / 国际 / 军事"
style="width: 380px"
@update:value="(v: string) => setting.meituan_blocked_topics = v.split(/[,,;\n]/).map(s => s.trim()).filter(Boolean)"
/>
</NSpace>
<NSpace align="start">
<NText style="min-width: 80px; padding-top: 4px">关键词:</NText>
<NInput
:value="(setting.meituan_blocked_keywords || []).join(' / ')"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
placeholder="(留空) — 命中标题或正文任一关键词即触发"
style="width: 380px"
@update:value="(v: string) => setting.meituan_blocked_keywords = v.split(/[,,;\n]/).map(s => s.trim()).filter(Boolean)"
/>
</NSpace>
<NSpace align="center">
<NText style="min-width: 80px">固定文案:</NText>
<NInput
v-model:value="setting.meituan_no_comment_text"
placeholder="无可奉告"
style="width: 200px"
/>
<NText depth="3" style="font-size: 12px">(命中后写入 commentary_meituan 字段的内容)</NText>
</NSpace>
</NSpace>
</NCard>
<NCard title="排版提示词" style="margin-top: 16px">