Merge pull request #3341 from continuedev/nate/quick-edit-5814
postprocessing rule for no suffix
This commit is contained in:
commit
f2e801b3fd
1 changed files with 11 additions and 0 deletions
|
|
@ -90,6 +90,17 @@ export function postprocessCompletion({
|
|||
completion = completion.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
// When there is no suffix, Codestral tends to begin with a new line
|
||||
// We do this to avoid double new lines
|
||||
if (
|
||||
suffix.length === 0 &&
|
||||
prefix.endsWith("\n\n") &&
|
||||
completion.startsWith("\n")
|
||||
) {
|
||||
// Remove a single leading \n from the completion
|
||||
completion = completion.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (llm.model.includes("granite")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue