From cbd04fb16be4f1a2bc17b5bc6b1d0838d60daa0c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 6 Feb 2024 10:41:37 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20better=20error=20when=20old=20ve?= =?UTF-8?q?rsion=20of=20Ollama=20being=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/loadConfig.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/vscode/src/loadConfig.ts b/extensions/vscode/src/loadConfig.ts index 0530a668e..45e57f043 100644 --- a/extensions/vscode/src/loadConfig.ts +++ b/extensions/vscode/src/loadConfig.ts @@ -148,6 +148,9 @@ function setupLlm(llm: ILLM): ILLM { if (text.includes("try pulling it first")) { const model = JSON.parse(text).error.split(" ")[1].slice(1, -1); text = `The model "${model}" was not found. To download it, run \`ollama run ${model}\`.`; + } else if (text.includes("/api/chat")) { + text = + "The /api/chat endpoint was not found. This may mean that you are using an older version of Ollama that does not support /api/chat. Upgrading to the latest version will solve the issue."; } else { text = "This may mean that you forgot to add '/v1' to the end of your 'apiBase' in config.json.";