Files
LangBot/src/langbot/templates/metadata/pipeline/safety.yaml
T
Bruce b9662250a6 add conversation expire config & user query text to dingtalk card (#2147)
* add conversation expire config

* add user query text to card

* fix(pipeline): move session limit to AI config

* test(pipeline): cover AI session limit config

* refactor(pipeline): merge session expire-time into AI runner stage

Move the session validity duration field out of the standalone
session-limit stage into the runner stage so it actually renders in the
AI tab (the tab only shows the runner stage and the stage matching the
selected runner — any other stage is filtered out). Read path, default
config, metadata description, and tests updated accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(pipeline): expire conversations from last update time

* fix(n8n): sync generated conversation id into payload

---------

Co-authored-by: RockChinQ <rockchinq@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 18:13:55 +08:00

76 lines
1.9 KiB
YAML

name: safety
label:
en_US: Safety Control
zh_Hans: 安全控制
stages:
- name: content-filter
label:
en_US: Content Filter
zh_Hans: 内容过滤
config:
- name: scope
label:
en_US: Scope
zh_Hans: 检查范围
type: select
required: true
default: all
options:
- name: all
label:
en_US: All
zh_Hans: 全部
- name: income-msg
label:
en_US: Income Message
zh_Hans: 传入消息(用户消息)
- name: output-msg
label:
en_US: Output Message
zh_Hans: 传出消息(机器人消息)
- name: check-sensitive-words
label:
en_US: Check Sensitive Words
zh_Hans: 检查敏感词
description:
en_US: Sensitive words can be configured in data/metadata/sensitive-words.json
zh_Hans: 敏感词内容可以在 data/metadata/sensitive-words.json 中配置
type: boolean
required: true
default: false
- name: rate-limit
label:
en_US: Rate Limit
zh_Hans: 速率限制
config:
- name: window-length
label:
en_US: Window Length
zh_Hans: 窗口长度(秒)
type: integer
required: true
default: 60
- name: limitation
label:
en_US: Limitation
zh_Hans: 限制次数
type: integer
required: true
default: 60
- name: strategy
label:
en_US: Strategy
zh_Hans: 策略
type: select
required: true
default: drop
options:
- name: drop
label:
en_US: Drop
zh_Hans: 丢弃
- name: wait
label:
en_US: Wait
zh_Hans: 等待