]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Update gpt.lua to fix spaces on empty lines
authorhunter-nl <junobox@gmail.com>
Thu, 14 Aug 2025 14:51:24 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Thu, 14 Aug 2025 14:51:24 +0000 (16:51 +0200)
To fix luacheck "line contains only whitespace"

src/plugins/lua/gpt.lua

index 0738bb5ab8fd5b07c318a89ced57f418d48f8d24..8457fbdf75d756e3686bd527d640171471979100 100644 (file)
@@ -729,7 +729,7 @@ local function openai_check(task, content, sel_part)
     end
     return true
   end
-    
+
   local body_base = {
     messages = {
       {
@@ -754,7 +754,7 @@ local function openai_check(task, content, sel_part)
       }
     }
   }
-  
+
   if type(settings.model) == 'string' then
     settings.model = { settings.model }
   end
@@ -767,7 +767,7 @@ local function openai_check(task, content, sel_part)
     }
     -- Fresh body for each model
     local body = table_deep_copy(body_base)
-    
+
     -- Set the correct token limit field
     local token_field = get_max_tokens_field(model)
     body[token_field] = settings.max_tokens