Add LLM anti-prompt injection system
Introduces a comprehensive anti-prompt injection system for LLMs, including rule-based and LLM-based detection, user ban/whitelist management, message shielding, and statistics tracking. Adds new modules under src/chat/antipromptinjector, integrates anti-injection checks into the message receive flow, updates configuration and database models, and provides test scripts. Also updates templates and logger aliases to support the new system.
This commit is contained in:
@@ -505,6 +505,9 @@ MODULE_ALIASES = {
|
||||
"tool_executor": "工具",
|
||||
"hfc": "聊天节奏",
|
||||
"chat": "所见",
|
||||
"anti_injector": "反注入",
|
||||
"anti_injector.detector": "反注入检测",
|
||||
"anti_injector.shield": "反注入加盾",
|
||||
"plugin_manager": "插件",
|
||||
"relationship_builder": "关系",
|
||||
"llm_models": "模型",
|
||||
|
||||
Reference in New Issue
Block a user