aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2025-02-01 08:54:04 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2025-02-01 08:54:04 +0000
commit97a5453c4175c720056549f967353662ff1a215b (patch)
tree03f446f2ce1ee93b86f0bb53281a055468901f84 /src
parentbc5b536f8ac5c60e13a02ec79fd3e15c800e999d (diff)
downloadrspamd-vstakhov-gpt-reason.tar.gz
rspamd-vstakhov-gpt-reason.zip
[Minor] Allow to exclude all symbolsvstakhov-gpt-reason
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/gpt.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/lua/gpt.lua b/src/plugins/lua/gpt.lua
index 2cc570e00..971bfbd29 100644
--- a/src/plugins/lua/gpt.lua
+++ b/src/plugins/lua/gpt.lua
@@ -87,7 +87,7 @@ local settings = {
autolearn = false,
reason_header = nil,
url = 'https://api.openai.com/v1/chat/completions',
- symbols_to_except = default_symbols_to_except,
+ symbols_to_except = nil,
allow_passthrough = false,
allow_ham = false,
}
@@ -658,6 +658,10 @@ if opts then
"add 'reason' field with 1 sentence description why you have made that decision."
end
+ if not settings.symbols_to_except then
+ settings.symbols_to_except = default_symbols_to_except
+ end
+
local llm_type = types_map[settings.type]
if not llm_type then
rspamd_logger.warnx(rspamd_config, 'unsupported gpt type: %s', settings.type)