#JSON response

3 messages · Page 1 of 1 (latest)

primal verge
#

When calling the OpenAI API for completion and requesting a valid JSON object, sometimes the response contains a ':' or '.' character at the beginning, which prevents the JSON from being parsed.

pliant ermine
#

Dealing with this as well, I've been tossing around writing regex expressions to clean up the data, but there's got to be a simpler way

#

I'm wondering if this comes down to writing more accurate prompts?