Viewing a single comment thread. View all comments

---AI--- t1_jdey54g wrote

Reply to comment by nightofgrim in [N] ChatGPT plugins by Singularian2501

GPT is really good at outputting json. Just tell it you want the output in json, and give an example.

So far in my testing, it's got a success rate of 100%, although I'm sure it may fail occasionally.

9

nightofgrim t1_jdf00h9 wrote

If it fails, reply that it screwed up and needs to fix it. I bet that would work.

5

iJfbQd t1_jdf9cqi wrote

I've just been parsing the json output using a json5 parser (ie in Python, import json5 as json). In my experience, this catches all of the occasional json output syntax errors (like putting a comma after the terminal element).

2