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

Autocomplete: Remove same line suffix information from ollama prompts #3213

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

philipp-spiess
Copy link
Contributor

This PR removes the same line suffix information in the ollama prompts. This is going to make it possible to have insertion in the middle of text in the current line.

The issue without that is that we currently do not have a way for yielded completion results to know wether they contain the same line suffix or not. We treat all completions as though they do (so a completion of console.log(|) will always include the closing )) and if there's no overlap with the current suffix we filter them out. This logic is because in the past, models weren't good enough to deal the same line suffix.

The quick fix is to make sure we also omit the same line suffix info for Ollama prompts and have the model generate the suffix again so we can properly diff it.

Before

Screenshot 2024-02-19 at 16 43 01

Test plan

After

Screenshot 2024-02-19 at 16 42 03

@philipp-spiess philipp-spiess requested review from valerybugakov and a team February 19, 2024 16:32
@philipp-spiess philipp-spiess merged commit 0d10299 into main Feb 20, 2024
16 checks passed
@philipp-spiess philipp-spiess deleted the ps/ac-ollama-remove-same-line-suffix-data branch February 20, 2024 12:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants