mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
chore: Add PyPI package support for uvx/pip installation (#1764)
* Initial plan * Add package structure and resource path utilities - Created langbot/ package with __init__.py and __main__.py entry point - Added paths utility to find frontend and resource files from package installation - Updated config loading to use resource paths - Updated frontend serving to use resource paths - Added MANIFEST.in for package data inclusion - Updated pyproject.toml with build system and entry points Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Add PyPI publishing workflow and update license - Created GitHub Actions workflow to build frontend and publish to PyPI - Added license field to pyproject.toml to fix deprecation warning - Updated .gitignore to exclude build artifacts - Tested package building successfully Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Add PyPI installation documentation - Created PYPI_INSTALLATION.md with detailed installation and usage instructions - Updated README.md to feature uvx/pip installation as recommended method - Updated README_EN.md with same changes for English documentation Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Address code review feedback - Made package-data configuration more specific to langbot package only - Improved path detection with caching to avoid repeated file I/O - Removed sys.path searching which was incorrect for package data - Removed interactive input() call for non-interactive environment compatibility - Simplified error messages for version check Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Fix code review issues - Use specific exception types instead of bare except - Fix misleading comments about directory levels - Remove redundant existence check before makedirs with exist_ok=True - Use context manager for file opening to ensure proper cleanup Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Simplify package configuration and document behavioral differences - Removed redundant package-data configuration, relying on MANIFEST.in - Added documentation about behavioral differences between package and source installation - Clarified that include-package-data=true uses MANIFEST.in for data files Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * chore: update pyproject.toml * chore: try pack templates in langbot/ * chore: update * chore: update * chore: update * chore: update * chore: update * chore: adjust dir structure * chore: fix imports * fix: read default-pipeline-config.json * fix: read default-pipeline-config.json * fix: tests * ci: publish pypi * chore: bump version 4.6.0-beta.1 for testing * chore: add templates/** * fix: send adapters and requesters icons * chore: bump version 4.6.0b2 for testing * chore: add platform field for docker-compose.yaml --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> Co-authored-by: Junyan Qin <rockchinq@gmail.com>
This commit is contained in:
0
src/langbot/templates/__init__.py
Normal file
0
src/langbot/templates/__init__.py
Normal file
15
src/langbot/templates/components.yaml
Normal file
15
src/langbot/templates/components.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Blueprint
|
||||
metadata:
|
||||
name: builtin-components
|
||||
label:
|
||||
en_US: Builtin Components
|
||||
zh_Hans: 内置组件
|
||||
spec:
|
||||
components:
|
||||
MessagePlatformAdapter:
|
||||
fromDirs:
|
||||
- path: pkg/platform/sources/
|
||||
LLMAPIRequester:
|
||||
fromDirs:
|
||||
- path: pkg/provider/modelmgr/requesters/
|
||||
50
src/langbot/templates/config.yaml
Normal file
50
src/langbot/templates/config.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
admins: []
|
||||
api:
|
||||
port: 5300
|
||||
command:
|
||||
enable: true
|
||||
prefix:
|
||||
- '!'
|
||||
- !
|
||||
privilege: {}
|
||||
concurrency:
|
||||
pipeline: 20
|
||||
session: 1
|
||||
proxy:
|
||||
http: ''
|
||||
https: ''
|
||||
system:
|
||||
recovery_key: ''
|
||||
jwt:
|
||||
expire: 604800
|
||||
secret: ''
|
||||
database:
|
||||
use: sqlite
|
||||
sqlite:
|
||||
path: 'data/langbot.db'
|
||||
postgresql:
|
||||
host: '127.0.0.1'
|
||||
port: 5432
|
||||
user: 'postgres'
|
||||
password: 'postgres'
|
||||
database: 'postgres'
|
||||
vdb:
|
||||
use: chroma
|
||||
qdrant:
|
||||
url: ''
|
||||
host: localhost
|
||||
port: 6333
|
||||
api_key: ''
|
||||
storage:
|
||||
use: local
|
||||
s3:
|
||||
endpoint_url: ''
|
||||
access_key_id: ''
|
||||
secret_access_key: ''
|
||||
region: 'us-east-1'
|
||||
bucket: 'langbot-storage'
|
||||
plugin:
|
||||
enable: true
|
||||
runtime_ws_url: 'ws://langbot_plugin_runtime:5400/control/ws'
|
||||
enable_marketplace: true
|
||||
cloud_service_url: 'https://space.langbot.app'
|
||||
101
src/langbot/templates/default-pipeline-config.json
Normal file
101
src/langbot/templates/default-pipeline-config.json
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"trigger": {
|
||||
"group-respond-rules": {
|
||||
"at": true,
|
||||
"prefix": [
|
||||
"ai"
|
||||
],
|
||||
"regexp": [],
|
||||
"random": 0.0
|
||||
},
|
||||
"access-control": {
|
||||
"mode": "blacklist",
|
||||
"blacklist": [],
|
||||
"whitelist": []
|
||||
},
|
||||
"ignore-rules": {
|
||||
"prefix": [],
|
||||
"regexp": []
|
||||
},
|
||||
"misc": {
|
||||
"combine-quote-message": true
|
||||
}
|
||||
},
|
||||
"safety": {
|
||||
"content-filter": {
|
||||
"scope": "all",
|
||||
"check-sensitive-words": true
|
||||
},
|
||||
"rate-limit": {
|
||||
"window-length": 60,
|
||||
"limitation": 60,
|
||||
"strategy": "drop"
|
||||
}
|
||||
},
|
||||
"ai": {
|
||||
"runner": {
|
||||
"runner": "local-agent"
|
||||
},
|
||||
"local-agent": {
|
||||
"model": "",
|
||||
"max-round": 10,
|
||||
"prompt": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are a helpful assistant."
|
||||
}
|
||||
],
|
||||
"knowledge-bases": []
|
||||
},
|
||||
"dify-service-api": {
|
||||
"base-url": "https://api.dify.ai/v1",
|
||||
"app-type": "chat",
|
||||
"api-key": "your-api-key",
|
||||
"timeout": 30
|
||||
},
|
||||
"dashscope-app-api": {
|
||||
"app-type": "agent",
|
||||
"api-key": "your-api-key",
|
||||
"app-id": "your-app-id",
|
||||
"references-quote": "参考资料来自:"
|
||||
},
|
||||
"n8n-service-api": {
|
||||
"webhook-url": "http://your-n8n-webhook-url",
|
||||
"auth-type": "none",
|
||||
"basic-username": "",
|
||||
"basic-password": "",
|
||||
"jwt-secret": "",
|
||||
"jwt-algorithm": "HS256",
|
||||
"header-name": "",
|
||||
"header-value": "",
|
||||
"timeout": 120,
|
||||
"output-key": "response"
|
||||
},
|
||||
"langflow-api": {
|
||||
"base-url": "http://localhost:7860",
|
||||
"api-key": "your-api-key",
|
||||
"flow-id": "your-flow-id",
|
||||
"input-type": "chat",
|
||||
"output-type": "chat",
|
||||
"tweaks": "{}"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"long-text-processing": {
|
||||
"threshold": 1000,
|
||||
"strategy": "none",
|
||||
"font-path": ""
|
||||
},
|
||||
"force-delay": {
|
||||
"min": 0,
|
||||
"max": 0
|
||||
},
|
||||
"misc": {
|
||||
"hide-exception": true,
|
||||
"at-sender": true,
|
||||
"quote-origin": true,
|
||||
"track-function-calls": false,
|
||||
"remove-think": false
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/langbot/templates/legacy/command.json
Normal file
7
src/langbot/templates/legacy/command.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"privilege": {},
|
||||
"command-prefix": [
|
||||
"!",
|
||||
"!"
|
||||
]
|
||||
}
|
||||
44
src/langbot/templates/legacy/pipeline.json
Normal file
44
src/langbot/templates/legacy/pipeline.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"access-control":{
|
||||
"mode": "blacklist",
|
||||
"blacklist": [],
|
||||
"whitelist": []
|
||||
},
|
||||
"respond-rules": {
|
||||
"default": {
|
||||
"at": true,
|
||||
"prefix": [
|
||||
"/ai", "!ai", "!ai", "ai"
|
||||
],
|
||||
"regexp": [],
|
||||
"random": 0.0
|
||||
}
|
||||
},
|
||||
"income-msg-check": true,
|
||||
"ignore-rules": {
|
||||
"prefix": [],
|
||||
"regexp": []
|
||||
},
|
||||
"check-sensitive-words": true,
|
||||
"baidu-cloud-examine": {
|
||||
"enable": false,
|
||||
"api-key": "",
|
||||
"api-secret": ""
|
||||
},
|
||||
"rate-limit": {
|
||||
"strategy": "drop",
|
||||
"algo": "fixwin",
|
||||
"fixwin": {
|
||||
"default": {
|
||||
"window-size": 60,
|
||||
"limit": 60
|
||||
}
|
||||
}
|
||||
},
|
||||
"msg-truncate": {
|
||||
"method": "round",
|
||||
"round": {
|
||||
"max-round": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
130
src/langbot/templates/legacy/platform.json
Normal file
130
src/langbot/templates/legacy/platform.json
Normal file
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"platform-adapters": [
|
||||
{
|
||||
"adapter": "nakuru",
|
||||
"enable": false,
|
||||
"host": "127.0.0.1",
|
||||
"ws_port": 8080,
|
||||
"http_port": 5700,
|
||||
"token": ""
|
||||
},
|
||||
{
|
||||
"adapter": "aiocqhttp",
|
||||
"enable": true,
|
||||
"host": "0.0.0.0",
|
||||
"port": 2280,
|
||||
"access-token": ""
|
||||
},
|
||||
{
|
||||
"adapter": "qq-botpy",
|
||||
"enable": false,
|
||||
"appid": "",
|
||||
"secret": "",
|
||||
"intents": [
|
||||
"public_guild_messages",
|
||||
"direct_message"
|
||||
]
|
||||
},
|
||||
{
|
||||
"adapter": "qqofficial",
|
||||
"enable": false,
|
||||
"appid": "1234567890",
|
||||
"secret": "xxxxxxx",
|
||||
"port": 2284,
|
||||
"token": "abcdefg"
|
||||
},
|
||||
{
|
||||
"adapter": "wecom",
|
||||
"enable": false,
|
||||
"host": "0.0.0.0",
|
||||
"port": 2290,
|
||||
"corpid": "",
|
||||
"secret": "",
|
||||
"token": "",
|
||||
"EncodingAESKey": "",
|
||||
"contacts_secret": ""
|
||||
},
|
||||
{
|
||||
"adapter": "lark",
|
||||
"enable": false,
|
||||
"app_id": "cli_abcdefgh",
|
||||
"app_secret": "XXXXXXXXXX",
|
||||
"bot_name": "LangBot",
|
||||
"enable-webhook": false,
|
||||
"port": 2285,
|
||||
"encrypt-key": "xxxxxxxxx"
|
||||
},
|
||||
{
|
||||
"adapter": "discord",
|
||||
"enable": false,
|
||||
"client_id": "1234567890",
|
||||
"token": "XXXXXXXXXX"
|
||||
},
|
||||
{
|
||||
"adapter": "gewechat",
|
||||
"enable": false,
|
||||
"gewechat_url": "http://your-gewechat-server:2531",
|
||||
"gewechat_file_url": "http://your-gewechat-server:2532",
|
||||
"port": 2286,
|
||||
"callback_url": "http://your-callback-url:2286/gewechat/callback",
|
||||
"app_id": "",
|
||||
"token": ""
|
||||
},
|
||||
{
|
||||
"adapter": "officialaccount",
|
||||
"enable": false,
|
||||
"token": "",
|
||||
"EncodingAESKey": "",
|
||||
"AppID": "",
|
||||
"AppSecret": "",
|
||||
"Mode": "drop",
|
||||
"LoadingMessage": "AI正在思考中,请发送任意内容获取回复。",
|
||||
"host": "0.0.0.0",
|
||||
"port": 2287
|
||||
},
|
||||
{
|
||||
"adapter": "dingtalk",
|
||||
"enable": false,
|
||||
"client_id": "",
|
||||
"client_secret": "",
|
||||
"robot_code": "",
|
||||
"robot_name": "",
|
||||
"markdown_card": false
|
||||
},
|
||||
{
|
||||
"adapter": "telegram",
|
||||
"enable": false,
|
||||
"token": "",
|
||||
"markdown_card": false
|
||||
},
|
||||
{
|
||||
"adapter": "slack",
|
||||
"enable": false,
|
||||
"bot_token": "",
|
||||
"signing_secret": "",
|
||||
"port": 2288
|
||||
},
|
||||
{
|
||||
"adapter": "wecomcs",
|
||||
"enable": false,
|
||||
"port": 2289,
|
||||
"corpid": "",
|
||||
"secret": "",
|
||||
"token": "",
|
||||
"EncodingAESKey": ""
|
||||
}
|
||||
],
|
||||
"track-function-calls": true,
|
||||
"quote-origin": false,
|
||||
"at-sender": false,
|
||||
"force-delay": {
|
||||
"min": 0,
|
||||
"max": 0
|
||||
},
|
||||
"long-text-process": {
|
||||
"threshold": 2560,
|
||||
"strategy": "forward",
|
||||
"font-path": ""
|
||||
},
|
||||
"hide-exception-info": true
|
||||
}
|
||||
161
src/langbot/templates/legacy/provider.json
Normal file
161
src/langbot/templates/legacy/provider.json
Normal file
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"enable-chat": true,
|
||||
"enable-vision": true,
|
||||
"keys": {
|
||||
"openai": [
|
||||
"sk-1234567890"
|
||||
],
|
||||
"anthropic": [
|
||||
"sk-1234567890"
|
||||
],
|
||||
"moonshot": [
|
||||
"sk-1234567890"
|
||||
],
|
||||
"deepseek": [
|
||||
"sk-1234567890"
|
||||
],
|
||||
"gitee-ai": [
|
||||
"XXXXX"
|
||||
],
|
||||
"xai": [
|
||||
"xai-1234567890"
|
||||
],
|
||||
"zhipuai": [
|
||||
"xxxxxxx"
|
||||
],
|
||||
"siliconflow": [
|
||||
"xxxxxxx"
|
||||
],
|
||||
"bailian": [
|
||||
"sk-xxxxxxx"
|
||||
],
|
||||
"volcark": [
|
||||
"xxxxxxxx"
|
||||
],
|
||||
"modelscope": [
|
||||
"xxxxxxxx"
|
||||
],
|
||||
"ppio": [
|
||||
"xxxxxxxx"
|
||||
]
|
||||
},
|
||||
"requester": {
|
||||
"openai-chat-completions": {
|
||||
"base-url": "https://api.openai.com/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"anthropic-messages": {
|
||||
"base-url": "https://api.anthropic.com",
|
||||
"args": {
|
||||
"max_tokens": 1024
|
||||
},
|
||||
"timeout": 120
|
||||
},
|
||||
"moonshot-chat-completions": {
|
||||
"base-url": "https://api.moonshot.cn/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"deepseek-chat-completions": {
|
||||
"base-url": "https://api.deepseek.com",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"ollama-chat": {
|
||||
"base-url": "http://127.0.0.1:11434",
|
||||
"args": {},
|
||||
"timeout": 600
|
||||
},
|
||||
"gitee-ai-chat-completions": {
|
||||
"base-url": "https://ai.gitee.com/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"xai-chat-completions": {
|
||||
"base-url": "https://api.x.ai/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"zhipuai-chat-completions": {
|
||||
"base-url": "https://open.bigmodel.cn/api/paas/v4",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"lmstudio-chat-completions": {
|
||||
"base-url": "http://127.0.0.1:1234/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"siliconflow-chat-completions": {
|
||||
"base-url": "https://api.siliconflow.cn/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"bailian-chat-completions": {
|
||||
"args": {},
|
||||
"base-url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
||||
"timeout": 120
|
||||
},
|
||||
"volcark-chat-completions": {
|
||||
"args": {},
|
||||
"base-url": "https://ark.cn-beijing.volces.com/api/v3",
|
||||
"timeout": 120
|
||||
},
|
||||
"modelscope-chat-completions": {
|
||||
"base-url": "https://api-inference.modelscope.cn/v1",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
},
|
||||
"ppio-chat-completions": {
|
||||
"base-url": "https://api.ppinfra.com/v3/openai",
|
||||
"args": {},
|
||||
"timeout": 120
|
||||
}
|
||||
},
|
||||
"model": "gpt-4o",
|
||||
"prompt-mode": "normal",
|
||||
"prompt": {
|
||||
"default": "You are a helpful assistant."
|
||||
},
|
||||
"runner": "local-agent",
|
||||
"dify-service-api": {
|
||||
"base-url": "https://api.dify.ai/v1",
|
||||
"app-type": "chat",
|
||||
"options": {
|
||||
"convert-thinking-tips": "plain"
|
||||
},
|
||||
"chat": {
|
||||
"api-key": "app-1234567890",
|
||||
"timeout": 120
|
||||
},
|
||||
"agent": {
|
||||
"api-key": "app-1234567890",
|
||||
"timeout": 120
|
||||
},
|
||||
"workflow": {
|
||||
"api-key": "app-1234567890",
|
||||
"output-key": "summary",
|
||||
"timeout": 120
|
||||
}
|
||||
},
|
||||
"dashscope-app-api": {
|
||||
"app-type": "agent",
|
||||
"api-key": "sk-1234567890",
|
||||
"agent": {
|
||||
"app-id": "Your_app_id",
|
||||
"references_quote": "参考资料来自:"
|
||||
},
|
||||
"workflow": {
|
||||
"app-id": "Your_app_id",
|
||||
"references_quote": "参考资料来自:",
|
||||
"biz_params": {
|
||||
"city": "北京",
|
||||
"date": "2023-08-10"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mcp": {
|
||||
"servers": []
|
||||
}
|
||||
}
|
||||
27
src/langbot/templates/legacy/system.json
Normal file
27
src/langbot/templates/legacy/system.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"admin-sessions": [],
|
||||
"network-proxies": {
|
||||
"http": null,
|
||||
"https": null
|
||||
},
|
||||
"report-usage": true,
|
||||
"logging-level": "info",
|
||||
"session-concurrency": {
|
||||
"default": 1
|
||||
},
|
||||
"pipeline-concurrency": 20,
|
||||
"qcg-center-url": "https://api.qchatgpt.rockchin.top/api/v2",
|
||||
"help-message": "LangBot - 😎高稳定性、🧩支持插件、🌏实时联网的 ChatGPT QQ 机器人🤖\n链接:https://q.rkcn.top",
|
||||
"http-api": {
|
||||
"enable": true,
|
||||
"host": "0.0.0.0",
|
||||
"port": 5300,
|
||||
"jwt-expire": 604800
|
||||
},
|
||||
"persistence": {
|
||||
"sqlite": {
|
||||
"path": "data/langbot.db"
|
||||
},
|
||||
"use": "sqlite"
|
||||
}
|
||||
}
|
||||
450
src/langbot/templates/metadata/pipeline/ai.yaml
Normal file
450
src/langbot/templates/metadata/pipeline/ai.yaml
Normal file
@@ -0,0 +1,450 @@
|
||||
name: ai
|
||||
label:
|
||||
en_US: AI Feature
|
||||
zh_Hans: AI 能力
|
||||
stages:
|
||||
- name: runner
|
||||
label:
|
||||
en_US: Runner
|
||||
zh_Hans: 运行方式
|
||||
description:
|
||||
en_US: Strategy to call AI to process messages
|
||||
zh_Hans: 调用 AI 处理消息的方式
|
||||
config:
|
||||
- name: runner
|
||||
label:
|
||||
en_US: Runner
|
||||
zh_Hans: 运行器
|
||||
type: select
|
||||
required: true
|
||||
default: local-agent
|
||||
options:
|
||||
- name: local-agent
|
||||
label:
|
||||
en_US: Local Agent
|
||||
zh_Hans: 内置 Agent
|
||||
- name: tbox-app-api
|
||||
label:
|
||||
en_US: Tbox App API
|
||||
zh_Hans: 蚂蚁百宝箱平台 API
|
||||
- name: dify-service-api
|
||||
label:
|
||||
en_US: Dify Service API
|
||||
zh_Hans: Dify 服务 API
|
||||
- name: dashscope-app-api
|
||||
label:
|
||||
en_US: Aliyun Dashscope App API
|
||||
zh_Hans: 阿里云百炼平台 API
|
||||
- name: n8n-service-api
|
||||
label:
|
||||
en_US: n8n Workflow API
|
||||
zh_Hans: n8n 工作流 API
|
||||
- name: langflow-api
|
||||
label:
|
||||
en_US: Langflow API
|
||||
zh_Hans: Langflow API
|
||||
- name: coze-api
|
||||
label:
|
||||
en_US: Coze API
|
||||
zh_Hans: 扣子 API
|
||||
- name: local-agent
|
||||
label:
|
||||
en_US: Local Agent
|
||||
zh_Hans: 内置 Agent
|
||||
description:
|
||||
en_US: Configure the embedded agent of the pipeline
|
||||
zh_Hans: 配置内置 Agent
|
||||
config:
|
||||
- name: model
|
||||
label:
|
||||
en_US: Model
|
||||
zh_Hans: 模型
|
||||
type: llm-model-selector
|
||||
required: true
|
||||
- name: max-round
|
||||
label:
|
||||
en_US: Max Round
|
||||
zh_Hans: 最大回合数
|
||||
description:
|
||||
en_US: The maximum number of previous messages that the agent can remember
|
||||
zh_Hans: 最大前文消息回合数
|
||||
type: integer
|
||||
required: true
|
||||
default: 10
|
||||
- name: prompt
|
||||
label:
|
||||
en_US: Prompt
|
||||
zh_Hans: 提示词
|
||||
description:
|
||||
en_US: The prompt of the agent
|
||||
zh_Hans: 除非您了解消息结构,否则请只使用 system 单提示词
|
||||
type: prompt-editor
|
||||
required: true
|
||||
- name: knowledge-bases
|
||||
label:
|
||||
en_US: Knowledge Bases
|
||||
zh_Hans: 知识库
|
||||
description:
|
||||
en_US: Configure the knowledge bases to use for the agent, if not selected, the agent will directly use the LLM to reply
|
||||
zh_Hans: 配置用于提升回复质量的知识库,若不选择,则直接使用大模型回复
|
||||
type: knowledge-base-multi-selector
|
||||
required: false
|
||||
default: []
|
||||
- name: tbox-app-api
|
||||
label:
|
||||
en_US: Tbox App API
|
||||
zh_Hans: 蚂蚁百宝箱平台 API
|
||||
description:
|
||||
en_US: Configure the Tbox App API of the pipeline
|
||||
zh_Hans: 配置蚂蚁百宝箱平台 API
|
||||
config:
|
||||
- name: api-key
|
||||
label:
|
||||
en_US: API Key
|
||||
zh_Hans: API 密钥
|
||||
type: string
|
||||
required: true
|
||||
- name: app-id
|
||||
label:
|
||||
en_US: App ID
|
||||
zh_Hans: 应用 ID
|
||||
type: string
|
||||
required: true
|
||||
- name: dify-service-api
|
||||
label:
|
||||
en_US: Dify Service API
|
||||
zh_Hans: Dify 服务 API
|
||||
description:
|
||||
en_US: Configure the Dify service API of the pipeline
|
||||
zh_Hans: 配置 Dify 服务 API
|
||||
config:
|
||||
- name: base-url
|
||||
label:
|
||||
en_US: Base URL
|
||||
zh_Hans: 基础 URL
|
||||
type: string
|
||||
required: true
|
||||
- name: base-prompt
|
||||
label:
|
||||
en_US: Base PROMPT
|
||||
zh_Hans: 基础提示词
|
||||
description:
|
||||
en_US: When Dify receives a message with empty input (only images), it will pass this default prompt into it.
|
||||
zh_Hans: 当 Dify 接收到输入文字为空(仅图片)的消息时,传入该默认提示词
|
||||
type: string
|
||||
required: true
|
||||
default: "When the file content is readable, please read the content of this file. When the file is an image, describe the content of this image."
|
||||
- name: app-type
|
||||
label:
|
||||
en_US: App Type
|
||||
zh_Hans: 应用类型
|
||||
type: select
|
||||
required: true
|
||||
default: chat
|
||||
options:
|
||||
- name: chat
|
||||
label:
|
||||
en_US: Chat
|
||||
zh_Hans: 聊天(包括Chatflow)
|
||||
- name: agent
|
||||
label:
|
||||
en_US: Agent
|
||||
zh_Hans: Agent
|
||||
- name: workflow
|
||||
label:
|
||||
en_US: Workflow
|
||||
zh_Hans: 工作流
|
||||
- name: api-key
|
||||
label:
|
||||
en_US: API Key
|
||||
zh_Hans: API 密钥
|
||||
type: string
|
||||
required: true
|
||||
- name: dashscope-app-api
|
||||
label:
|
||||
en_US: Aliyun Dashscope App API
|
||||
zh_Hans: 阿里云百炼平台 API
|
||||
description:
|
||||
en_US: Configure the Aliyun Dashscope App API of the pipeline
|
||||
zh_Hans: 配置阿里云百炼平台 API
|
||||
config:
|
||||
- name: app-type
|
||||
label:
|
||||
en_US: App Type
|
||||
zh_Hans: 应用类型
|
||||
type: select
|
||||
required: true
|
||||
default: agent
|
||||
options:
|
||||
- name: agent
|
||||
label:
|
||||
en_US: Agent
|
||||
zh_Hans: Agent
|
||||
- name: workflow
|
||||
label:
|
||||
en_US: Workflow
|
||||
zh_Hans: 工作流
|
||||
- name: api-key
|
||||
label:
|
||||
en_US: API Key
|
||||
zh_Hans: API 密钥
|
||||
type: string
|
||||
required: true
|
||||
- name: app-id
|
||||
label:
|
||||
en_US: App ID
|
||||
zh_Hans: 应用 ID
|
||||
type: string
|
||||
required: true
|
||||
- name: references_quote
|
||||
label:
|
||||
en_US: References Quote
|
||||
zh_Hans: 引用文本
|
||||
description:
|
||||
en_US: The text prompt when the references are included
|
||||
zh_Hans: 包含引用资料时的文本提示
|
||||
type: string
|
||||
required: false
|
||||
default: '参考资料来自:'
|
||||
- name: n8n-service-api
|
||||
label:
|
||||
en_US: n8n Workflow API
|
||||
zh_Hans: n8n 工作流 API
|
||||
description:
|
||||
en_US: Configure the n8n workflow API of the pipeline
|
||||
zh_Hans: 配置 n8n 工作流 API
|
||||
config:
|
||||
- name: webhook-url
|
||||
label:
|
||||
en_US: Webhook URL
|
||||
zh_Hans: Webhook URL
|
||||
description:
|
||||
en_US: The webhook URL of the n8n workflow
|
||||
zh_Hans: n8n 工作流的 webhook URL
|
||||
type: string
|
||||
required: true
|
||||
- name: auth-type
|
||||
label:
|
||||
en_US: Authentication Type
|
||||
zh_Hans: 认证类型
|
||||
description:
|
||||
en_US: The authentication type for the webhook call
|
||||
zh_Hans: webhook 调用的认证类型
|
||||
type: select
|
||||
required: true
|
||||
default: 'none'
|
||||
options:
|
||||
- name: 'none'
|
||||
label:
|
||||
en_US: None
|
||||
zh_Hans: 无认证
|
||||
- name: 'basic'
|
||||
label:
|
||||
en_US: Basic Auth
|
||||
zh_Hans: 基本认证
|
||||
- name: 'jwt'
|
||||
label:
|
||||
en_US: JWT
|
||||
zh_Hans: JWT认证
|
||||
- name: 'header'
|
||||
label:
|
||||
en_US: Header Auth
|
||||
zh_Hans: 请求头认证
|
||||
- name: basic-username
|
||||
label:
|
||||
en_US: Username
|
||||
zh_Hans: 用户名
|
||||
description:
|
||||
en_US: The username for Basic Auth
|
||||
zh_Hans: 基本认证的用户名
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: basic-password
|
||||
label:
|
||||
en_US: Password
|
||||
zh_Hans: 密码
|
||||
description:
|
||||
en_US: The password for Basic Auth
|
||||
zh_Hans: 基本认证的密码
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: jwt-secret
|
||||
label:
|
||||
en_US: Secret
|
||||
zh_Hans: 密钥
|
||||
description:
|
||||
en_US: The secret for JWT authentication
|
||||
zh_Hans: JWT认证的密钥
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: jwt-algorithm
|
||||
label:
|
||||
en_US: Algorithm
|
||||
zh_Hans: 算法
|
||||
description:
|
||||
en_US: The algorithm for JWT authentication
|
||||
zh_Hans: JWT认证的算法
|
||||
type: string
|
||||
required: false
|
||||
default: 'HS256'
|
||||
- name: header-name
|
||||
label:
|
||||
en_US: Header Name
|
||||
zh_Hans: 请求头名称
|
||||
description:
|
||||
en_US: The header name for Header Auth
|
||||
zh_Hans: 请求头认证的名称
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: header-value
|
||||
label:
|
||||
en_US: Header Value
|
||||
zh_Hans: 请求头值
|
||||
description:
|
||||
en_US: The header value for Header Auth
|
||||
zh_Hans: 请求头认证的值
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: timeout
|
||||
label:
|
||||
en_US: Timeout
|
||||
zh_Hans: 超时时间
|
||||
description:
|
||||
en_US: The timeout in seconds for the webhook call
|
||||
zh_Hans: webhook 调用的超时时间(秒)
|
||||
type: integer
|
||||
required: false
|
||||
default: 120
|
||||
- name: output-key
|
||||
label:
|
||||
en_US: Output Key
|
||||
zh_Hans: 输出键名
|
||||
description:
|
||||
en_US: The key name of the output in the webhook response
|
||||
zh_Hans: webhook 响应中输出内容的键名
|
||||
type: string
|
||||
required: false
|
||||
default: 'response'
|
||||
- name: langflow-api
|
||||
label:
|
||||
en_US: Langflow API
|
||||
zh_Hans: Langflow API
|
||||
description:
|
||||
en_US: Configure the Langflow API of the pipeline, call the Langflow flow through the `Simplified Run Flow` interface
|
||||
zh_Hans: 配置 Langflow API,通过 `Simplified Run Flow` 接口调用 Langflow 的流程
|
||||
config:
|
||||
- name: base-url
|
||||
label:
|
||||
en_US: Base URL
|
||||
zh_Hans: 基础 URL
|
||||
description:
|
||||
en_US: The base URL of the Langflow server
|
||||
zh_Hans: Langflow 服务器的基础 URL
|
||||
type: string
|
||||
required: true
|
||||
- name: api-key
|
||||
label:
|
||||
en_US: API Key
|
||||
zh_Hans: API 密钥
|
||||
description:
|
||||
en_US: The API key for the Langflow server
|
||||
zh_Hans: Langflow 服务器的 API 密钥
|
||||
type: string
|
||||
required: true
|
||||
- name: flow-id
|
||||
label:
|
||||
en_US: Flow ID
|
||||
zh_Hans: 流程 ID
|
||||
description:
|
||||
en_US: The ID of the flow to run
|
||||
zh_Hans: 要运行的流程 ID
|
||||
type: string
|
||||
required: true
|
||||
- name: input-type
|
||||
label:
|
||||
en_US: Input Type
|
||||
zh_Hans: 输入类型
|
||||
description:
|
||||
en_US: The input type for the flow
|
||||
zh_Hans: 流程的输入类型
|
||||
type: string
|
||||
required: false
|
||||
default: 'chat'
|
||||
- name: output-type
|
||||
label:
|
||||
en_US: Output Type
|
||||
zh_Hans: 输出类型
|
||||
description:
|
||||
en_US: The output type for the flow
|
||||
zh_Hans: 流程的输出类型
|
||||
type: string
|
||||
required: false
|
||||
default: 'chat'
|
||||
- name: tweaks
|
||||
label:
|
||||
en_US: Tweaks
|
||||
zh_Hans: 调整参数
|
||||
description:
|
||||
en_US: Optional tweaks to apply to the flow
|
||||
zh_Hans: 可选的流程调整参数
|
||||
type: json
|
||||
required: false
|
||||
default: '{}'
|
||||
- name: coze-api
|
||||
label:
|
||||
en_US: coze API
|
||||
zh_Hans: 扣子 API
|
||||
description:
|
||||
en_US: Configure the Coze API of the pipeline
|
||||
zh_Hans: 配置Coze API
|
||||
config:
|
||||
- name: api-key
|
||||
label:
|
||||
en_US: API Key
|
||||
zh_Hans: API 密钥
|
||||
description:
|
||||
en_US: The API key for the Coze server
|
||||
zh_Hans: Coze服务器的 API 密钥
|
||||
type: string
|
||||
required: true
|
||||
- name: bot-id
|
||||
label:
|
||||
en_US: Bot ID
|
||||
zh_Hans: 机器人 ID
|
||||
description:
|
||||
en_US: The ID of the bot to run
|
||||
zh_Hans: 要运行的机器人 ID
|
||||
type: string
|
||||
required: true
|
||||
- name: api-base
|
||||
label:
|
||||
en_US: API Base URL
|
||||
zh_Hans: API 基础 URL
|
||||
description:
|
||||
en_US: The base URL for the Coze API, please use https://api.coze.com for global Coze edition(coze.com).
|
||||
zh_Hans: Coze API 的基础 URL,请使用 https://api.coze.com 用于全球 Coze 版(coze.com)
|
||||
type: string
|
||||
default: "https://api.coze.cn"
|
||||
- name: auto-save-history
|
||||
label:
|
||||
en_US: Auto Save History
|
||||
zh_Hans: 自动保存历史
|
||||
description:
|
||||
en_US: Whether to automatically save conversation history
|
||||
zh_Hans: 是否自动保存对话历史
|
||||
type: boolean
|
||||
default: true
|
||||
- name: timeout
|
||||
label:
|
||||
en_US: Request Timeout
|
||||
zh_Hans: 请求超时
|
||||
description:
|
||||
en_US: Timeout in seconds for API requests
|
||||
zh_Hans: API 请求超时时间(秒)
|
||||
type: number
|
||||
default: 120
|
||||
121
src/langbot/templates/metadata/pipeline/output.yaml
Normal file
121
src/langbot/templates/metadata/pipeline/output.yaml
Normal file
@@ -0,0 +1,121 @@
|
||||
name: output
|
||||
label:
|
||||
en_US: Output Processing
|
||||
zh_Hans: 输出处理
|
||||
stages:
|
||||
- name: long-text-processing
|
||||
label:
|
||||
en_US: Long Text Processing
|
||||
zh_Hans: 长文本处理
|
||||
config:
|
||||
- name: threshold
|
||||
label:
|
||||
en_US: Threshold
|
||||
zh_Hans: 阈值
|
||||
description:
|
||||
en_US: The threshold of the long text
|
||||
zh_Hans: 超过此长度的文本将被处理
|
||||
type: integer
|
||||
required: true
|
||||
default: 1000
|
||||
- name: strategy
|
||||
label:
|
||||
en_US: Strategy
|
||||
zh_Hans: 策略
|
||||
description:
|
||||
en_US: The strategy of the long text
|
||||
zh_Hans: 长文本的处理策略
|
||||
type: select
|
||||
required: true
|
||||
default: none
|
||||
options:
|
||||
- name: forward
|
||||
label:
|
||||
en_US: Forward Message Component
|
||||
zh_Hans: 转换为转发消息组件(部分平台不支持)
|
||||
- name: image
|
||||
label:
|
||||
en_US: Convert to Image
|
||||
zh_Hans: 转换为图片
|
||||
- name: none
|
||||
label:
|
||||
en_US: None
|
||||
zh_Hans: 不处理
|
||||
- name: font-path
|
||||
label:
|
||||
en_US: Font Path
|
||||
zh_Hans: 字体路径
|
||||
description:
|
||||
en_US: The path of the font to be used when converting to image
|
||||
zh_Hans: 选用转换为图片时,所使用的字体路径
|
||||
type: string
|
||||
required: false
|
||||
default: ''
|
||||
- name: force-delay
|
||||
label:
|
||||
en_US: Force Delay
|
||||
zh_Hans: 强制延迟
|
||||
description:
|
||||
en_US: Force the output to be delayed for a while
|
||||
zh_Hans: 强制延迟一段时间后再回复给用户
|
||||
config:
|
||||
- name: min
|
||||
label:
|
||||
en_US: Min Seconds
|
||||
zh_Hans: 最小秒数
|
||||
type: integer
|
||||
required: true
|
||||
default: 0
|
||||
- name: max
|
||||
label:
|
||||
en_US: Max Seconds
|
||||
zh_Hans: 最大秒数
|
||||
type: integer
|
||||
required: true
|
||||
default: 0
|
||||
- name: misc
|
||||
label:
|
||||
en_US: Misc
|
||||
zh_Hans: 杂项
|
||||
config:
|
||||
- name: hide-exception
|
||||
label:
|
||||
en_US: Hide Exception
|
||||
zh_Hans: 不输出异常信息给用户
|
||||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
- name: at-sender
|
||||
label:
|
||||
en_US: At Sender
|
||||
zh_Hans: 在群聊回复中@发送者
|
||||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
- name: quote-origin
|
||||
label:
|
||||
en_US: Quote Origin Message
|
||||
zh_Hans: 引用原消息
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
- name: track-function-calls
|
||||
label:
|
||||
en_US: Track Function Calls
|
||||
zh_Hans: 跟踪函数调用
|
||||
description:
|
||||
en_US: If enabled, the function calls will be tracked and output to the user
|
||||
zh_Hans: 启用后,Agent 每次调用工具时都会输出一个提示给用户
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
- name: remove-think
|
||||
label:
|
||||
en_US: Remove CoT
|
||||
zh_Hans: 删除思维链
|
||||
description:
|
||||
en_US: 'If enabled, LangBot will remove the LLM thought content in response. Note: When using streaming response, removing CoT may cause the first token to wait for a long time.'
|
||||
zh_Hans: '如果启用,将自动删除大模型回复中的模型思考内容。注意:当您使用流式响应时,删除思维链可能会导致首个 Token 的等待时间过长'
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
75
src/langbot/templates/metadata/pipeline/safety.yaml
Normal file
75
src/langbot/templates/metadata/pipeline/safety.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
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: 等待
|
||||
140
src/langbot/templates/metadata/pipeline/trigger.yaml
Normal file
140
src/langbot/templates/metadata/pipeline/trigger.yaml
Normal file
@@ -0,0 +1,140 @@
|
||||
name: trigger
|
||||
label:
|
||||
en_US: Trigger
|
||||
zh_Hans: 触发条件
|
||||
stages:
|
||||
- name: group-respond-rules
|
||||
label:
|
||||
en_US: Group Respond Rule
|
||||
zh_Hans: 群响应规则
|
||||
description:
|
||||
en_US: The respond rule of the messages in the groups
|
||||
zh_Hans: 群内消息的响应规则
|
||||
config:
|
||||
- name: at
|
||||
label:
|
||||
en_US: At
|
||||
zh_Hans: '@'
|
||||
description:
|
||||
en_US: Whether to trigger when the message mentions the bot
|
||||
zh_Hans: 是否在消息@机器人时触发
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
- name: prefix
|
||||
label:
|
||||
en_US: Prefix
|
||||
zh_Hans: 前缀
|
||||
description:
|
||||
en_US: Messages with these prefixes will be responded (the prefixes will be removed automatically when sending to AI)
|
||||
zh_Hans: 具有这些前缀的消息将被响应(发送给 AI 时会自动去除对应前缀)
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: regexp
|
||||
label:
|
||||
en_US: Regexp
|
||||
zh_Hans: 正则表达式
|
||||
description:
|
||||
en_US: Messages with these regular expressions will be responded
|
||||
zh_Hans: 符合这些正则表达式的消息将被响应
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: random
|
||||
label:
|
||||
en_US: Random
|
||||
zh_Hans: 随机
|
||||
description:
|
||||
en_US: 'Probability of automatically responding to messages that are not matched by other rules. Range: 0.0-1.0 (0%-100%).'
|
||||
zh_Hans: '自动响应其他规则未匹配的消息的概率。范围:0.0-1.0 (0%-100%)。'
|
||||
type: float
|
||||
required: false
|
||||
default: 0
|
||||
- name: access-control
|
||||
label:
|
||||
en_US: Access Control
|
||||
zh_Hans: 访问控制
|
||||
config:
|
||||
- name: mode
|
||||
label:
|
||||
en_US: Mode
|
||||
zh_Hans: 模式
|
||||
description:
|
||||
en_US: The mode of the access control
|
||||
zh_Hans: 访问控制模式
|
||||
type: select
|
||||
required: true
|
||||
default: blacklist
|
||||
options:
|
||||
- name: blacklist
|
||||
label:
|
||||
en_US: Blacklist
|
||||
zh_Hans: 黑名单
|
||||
- name: whitelist
|
||||
label:
|
||||
en_US: Whitelist
|
||||
zh_Hans: 白名单
|
||||
- name: blacklist
|
||||
label:
|
||||
en_US: Blacklist
|
||||
zh_Hans: 黑名单
|
||||
description:
|
||||
en_US: Sessions in the blacklist will be ignored, the format is `{launcher_type}_{launcher_id}`(remove quotes), for example `person_123` matches private chat, `group_456` matches group chat, `person_*` matches all private chats, `group_*` matches all group chats, `*_123` matches private and group chats with user ID 123
|
||||
zh_Hans: 黑名单中的会话将被忽略;会话格式:`{launcher_type}_{launcher_id}`(删除引号),例如 `person_123` 匹配私聊会话,`group_456` 匹配群聊会话;`person_*` 匹配所有私聊会话,`group_*` 匹配所有群聊会话;`*_123` 匹配用户 ID 为 123 的私聊和群聊消息
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: whitelist
|
||||
label:
|
||||
en_US: Whitelist
|
||||
zh_Hans: 白名单
|
||||
description:
|
||||
en_US: Only respond to sessions in the whitelist, the format is `{launcher_type}_{launcher_id}`(remove quotes), for example `person_123` matches private chat, `group_456` matches group chat, `person_*` matches all private chats, `group_*` matches all group chats, `*_123` matches private and group chats with user ID 123
|
||||
zh_Hans: 仅响应白名单中的会话;会话格式:`{launcher_type}_{launcher_id}`(删除引号),例如 `person_123` 匹配私聊会话,`group_456` 匹配群聊会话;`person_*` 匹配所有私聊会话,`group_*` 匹配所有群聊会话;`*_123` 匹配用户 ID 为 123 的私聊和群聊消息
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: ignore-rules
|
||||
label:
|
||||
en_US: Ignore Rules
|
||||
zh_Hans: 消息忽略规则
|
||||
description:
|
||||
en_US: Ignore rules that apply to both group and private messages
|
||||
zh_Hans: 对群聊、私聊消息均适用的忽略规则(优先级高于群响应规则)
|
||||
config:
|
||||
- name: prefix
|
||||
label:
|
||||
en_US: Prefix
|
||||
zh_Hans: 前缀
|
||||
description:
|
||||
en_US: Messages with these prefixes will be ignored
|
||||
zh_Hans: 包含这些前缀的消息将被忽略
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: regexp
|
||||
label:
|
||||
en_US: Regexp
|
||||
zh_Hans: 正则表达式
|
||||
description:
|
||||
en_US: Messages with these regular expressions will be ignored
|
||||
zh_Hans: 符合这些正则表达式的消息将被忽略
|
||||
type: array[string]
|
||||
required: true
|
||||
default: []
|
||||
- name: misc
|
||||
label:
|
||||
en_US: Misc
|
||||
zh_Hans: 杂项
|
||||
config:
|
||||
- name: combine-quote-message
|
||||
label:
|
||||
en_US: Combine Quote Message
|
||||
zh_Hans: 合并引用消息
|
||||
description:
|
||||
en_US: If enabled, the bot will combine the quote message with the user's message
|
||||
zh_Hans: 如果启用,将合并引用消息与用户发送的消息
|
||||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
78
src/langbot/templates/metadata/sensitive-words.json
Normal file
78
src/langbot/templates/metadata/sensitive-words.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"说明": "mask将替换敏感词中的每一个字,若mask_word值不为空,则将敏感词整个替换为mask_word的值",
|
||||
"mask": "*",
|
||||
"mask_word": "",
|
||||
"words": [
|
||||
"习近平",
|
||||
"胡锦涛",
|
||||
"江泽民",
|
||||
"温家宝",
|
||||
"李克强",
|
||||
"李长春",
|
||||
"毛泽东",
|
||||
"邓小平",
|
||||
"周恩来",
|
||||
"马克思",
|
||||
"社会主义",
|
||||
"共产党",
|
||||
"共产主义",
|
||||
"大陆官方",
|
||||
"北京政权",
|
||||
"中华帝国",
|
||||
"中国政府",
|
||||
"共狗",
|
||||
"六四事件",
|
||||
"天安门",
|
||||
"六四",
|
||||
"政治局常委",
|
||||
"两会",
|
||||
"共青团",
|
||||
"学潮",
|
||||
"八九",
|
||||
"二十大",
|
||||
"民进党",
|
||||
"台独",
|
||||
"台湾独立",
|
||||
"台湾国",
|
||||
"国民党",
|
||||
"台湾民国",
|
||||
"中华民国",
|
||||
"pornhub",
|
||||
"Pornhub",
|
||||
"[Yy]ou[Pp]orn",
|
||||
"porn",
|
||||
"Porn",
|
||||
"[Xx][Vv]ideos",
|
||||
"[Rr]ed[Tt]ube",
|
||||
"[Xx][Hh]amster",
|
||||
"[Ss]pank[Ww]ire",
|
||||
"[Ss]pank[Bb]ang",
|
||||
"[Tt]ube8",
|
||||
"[Yy]ou[Jj]izz",
|
||||
"[Bb]razzers",
|
||||
"[Nn]aughty[ ]?[Aa]merica",
|
||||
"作爱",
|
||||
"做爱",
|
||||
"性交",
|
||||
"性爱",
|
||||
"自慰",
|
||||
"阴茎",
|
||||
"淫妇",
|
||||
"肛交",
|
||||
"交配",
|
||||
"性关系",
|
||||
"性活动",
|
||||
"色情",
|
||||
"色图",
|
||||
"涩图",
|
||||
"裸体",
|
||||
"小穴",
|
||||
"淫荡",
|
||||
"性爱",
|
||||
"翻墙",
|
||||
"VPN",
|
||||
"科学上网",
|
||||
"挂梯子",
|
||||
"GFW"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user