Cleans the response from the OpenAI API Assums the json starts with { or [ and attempts to trim the superfluous text before that, and also replaces newline and escape characters.
Cleans the response from the OpenAI API Assums the json starts with { or [ and attempts to trim the superfluous text before that, and also replaces newline and escape characters.