ChatGPT has gone crazy. He started rewriting a code without stopping

ChatGPT gone crazy. I told him to make me a code, he did, but he started to rewrite it without stopping, he simply repeated writing the code without finishing it.

I “stop genrating”.

Then I asked him: “why do you repeat the same answer several times?”

And ChatGPT answered me:

“Sorry for the repetition, it was a bug. Here’s the updated code that doesn’t use BeautifulSoup:”

And he went crazy again. And he wrote the code in three quarters, and he repeated it, all the same without stopping. I had to “stop generating”

And again I asked him to do the code, and look what he wrote me:

“I apologize for this error. It was a technical issue. Here is the updated code:”

and he wrote the code again, and he rewrote it, and I stopped him

I mention that I am using ChatGPT model=gpt-4-plugins

I think this problem of ChatGPT is the following. You send it to a previous code in the chat, and you tell it to update to a new one. And then he gets confused…

Another explanation is that ChatGPT remains focused on that part of the code where it cannot find the solution. And it always returns to that point in the code, that’s why it makes a loop

this happened to me again when I gave him the error in the code, from line 37. ChatGPT wrote the code again, but when he got to line 37 again, he interrupted the code and started writing it again . And so on, and he wrote the code up to line 37, and he interrupted and wrote it again, as if in a continuous loop.

So I think it gets stuck on certain errors. Either he doesn’t know the solution, or he can’t find the solution in his database, and something prevents him from moving on

The problem here, is that the code is too long, and ChatGPT it gets blocked if it writes a code longer than certain characters. This is why it makes a loop, and don’t finish writing the code