diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-27 15:39:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-27 15:39:09 +0100 |
commit | 932a8a1cf4671232dcb70c9931b1d7d75e8220b9 (patch) | |
tree | 28aa965a1b297d20351b3327c70a17eb0d94024c /conf | |
parent | 7b3fd1688c8d6634b67acced10f770792c928a91 (diff) | |
download | rspamd-932a8a1cf4671232dcb70c9931b1d7d75e8220b9.tar.gz rspamd-932a8a1cf4671232dcb70c9931b1d7d75e8220b9.zip |
[Project] Add GPT plugin
Diffstat (limited to 'conf')
-rw-r--r-- | conf/modules.d/gpt.conf | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/conf/modules.d/gpt.conf b/conf/modules.d/gpt.conf new file mode 100644 index 000000000..1dd5405e3 --- /dev/null +++ b/conf/modules.d/gpt.conf @@ -0,0 +1,43 @@ +# 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-3.5-turbo"; + # Maximum tokens to generate + max_tokens = 100; + # Temperature for sampling + temperature = 0.7; + # Top p for sampling + top_p = 0.9; + # 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"; + + # 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" +}
\ No newline at end of file |