From 58691db662e58c190cc274d923ab225225bc3ee5 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 29 May 2024 10:53:36 -0700 Subject: [PATCH] fix codestral templating --- core/llm/autodetect.ts | 6 ++++++ extensions/vscode/src/webviewProtocol.ts | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 66f0217d02..bb110676e7 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -176,6 +176,10 @@ function autodetectTemplateType(model: string): TemplateType | undefined { return "none"; } + if (lower.includes("codestral")) { + return "none"; + } + if (lower.includes("alpaca") || lower.includes("wizard")) { return "alpaca"; } @@ -303,6 +307,8 @@ function autodetectPromptTemplates( editTemplate = null; } else if (templateType) { editTemplate = gptEditPrompt; + } else if (model.includes("codestral")) { + editTemplate = osModelsEditPrompt; } if (editTemplate !== null) { diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 13cc10a0f4..0c3a3c4016 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -138,10 +138,6 @@ export class VsCodeWebviewProtocol if (message.includes("exceeded")) { message += " To keep using Continue, you can set up a local model or use your own API key."; - } else if (message.includes("upgrade Continue")) { - } else { - message += - " To avoid rate limiting, you can set up a local model or use your own API key."; } vscode.window