Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPT Adding Comments Cause Errors When Updating Files #235

Closed
generallynonsensical opened this issue Aug 31, 2023 · 2 comments
Closed

GPT Adding Comments Cause Errors When Updating Files #235

generallynonsensical opened this issue Aug 31, 2023 · 2 comments
Labels
question Further information is requested

Comments

@generallynonsensical
Copy link

generallynonsensical commented Aug 31, 2023

Usage: aider via terminal in vscode, debian

Error:

The error Malformed response #2, retrying...
InvalidEditBlock: edit failed!

does not contain the exact sequence of HEAD lines you specified.
Try again.
DO NOT skip blank lines, comments, docstrings, etc!
The HEAD block needs to be EXACTLY the same as the lines in assets/js/output.js with nothing missing!

does not contain these 2 exact lines in a row:

// Step 1: `

Issue: The error causes a loop where aider keeps trying to fix the issue with updating the file. This burns through tokens fast and is incredibly expensive as it keep generating the same old code, then the new code updates, etc. If it does not catch the issue on the second go around, it will keep trying.

@generallynonsensical generallynonsensical changed the title Adding "Step" comments cause error loops GPT Adding Comments Cause Errors When Updating Files Aug 31, 2023
@paul-gauthier paul-gauthier added the question Further information is requested label Sep 5, 2023
@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and reporting this issue.

Unfortunately even GPT-4 gets confused sometimes. You can always safely halt it by hitting CONTROL-C and then tell it to stop doing whatever it's doing wrong.

Another thing to try is to add fewer files to the chat, so GPT can focus more on the specific files you want it to change.

@paul-gauthier
Copy link
Collaborator

I'm going to close this issue for now, but feel free to re-open or file a new issue any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants