File: gpt.conf

package info (click to toggle)
rspamd 3.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,056 kB
  • sloc: ansic: 243,746; cpp: 105,657; javascript: 29,539; asm: 2,512; perl: 2,440; pascal: 1,625; python: 1,274; sql: 313; sh: 281; makefile: 140; xml: 74
file content (62 lines) | stat: -rw-r--r-- 1,774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify 'local.d/gpt.conf' to add and merge
# parameters defined inside this section
#
# You can modify 'override.d/gpt.conf' to strictly override all
# parameters defined inside this section
#
# See https://rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
# for details
#
# Module documentation can be found at  https://rspamd.com/doc/modules/gpt.html

gpt {
  # Supported types: openai
  type = "openai";
  # Your key to access the API (add this to enable this plugin)
  #api_key = "xxx";
  # Model name
  model = "gpt-5-mini"; # or parallel model requests [ "gpt-5-mini", "gpt-4o-mini" ];
  # Per-model parameters
  model_parameters = {
    "gpt-5-mini" = {
      max_completion_tokens = 1000,
    },
    "gpt-5-nano" = {
      max_completion_tokens = 1000,
    },
    "gpt-4o-mini" = {
      max_tokens = 1000,
      temperature = 0.0,
    }
  };
  # Timeout for requests
  timeout = 10s;
  # Prompt for the model (use default if not set)
  #prompt = "xxx";
  # Custom condition (lua function)
  #condition = "xxx";
  # Autolearn if gpt classified
  #autolearn = true;
  # Reply conversion (lua code)
  #reply_conversion = "xxx";

  # Default set of symbols to be excepted
  #symbols_to_except = [
  #  'BAYES_SPAM',
  #  'WHITELIST_SPF',
  #  'WHITELIST_DKIM',
  #  'WHITELIST_DMARC',
  #  'FUZZY_DENIED',
  #];

  # Be sure to enable module after you specify the API key
  enabled = false;

  # Include dynamic conf for the rule
  .include(try=true,priority=5) "${DBDIR}/dynamic/gpt.conf"
  .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/gpt.conf"
  .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/gpt.conf"
}