🔊 better error when old version of Ollama being used
This commit is contained in:
parent
be751d73a8
commit
cbd04fb16b
1 changed files with 3 additions and 0 deletions
|
|
@ -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.";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue