From 88fd3a7aaa15bd79a1f18f8bd709f407933a95aa Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 15 May 2025 15:21:14 +0200 Subject: [PATCH] Don't generate invalid JSON --- app/models/command/ai/translator.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/command/ai/translator.rb b/app/models/command/ai/translator.rb index b58fcb1cc..395e8d277 100644 --- a/app/models/command/ai/translator.rb +++ b/app/models/command/ai/translator.rb @@ -107,9 +107,11 @@ class Command::Ai::Translator Each command will be a JSON object containing two properties: "commands" and "context". Notice that both are optional but at least ONE must be present. All these examples are valid: - { context: [ terms: [ "performance" ] ], commands: ["/assign jorge", "/close"] } - { context: [ terms: [ "performance" ] ] } - { commands: [ "/assign jorge", "/close"] } + { "context": [ "terms": [ "performance" ] ], "commands": ["/assign jorge", "/close"] } + { "context": [ "terms": [ "performance" ] ] } + { "commands": [ "/assign jorge", "/close"] } + + Make sure you generate valid JSON with both keys and values within quotes. # Other