I had to remove all the \n from my hardcoded initial prompt (when I first make the connection to the completions API). This lets the API respond successfully but without \n’s it hard to format what we want the response to look like.
The same prompt with a \n causes this error
“The Operation couldn’t be completed”