So, I’m trying to make a HTTP request to connect to the OpenAI endpoint in order to use structured data. However, today I came across an issue that has never happened before. I’ve been making HTTP requests to connect to the OpenAI endpoint for a while now, and the rest of the similar modules like this one are still actively working. But for some reason, this one doesn’t work.
I have debugged it and identified the problem, but I am unable to solve it. The issue occurs when you run the whole scenario: the HTTP request returns an error. However, if you run it individually and manually input the necessary data, it works. Here’s what I found to be the problem: the ending double quotation mark starts on a new line, which essentially breaks the JSON and causes the HTTP request to return an error.
My current issue is not being able to handle or fix it when it behaves this way. So any help would be greatly appreciated