# 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-4o-mini";
  # Maximum tokens to generate
  max_tokens = 1000;
  # Temperature for sampling
  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"
}