新增顶层 LLM 注册配置、插件授权列表和 guard 类型适配器。\n模型由独立 Python 进程加载,通过受限 IPC 为 Lua 提供 host.llm.list、host.llm.call 和可调用接口。\n增加 Qwen3Guard 结果解析、流式审核示例、可选依赖、Docker 构建文件和协议测试。
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
# Relative plugin paths resolve against this configuration file.
|
|
upstream: http://127.0.0.1:8000
|
|
listen_host: 0.0.0.0
|
|
listen_port: 8080
|
|
limits:
|
|
max_sessions: 4
|
|
hook_timeout_seconds: 5
|
|
lua_memory_bytes: 33554432
|
|
max_request_bytes: 2097152
|
|
max_response_bytes: 2097152
|
|
max_sse_frame_bytes: 262144
|
|
max_plugin_buffer_bytes: 1048576
|
|
max_host_calls_per_hook: 64
|
|
upstream_timeout_seconds: 120
|
|
llm: []
|
|
plugins:
|
|
- id: request-rewrite
|
|
file: plugins/request_rewrite.lua
|
|
enabled: false
|
|
config:
|
|
prefix: ""
|
|
- id: stream-redact
|
|
file: plugins/stream_redact.lua
|
|
enabled: false
|
|
- id: network-review
|
|
file: plugins/network_review.lua
|
|
enabled: false
|
|
config:
|
|
url: https://review.example.com/check
|
|
network:
|
|
timeout_seconds: 3
|
|
max_response_bytes: 1048576
|
|
allow:
|
|
- domain: review.example.com
|
|
- domain: '*.review.example.com'
|
|
# Explicit intranet example: enable only after replacing with actual deployment values.
|
|
# - domain: review.internal.example.com
|
|
# scheme: http
|
|
# ports: [8080]
|
|
# cidrs: [10.20.0.0/16]
|