feat:新增内容混淆功能:在API配置中添加混淆选项及强度设置;更新LLM请求处理逻辑以支持内容混淆,包含随机乱码注入和过滤规则指令(最主要的是防**google的审查)

This commit is contained in:
minecraft1024a
2025-08-12 14:31:59 +08:00
parent d2f1fe4c8f
commit 417f5647b5
3 changed files with 94 additions and 4 deletions

View File

@@ -30,6 +30,18 @@ max_retry = 2
timeout = 30
retry_interval = 10
# 内容混淆功能示例配置(可选)
[[api_providers]]
name = "ExampleProviderWithObfuscation" # 启用混淆功能的API提供商示例
base_url = "https://api.example.com/v1"
api_key = "your-api-key-here"
client_type = "openai"
max_retry = 2
timeout = 30
retry_interval = 10
enable_content_obfuscation = true # 启用内容混淆功能
obfuscation_intensity = 2 # 混淆强度1-3级1=低强度2=中强度3=高强度)
[[models]] # 模型(可以配置多个)
model_identifier = "deepseek-chat" # 模型标识符API服务商提供的模型标识符