-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: completion is truncated (stops streaming) at the wrong place #3994
Comments
Why not have a smaller default max_tokens setting for the completion models? It defaults to 2048 or 4096, I had to set it to 100 to 200 to avoid too long responses. |
cc'ing @tomasz-stefaniak here who was more context on this logic. |
Do you mind opening a PR for this? You're right that in most cases such a long response is not needed. Regarding truncation, I'd have to look into this in more detail. We have a relatively thorough testing suite based on some test cases that have historically caused problems. We'd need to verify that whatever fix we apply doesn't break too many of these: https://github.com/continuedev/continue/blob/main/core/autocomplete/filtering/test/testCases.ts#L5 |
Yes, I'll provide a PR. |
@tomasz-stefaniak I sent a PR #4448 that make the maxTokens default to 256 for autocomplete if nothing is set. |
Before submitting your bug report
Relevant environment info
The problem
The log shows that the completion is OK, but it only partially appears. The model completes
"1__tabAutocompleteModel": {
but only"1__
appears.To reproduce
Open the testing sandbox, add this file:
(A bit awkward, but this is a way I switch between different autocomplete model, and this is the place where the error happens)
Save to a file (test_config.json), reload the window. Place the cursor at the empty line and trigger autocomplete with a hotkey.
For me, the completion is:
In the output, the completion is:
What causes the problem
I debugged, and found that the problem is caused by this line in core/autocomplete/filtering/streamTransforms/StreamTransformPipeline.ts:
It's reasonable to stop streaming at the start of the suffix, however it seems this doesn't work right, because where it stops is not equal to the start of the suffix.
Log output
The text was updated successfully, but these errors were encountered: