If have been playing around to get the response in json or xml through api.openai.com. But I find that the response sometimes leaves out important key features for the response to be parseable. For example this is my prompt, but 1 out of 10 responses it will respond with incorrect xml. What’s the trick to make sure the response is always consistent?
Im using davinci and temperature 0.6.
“Rewrite the following passage after : as {content}.” +
“Generate a catchy title to get good CTR based on {content} as {title}.” +
“Based on the rewritten content describe in detail a photo that reflects the rewritten content as {photo} so that it could be used for a prompt for an AI photo generator.” +
“Based on the content of {photo} generate 12 keywords that could be used for ai photo generator as {keywords}.” +
“Use the following response format between quotes ‘{content}{title}{photo}{keywords}’:” + input;
Where input is a piece of text i like to have rewritte by the api.