Formatted as Json safe

I am building a simple code review platform using Openai. The user writes code for a specific coding challenge. This code is then passed to Openai for a review.

Here is where my problem is, I keep getting a Json error. I tried replacing special characters and then added a formatted as Json safe at the end. I still keep getting the same error.

Please help resolve this issue.

Hi @deepak3! And what error would that be? Could you send a printout of the error return and/or warning?

Keep in mind. When using ‘json safe’ it adds quotes. So in the API connector, you will need to remove the quotes for that part. That is typically the issue. Does that help at all? :blush::man_shrugging: Then you won’t need all the find and replace parts.

image

Hi @deepak3!
I found this help link from 2023, I’ll pass it on to you, maybe it can help you too.

OpenAI API Error - HTTP 400 - Need help / APIs - Bubble Forum