Don't generate invalid JSON

This commit is contained in:
Jorge Manrubia
2025-05-15 15:21:14 +02:00
parent 7c55dd3a09
commit 88fd3a7aaa
+5 -3
View File
@@ -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