{
I am creating a prompt that has multiple questions that I am concatenating with a 4 page PDF document (I OCR'd it). This is a legal document that has the usual types of punctuation. I have no control over the formatting of the PDF. I have disabled "encode request body" in the Invoke Web Service Action. When I run the flow I get the error shown. If I remove the Cleaned Document from the prompt, the flow runs without error, So the problem is with the pdf. I am thinking that I need to escape various characters but am not sure how to proceed. (Are there examples of replace for various types of punctuation.)

"error": {
"message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}