diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-12-19 16:52:27 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-12-19 16:52:27 +0000 |
commit | 4d0cb6a366ae7c3d2c3f19e2d4c91d9b46ce4870 (patch) | |
tree | 401acd9569ac5ed39fdf1e767d3b2d1c7cd13866 /conf | |
parent | d35385f951ee38dfdd0bedc77eb7e2d1e5809e40 (diff) | |
download | rspamd-vstakhov-llm-embeddings.tar.gz rspamd-vstakhov-llm-embeddings.zip |
[Project] Add skeleton for embeddings modulevstakhov-llm-embeddings
Diffstat (limited to 'conf')
-rw-r--r-- | conf/modules.d/llm_embeddings.conf | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/conf/modules.d/llm_embeddings.conf b/conf/modules.d/llm_embeddings.conf new file mode 100644 index 000000000..d5c91bb78 --- /dev/null +++ b/conf/modules.d/llm_embeddings.conf @@ -0,0 +1,33 @@ +# 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 + +llm_embeddings { + # Supported types: openai, ollama + type = "ollama"; + model = "nomic-embed-text"; + dimensions = 8192; + # Maximum tokens to generate + max_tokens = 5000; + # Timeout for requests + timeout = 10s; + # URL to check (e.g. for ollama) + url = "http://localhost:11434/api/embeddings"; + # 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/llm_embeddings.conf" + .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/llm_embeddings.conf" + .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/llm_embeddings.conf" +}
\ No newline at end of file |