MCU connects to chatgpt api

Has anyone tried picking up a chatgpt api with an esp32 arduino。
I tried it but there was a problem with receiving messages, it was OK when ChatGPT replied short, but it was wrong when Chatgpt replied long