🚑 fix constant warnings when onboarding with Ollama
This commit is contained in:
parent
8d7b7604cc
commit
24d02e8404
1 changed files with 7 additions and 1 deletions
|
|
@ -368,7 +368,13 @@ export class Core {
|
|||
return model.listModels();
|
||||
} else {
|
||||
if (msg.data.title === "Ollama") {
|
||||
return new Ollama({ model: "" }).listModels();
|
||||
try {
|
||||
const models = await new Ollama({ model: "" }).listModels();
|
||||
return models;
|
||||
} catch (e) {
|
||||
console.warn(`Error listing Ollama models: ${e}`);
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue