]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Remove unnecessary blank lines in gpt.lua 5612/head
authorhunter-nl <junobox@gmail.com>
Tue, 16 Sep 2025 09:22:23 +0000 (11:22 +0200)
committerGitHub <noreply@github.com>
Tue, 16 Sep 2025 09:22:23 +0000 (11:22 +0200)
src/plugins/lua/gpt.lua

index fcd6ab5179c9269e3903e0b5785bd6f5e4d71c5d..bf4c22ae558e3b27a788441b646e3d4c09107e59 100644 (file)
@@ -732,7 +732,7 @@ local function openai_check(task, content, sel_part)
     end
 
     body.model = model
-    
+
     upstream = settings.upstreams:get_upstream_round_robin()
     local http_params = {
       url = settings.url,
@@ -837,7 +837,7 @@ local function ollama_check(task, content, sel_part)
     }
     -- Fresh body for each model
     local body = lua_util.deepcopy(body_base)
-    
+
     -- Merge model-specific parameters into body
     local params = settings.model_parameters[model]
     if params then
@@ -850,7 +850,7 @@ local function ollama_check(task, content, sel_part)
     if settings.include_response_format then
       body.response_format = { type = "json_object" }
     end
-   
+
     body.model = model
 
     upstream = settings.upstreams:get_upstream_round_robin()
@@ -1003,7 +1003,8 @@ if opts then
           "Output ONLY 3 lines:\n" ..
           "1. Numeric score (0.00-1.00)\n" ..
           "2. One-sentence reason citing whether it is spam, the strongest red flag, or why it is ham\n" ..
-          "3. Empty line or mention ONLY the primary concern category if found from the list: " .. table.concat(lua_util.keys(categories_map), ', ')
+          "3. Empty line or mention ONLY the primary concern category if found from the list: " .. 
+            table.concat(lua_util.keys(categories_map), ', ')
     else
       settings.prompt = "Analyze this email strictly as a spam detector given the email message, subject, " ..
           "FROM and url domains. Evaluate spam probability (0-1). " ..