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

[Feature request] Automatic unindent #39

Open
99991 opened this issue Mar 2, 2025 · 0 comments
Open

[Feature request] Automatic unindent #39

99991 opened this issue Mar 2, 2025 · 0 comments

Comments

@99991
Copy link

99991 commented Mar 2, 2025

Editors automatically indent the next line to the level of the current line, but models are not able to automatically unindent the line, so they spew garbage instead. Example:

def add_lists(a: list[int], b: list[int]) -> list[int]:
    c = []
    for ai, bi in zip(a, b):
        c.append(ai + bi)
        ... # there is nothing useful to generate here at this indentation level

The best fix would probably be to finetune the models so they can fix indentation, but a simple workaround would be to start generating a few characters earlier, especially if the previous characters were all tabs or spaces.

I would like to have a setting to start predicting n spaces earlier.

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

No branches or pull requests

1 participant