Skip to content

Commit

Permalink
build: Prevent setting screen from not working if ollama is not insta…
Browse files Browse the repository at this point in the history
…lled
  • Loading branch information
mmiscool committed Dec 11, 2024
1 parent 710e072 commit 343f133
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/llmCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ async function getOllamaModels() {
const arrayOfModels = ollamaModels.models.map(model => model.name);
return arrayOfModels;
} catch (error) {
return [];
// Ask user if they want to try and install ollama
if (await confirmAction('Ollama might not be installed. Do you want to try and install it?')) {
await printAndPause('Installing Ollama...');
Expand All @@ -216,7 +217,7 @@ async function getOllamaModels() {
await pullOllamaModelWithProgress('granite3-dense:latest');

return getOllamaModels();
return [];

}

}
Expand Down

0 comments on commit 343f133

Please sign in to comment.