-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 context improvement for codestral and qwen coder #3927
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for continuedev canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional note: I changed both qwen and codestral template so that they produce a single prompt instead of separate prefix and suffix.
Explanation:
Creating prefix and suffix will result in a request that has "prompt" and "suffix" in the request body. However, after all, the model itself has to get a single prompt (because LLM models only have one "prompt" as input), so somewhere in the process, the provided "prompt" and "suffix" parameters will be converted to a single "prompt", but may not in a way we want: in case of codestral it's [SUFFIX]{suffix}[PREFIX]{prefix}, that makes it impossible to put the context before the [PREFIX] and [SUFFIX] separators. In contrast, providing a single prompt will let us achieve this format: {context}[PREFIX]{prefix}[SUFFIX]{suffix}
Update: I found that this change is conceptually wrong, I updated the PR to contain only minimal changes to the template. With other modifications it's working quite well already.
Current changes in the codestral template:
- Now it uses relative instead of absolute file paths in the context
- Added "++++" as a stop word because this is used in the prompt to mark new files
… into autocomplete_context_fix
…in completionProvider.ts
…ocomplete_context_fix
Description
Enhance context inclusion for codestral and qwen coder.
Changes:
Relates to these issues:
#3900 (opened by me as a feature request, however I realized that the feature is already there just not working)
#1952
#3506
(most likely there are more)
Checklist
Testing instructions
Add this code to the html test file:
class=
and press"
myclass2
Possible further improvements on this feature: