fix merge mistake
This commit is contained in:
parent
d8ce2279fb
commit
d392a0fb43
1 changed files with 0 additions and 40 deletions
|
|
@ -85,46 +85,6 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = {
|
|||
},
|
||||
};
|
||||
|
||||
const codestralMultifileFimTemplate: AutocompleteTemplate = {
|
||||
compilePrefixSuffix: (
|
||||
prefix: string,
|
||||
suffix: string,
|
||||
filepath: string,
|
||||
reponame: string,
|
||||
snippets: AutocompleteSnippet[],
|
||||
): [string, string] => {
|
||||
if (snippets.length === 0) {
|
||||
if (suffix.trim().length === 0 && prefix.trim().length === 0) {
|
||||
return [`+++++ ${getLastNPathParts(filepath, 2)}\n${prefix}`, suffix];
|
||||
}
|
||||
return [prefix, suffix];
|
||||
}
|
||||
const relativePaths = shortestRelativePaths([
|
||||
...snippets.map((snippet) => snippet.filepath),
|
||||
filepath,
|
||||
]);
|
||||
const otherFiles = snippets
|
||||
.map((snippet, i) => `+++++ ${relativePaths[i]}\n${snippet.contents}`)
|
||||
.join("\n\n");
|
||||
return [
|
||||
`${otherFiles}\n\n+++++ ${relativePaths[relativePaths.length - 1]}\n${prefix}`,
|
||||
suffix,
|
||||
];
|
||||
},
|
||||
template: (
|
||||
prefix: string,
|
||||
suffix: string,
|
||||
filepath: string,
|
||||
reponame: string,
|
||||
snippets: AutocompleteSnippet[],
|
||||
): string => {
|
||||
return `[SUFFIX]${suffix}[PREFIX]${prefix}`;
|
||||
},
|
||||
completionOptions: {
|
||||
stop: ["[PREFIX]", "[SUFFIX]"],
|
||||
},
|
||||
};
|
||||
|
||||
const codegemmaFimTemplate: AutocompleteTemplate = {
|
||||
template:
|
||||
"<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue