ChatGPT sometimes not finish its code or sentence, how do I solve this?


this is what seems to work out for me, not very consistent but with the same prompt, it works

I asked it to continue, asked why does it not complete the code, etc. Nothing worked. It gave me steps to complete code.

I then asked this - Please complete the code. I dont know to write code. It then gave the complete code! Give it a shot.

This solution seems to work for me every time. Thanks!

Either ask it to divide the code into parts or tell it about the problem. It will then post the code but divided by parts. You can even ask it to wait for your confirmation before posting next part (this worked best).

  • Continue from where you stopped: repeats the entire cod eagain.

  • Continue from “Last line of the code(actual code needs to be inserted)”: usually works.

chatGPT does not complete the code in 7 out of 10 and this makes huge waste of time.
chatGPT seems broken on this.

Also waiting for a fix to this issue. No matter what I tried from the suggestions above, nothing worked. (I have the ChatGPT plus account.)

If you ask it to “continue” or “finish” the code, it starts at the beginning and fails at the same point.

I’ve found it almost always works to ask it to “show the second half of this code”, it’ll usually restart from the last completed line it wrote in the earlier response.

I’ve not had it generate anything that required 3 responses, so i’m not sure if it works a second time.

I use : Continue from the line “some last part that I know it doesn’t repeat above”. And it usually works

I have experienced the same totally frustrating problem. Signed up to Plus in order to solve it. Didn’t help. Now I asked chatGPT to divide code into numbered chunks separated by comments. Stupid, but it works. I can now ask code for chunk 3.

1 Like

I spend more time trying to get the entire output than I do trying to get the script to do what I want it to.

The ‘Continue in codebox’ was working, but now breaks & displays text both inside & outside of the codebox… Like many people here, I signed up to Plus in hopes to overcome this problem… yeah… didn’t help… it just fails faster.

1 Like

I feel more and more that ChatGPT has become senile.

find the line the code stops and and ask: please give me the code from line x onwards

x would need to be replaced with whatever line number it had stopped at

The service can make http request. Why not just enable it to send code responses to a paste bin service?

THESE PROMPTS ARE GREAT, TO SOLVE “THE CUTTING OFF WHEN GENERATING CODE” ISSUE.
BY THE WAY I ASKED CHATGPT HOW TO SOLVE THIS ISSUE, THEN I MADE THE ANSWERS A BIT BETTER.

  • Generate code in a codebox starting from [insert last generated line here].
  • starting from [insert last generated line here] Generate code in a codebox.
1 Like

I suggest please write your code and check it , and ask GPT to improve it, so can understand and learn a lot form it

Just ask ChatGPT to add line numbers to code blocks.

Could you provide me with a Personal Blog Template. Use Bootstrap 5, Bootstrap 5 icons, Font awesome. Must be responsive and work on both mobile and desktop. Would be nice if you add a hamburger menu for mobile users. Generate response with line numbers in code block.

Still not a perfect fix, hope it helps.

1 Like

If you want to continue from a specific function or sentence, you can use ‘continue in a codebox from def XXX’, where ‘XXX’ is the name of the function or sentence that ChatGPT has not finished, and you want to continue from.

1 Like

Ainda continua o mesmo problema, infelizmente.

I asked it to “Continue from the last line of code you provided” and it worked

When its cut off I suggest sating “continue” if that dosent work then i suggest saying “continue after (last line of code)”