Edit endpoint - JSON Validation (Text Vs Code)

Hi all,

I’m currently using ChatGPT to generate a JSON object. My application will then attempt to parse the JSON object, and if the parsing fails, it attempts to use the /v1/edits endpoint to resolve the issue. It will do this in a while loop (making as many edit requests as required) until the JSON comes back valid.

For the purposes of JSON validation, I’m unsure if it would be better to use code-davinci-edit-001 or text-davinci-edit-001 with the edit end point. The goal of course would be to use the least amount of edit requests possible to get valid JSON.

Advice is very much appreciated!

Thanks!

Thank you for the detailed response, makes sense :slight_smile:

Thanks!