Files
argocd-apps/apps/base/mail/rspamd/gpt.conf
T
unkin-agent f627902dd6
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
Add rspamd, ClamAV and sentinel Valkey to the mail namespace
2026-10-12 21:47:39 +11:00

26 lines
818 B
Plaintext

enabled = true;
type = "openai";
url = "http://litellm.litellm.svc.cluster.local:4000/v1/chat/completions";
api_key = "{= env.LITELLM_API_KEY =}";
model = "claude-haiku-4-5";
model_parameters = {
"claude-haiku-4-5" = {
max_tokens = 400,
temperature = 0.0,
}
};
timeout = 10s;
# Only ask the model about inbound mail whose score is uncertain (2 <= score < 12).
condition = <<EOD
return function(task)
if task:get_user() then return false, 'authenticated' end
local ip = task:get_from_ip()
if ip and ip:is_local() then return false, 'local sender' end
local res = task:get_metric_result()
if not res then return false, 'no result' end
if res.passthrough then return false, 'passthrough' end
if res.score < 2 or res.score >= 12 then return false, 'score not uncertain' end
return true
end
EOD