System message: how to force ChatGPT API to follow it

(sorry previous post was deleted)

I’m not sure if you found the solution, but I’m addressing the same issue here:

You can find a possible improvement for your problem there:

“I tried putting the “system” as the very last array object in the messages array (even after the last user prompt), and it works. The AI now refuses to leave the role”