aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/gpt.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/gpt.lua')
-rw-r--r--src/plugins/lua/gpt.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/lua/gpt.lua b/src/plugins/lua/gpt.lua
index 79f8882ce..e12bcf807 100644
--- a/src/plugins/lua/gpt.lua
+++ b/src/plugins/lua/gpt.lua
@@ -221,13 +221,18 @@ local function openai_gpt_check(task)
if reply > 0.75 then
task:insert_result('GPT_SPAM', (reply - 0.75) * 4, tostring(reply))
+ if settings.autolearn then
+ task:set_flag("learn_spam")
+ end
elseif reply < 0.25 then
task:insert_result('GPT_HAM', (0.25 - reply) * 4, tostring(reply))
+ if settings.autolearn then
+ task:set_flag("learn_ham")
+ end
else
lua_util.debugm(N, task, "uncertain result: %s", reply)
end
- -- TODO: add autolearn here
end
local body = {