]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Set response_format
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 22 Jul 2024 12:10:02 +0000 (13:10 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 22 Jul 2024 12:10:02 +0000 (13:10 +0100)
src/plugins/lua/gpt.lua

index 046fe5dd78bf610acfd4a9c42cbf913a2a3ab8c8..7b582e55dafff4489939b2faf8e513b719baa38c 100644 (file)
@@ -273,6 +273,7 @@ local function openai_gpt_check(task)
     model = settings.model,
     max_tokens = settings.max_tokens,
     temperature = settings.temperature,
+    response_format = { type = "json_object" },
     messages = {
       {
         role = 'system',